Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Jan 22, 2025
1 parent ae23145 commit d08dda0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion e2e/tests-dfx/basic-project.bash
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ teardown() {
assert_eq "4449444c00017d02"

assert_command_fail dfx canister call --query hello_backend inc
assert_match "Not a query method."
assert_match "inc is an update method, not a query method."
assert_match "Run the command without '--query'."


dfx canister call hello_backend inc
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests-dfx/call.bash
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function impersonate_sender() {

# updating settings now fails because the default identity does not control the canister anymore
assert_command_fail dfx canister update-settings hello_backend --freezing-threshold 0
assert_contains "Only controllers of canister $CANISTER_ID can call ic00 method update_settings"
assert_contains "The principal you are using to call a management function is not part of the controllers."

# updating settings succeeds when impersonating the management canister as the sender
assert_command dfx canister update-settings hello_backend --freezing-threshold 0 --impersonate "${IDENTITY_PRINCIPAL}"
Expand All @@ -322,7 +322,7 @@ function impersonate_sender() {

# canister status fails because the default identity does not control the canister anymore
assert_command_fail dfx canister status hello_backend
assert_contains "Only controllers of canister $CANISTER_ID can call ic00 method canister_status"
assert_contains "The principal you are using to call a management function is not part of the controllers."

# canister status succeeds when impersonating the management canister as the sender
assert_command dfx canister status hello_backend --impersonate "${IDENTITY_PRINCIPAL}"
Expand Down

0 comments on commit d08dda0

Please sign in to comment.