Skip to content

Add integration-level test for upgrade_stream_wasm zero-hash rejection - #272

Merged
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
Alimzy:test/upgrade-stream-wasm-zero-hash-232
Jul 29, 2026
Merged

Add integration-level test for upgrade_stream_wasm zero-hash rejection#272
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
Alimzy:test/upgrade-stream-wasm-zero-hash-232

Conversation

@Alimzy

@Alimzy Alimzy commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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

  • cargo test --test factory_deploy: 31 passed, 0 failed
  • cargo fmt --check: clean

Closes #232.

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
Alimzy requested a review from Jaydbrown as a code owner July 29, 2026 13:05
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Jaydbrown
Jaydbrown merged commit a045f8f into conduit-protocol:main Jul 29, 2026
3 checks passed
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.

Test gap: no coverage for DripFactory::upgrade_stream_wasm with an all-zero WASM hash

2 participants