Skip to content

Commit

Permalink
surpress the error in irrelevant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Nov 19, 2024
1 parent 95f415e commit 1c2b7ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions e2e/tests-dfx/canister_url.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ load ../utils/_

setup() {
standard_setup

# some of the tests run on mainnet with default plaintext identity
# so we need to set this to avoid the error
export DFX_WARNING=-mainnet_plaintext_identity
dfx_new_assets hello
}

Expand Down Expand Up @@ -58,7 +60,7 @@ teardown() {
echo "{}" > canister_ids.json
jq '.hello_frontend.ic = "qsgof-4qaaa-aaaan-qekqq-cai"' canister_ids.json | sponge canister_ids.json
frontend_id=$(dfx canister id hello_frontend --ic)

assert_command dfx canister url hello_frontend --ic
assert_match "https://${frontend_id}.icp0.io"

Expand Down
2 changes: 2 additions & 0 deletions e2e/tests-dfx/fabricate_cycles.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ teardown() {

@test "ledger fabricate-cycles fails on real IC" {
install_asset greet
# without DFX_WARNING, the command would fail with different error (Failed to create AgentEnvironment...)
export DFX_WARNING=-mainnet_plaintext_identity
assert_command_fail dfx ledger fabricate-cycles --all --network ic
assert_match "Cannot run this on the real IC."
assert_command_fail dfx ledger fabricate-cycles --all --ic
Expand Down
3 changes: 2 additions & 1 deletion e2e/tests-dfx/sign_send.bash
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ teardown() {
cd "$E2E_TEMP_DIR"
mkdir not-a-project-dir
cd not-a-project-dir

# surpress the error
export DFX_WARNING=-mainnet_plaintext_identity
assert_command dfx canister sign --query rwlgt-iiaaa-aaaaa-aaaaa-cai read --network ic
assert_match "Query message generated at \[message.json\]"
}
Expand Down

0 comments on commit 1c2b7ca

Please sign in to comment.