Skip to content

Commit

Permalink
Merge branch 'master' into mraszyk/pic-impersonate
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk authored Dec 19, 2024
2 parents eeab1dd + 8f8f45c commit e6483ce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions e2e/tests-dfx/request_status.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,23 @@ teardown() {
assert_eq '4449444c0001710b48656c6c6f2c20426f6221'

}

@test "request-status requires same identity" {
install_asset greet
dfx_start --artificial-delay 10000

dfx canister create hello_backend
dfx build hello_backend
dfx canister install hello_backend

assert_command dfx canister call --async hello_backend greet Bob

# shellcheck disable=SC2154
REQUEST_ID="$stdout"

assert_command_fail dfx canister request-status "$REQUEST_ID" "$(dfx canister id hello_backend)" --identity anonymous
assert_contains "The user tries to access Request ID not signed by the caller"

assert_command dfx canister request-status "$REQUEST_ID" "$(dfx canister id hello_backend)"
assert_eq '("Hello, Bob!")'
}

0 comments on commit e6483ce

Please sign in to comment.