Skip to content

Conversation

thewuhxyz
Copy link
Contributor

@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
Contributor

@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

@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.

@GabrielePicco GabrielePicco merged commit 8ee8466 into magicblock-labs:main Jul 30, 2025
4 of 5 checks passed
@notdanilo notdanilo mentioned this pull request Sep 17, 2025
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