diff --git a/e2e/tests-dfx/canister_url.bash b/e2e/tests-dfx/canister_url.bash index 974c64627e..cd5f6f03d3 100644 --- a/e2e/tests-dfx/canister_url.bash +++ b/e2e/tests-dfx/canister_url.bash @@ -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 } @@ -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" diff --git a/e2e/tests-dfx/fabricate_cycles.bash b/e2e/tests-dfx/fabricate_cycles.bash index 82f5c61da5..6d811adb03 100644 --- a/e2e/tests-dfx/fabricate_cycles.bash +++ b/e2e/tests-dfx/fabricate_cycles.bash @@ -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 diff --git a/e2e/tests-dfx/sign_send.bash b/e2e/tests-dfx/sign_send.bash index b266510a1e..385d763a68 100644 --- a/e2e/tests-dfx/sign_send.bash +++ b/e2e/tests-dfx/sign_send.bash @@ -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\]" }