Add integration-level test for upgrade_stream_wasm zero-hash rejection - #272
Merged
Jaydbrown merged 1 commit intoJul 29, 2026
Conversation
Addresses conduit-protocol#232, which flagged that tests/factory_deploy.rs has no dedicated test calling upgrade_stream_wasm with an all-zero BytesN<32> to confirm is_zero_wasm_hash rejects it end-to-end. Note: this guard is already covered at the unit level by upgrade_stream_wasm_rejects_zero_hash in contracts/factory/src/tests.rs (added for issue conduit-protocol#86), so this is not a true coverage gap. conduit-protocol#232 specifically named tests/factory_deploy.rs though, so this adds the equivalent integration-level test there for completeness and to satisfy the issue's specific ask, following the existing upgrade_stream_wasm_extends_instance_ttl pattern in this file. Verification: - cargo test --test factory_deploy: 31 passed, 0 failed - cargo fmt --check: clean
|
@Alimzy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Note on scope
This guard is already covered at the unit level by
upgrade_stream_wasm_rejects_zero_hash in
contracts/factory/src/tests.rs (added for issue #86), calling
try_upgrade_stream_wasm with an all-zero BytesN<32> and asserting
Error::InvalidWasmHash. So this is not strictly a coverage gap.
#232 specifically flagged tests/factory_deploy.rs though, so this PR
adds the equivalent integration-level test there, following the
existing upgrade_stream_wasm_extends_instance_ttl pattern in that
file, to satisfy the issue's specific ask.
What this PR does
Adds upgrade_stream_wasm_rejects_all_zero_hash to
tests/factory_deploy.rs: deploys a real factory via the existing
deploy_factory helper, calls try_upgrade_stream_wasm with an
all-zero BytesN<32>, and asserts it returns Error::InvalidWasmHash.
Verification
Closes #232.