bolt icon indicating copy to clipboard operation
bolt copied to clipboard

test validator

Open thewuhxyz opened this issue 7 months ago • 1 comments

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.sh to 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 pipefail for script robustness

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

thewuhxyz avatar May 11 '25 02:05 thewuhxyz

Something is wrong with Solana or Cloudflare SSL handshake, which is breaking the CI. Let me check wth is going on before merging it.

notdanilo avatar May 13 '25 14:05 notdanilo