Skip to content

test validator #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

thewuhxyz
Copy link

@thewuhxyz thewuhxyz commented May 11, 2025

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!

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@notdanilo
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants