Skip to content

test: match the no-Wasm-module error case-insensitively - #870

Merged
lwshang merged 1 commit into
mainfrom
fix/uninstall-test-wasm-case
Nov 5, 2026
Merged

lwshang merged 1 commit into
mainfrom
fix/uninstall-test-wasm-case

Conversation

@lwshang

@lwshang lwshang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Unblocks #864 (launcher bump to 16.1.0-2026-10-30-12-16), which fails canister_uninstall on every platform.

The new launcher capitalizes the rejection text for calling a canister with no code:

  • old: ...but the canister contains no wasm module.
  • new: ...but the canister contains no Wasm module..

The assertion used a case-sensitive contains("no wasm module"). It now uses is_match("(?i)no wasm module"), so it passes on both launcher versions and can merge before #864. The bot PR can't touch test files, so this has to be a separate PR.

Verified locally: cargo test -p icp-cli --test canister_uninstall_tests passes on the current launcher (this branch) and on the new one (#864's branch).

🤖 Generated with Claude Code

Network launcher 16.1.0-2026-10-30-12-16 capitalizes "Wasm" in the
rejection for calling a canister with no code, which broke the
case-sensitive assertion in canister_uninstall. Accept both spellings
so this can land ahead of the launcher bump in #864.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lwshang
lwshang requested a review from a team as a code owner November 5, 2026 07:23
Copilot AI balanced review requested due to automatic review settings November 5, 2026 07:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the test assertion update accepting both wasm and Wasm in the no-module error.

No open issues 🎉

What changed in this PR

Updates the canister uninstall test to accept both wasm and Wasm in the no-module error, unblocking the launcher upgrade in #864 while preserving compatibility with the current launcher.

Changes:

  • Imports the is_match predicate.
  • Replaces the case-sensitive substring assertion with a case-insensitive regular expression.
File Description
crates/​icp-cli/​tests/​canister_uninstall_tests.rs Makes the no-Wasm-module error assertion case-insensitive.

Review effort: Balanced

@lwshang
lwshang enabled auto-merge (squash) November 5, 2026 07:32
@lwshang
lwshang merged commit a04901d into main Nov 5, 2026
109 checks passed
@lwshang
lwshang deleted the fix/uninstall-test-wasm-case branch November 5, 2026 12:34
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