bolt
bolt copied to clipboard
test validator
| Status | Type | ⚠️ Core Change | Issue |
|---|---|---|---|
| Ready | Tooling | No | Link |
Problem
What problem are you trying to solve?
Currently cannot run tests without program deployment keypairs
Solution
How did you solve the problem?
Runs tests in an ephemeral local validator with pre-loaded programs for testing
New scripts:
tests/test-validator.sh: Runs tests in a local validator that lasts the duration of the tests.
Greptile Summary
Added a test validator script that initializes an ephemeral local Solana validator with pre-loaded programs and accounts for testing purposes.
- Added
/tests/test-validator.shto launch validator with 9 BPF programs and 2 test accounts - Implemented cleanup trap to properly terminate validator process on script exit
- Added 100000 SOL airdrop to provider account for test transactions
- Configured validator to run silently (
> /dev/null 2>&1) to reduce noise during tests - Added proper error handling with
set -euo pipefailfor script robustness
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
Something is wrong with Solana or Cloudflare SSL handshake, which is breaking the CI. Let me check wth is going on before merging it.