heavy-duty / znap

Performance-first Rust Framework to build APIs compatible with the Solana Actions Spec.
Apache License 2.0
60 stars 1 forks source link

False-positive in tests #89

Closed danmt closed 1 month ago

danmt commented 1 month ago

Expected Behavior

When the tests run in a CI environment a failed test case should be reported in the job.

Found Behavior

At the moment, the CI always succeeds even when the are failing test cases.

Possible Solution

In the test command file we should take the output of run_test_suite and panic when an error is found in a test case.

pub fn run() {
    // ...

    // Run the test suite
    let output = run_test_suite();

    if output.has_error() {
       panic!("tests failed")
    }

   // ...
}

Note: This is for illustration purposes, I'm not aware if there's a has_error property.