smartcontract: fix broken integration tests and restore cargo test-sbf#3068
Merged
smartcontract: fix broken integration tests and restore cargo test-sbf#3068
Conversation
PR #2654 replaced `cargo test-sbf` with `cargo test --lib` in the Makefile, which silently stopped running integration tests. This restores `cargo test-sbf` and fixes all broken tests that accumulated undetected: - user_onchain_allocation_test: add multicast_publisher_block_pda to ActivateUser account lists and fix expected IP prefix assertions - link_wan_test: update InterfaceHasEdgeAssignment error code (81→83) - user_tests: fix tenant administrator to use payer pubkey - tenant_test: avoid BanksClient tx dedup with new blockhash - telemetry test_helpers: add multicast_publisher_block_pda to SetGlobalConfig account list - telemetry latency tests: assert desired_status instead of status since check_status_transition is a no-op
Add the same PROGRAM_LOG env var gating to serviceability integration tests that telemetry tests already use. Program logs are suppressed by default and can be enabled with PROGRAM_LOG=1 for debugging.
martinsander00
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
cargo test-sbfin the Makefiletest-sbftarget, which was incorrectly replaced withcargo test --libin Enhance access pass functionality with new types and validation #2654 — this silently stopped running all integration tests in CIPROGRAM_LOG=1Diff Breakdown
Primarily test fixes to catch up with program changes that landed while integration tests were disabled.
Key files (click to expand)
smartcontract/programs/doublezero-serviceability/tests/user_onchain_allocation_test.rs— addmulticast_publisher_block_pdato all ActivateUser/CloseAccountUser account lists; fix expected IP prefix assertions for MulticastPublisherBlock (148.51.x.x)smartcontract/programs/doublezero-serviceability/tests/link_wan_test.rs— update InterfaceHasEdgeAssignment error code assertions (81→83) after enum reordersmartcontract/programs/doublezero-telemetry/tests/initialize_device_latency_samples_tests.rs— assertdesired_statusinstead ofstatussincecheck_status_transitionis a no-op; fix stale commentssmartcontract/programs/doublezero-serviceability/tests/test_helpers.rs— addPROGRAM_LOGenv var gating to suppress program logs by defaultsmartcontract/programs/doublezero-telemetry/tests/test_helpers.rs— addmulticast_publisher_block_pdato SetGlobalConfig account listsmartcontract/Makefile— restorecargo test-sbfintest-sbftargetsmartcontract/programs/doublezero-serviceability/tests/tenant_test.rs— fetch new blockhash before duplicate admin test to avoid BanksClient tx dedupsmartcontract/programs/doublezero-serviceability/tests/user_tests.rs— use payer pubkey as tenant administrator so payer can call SetAccessPassTesting Verification
make test-programspasses end-to-end (cargo test-sbf+cargo test --lib)PROGRAM_LOG=1enables program log output in serviceability tests