Skip to content

Commit

Permalink
Add an e2e test for canister_info. (#4074)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-dfinity authored Jan 22, 2025
1 parent 4dcbbc0 commit 29f2254
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions e2e/tests-dfx/wallet.bash
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,22 @@ teardown() {
assert_command dfx canister call "${CHILD_ID}" wallet_balance '()'
}

@test "forward canister_info call through wallet" {
dfx_new
install_asset identity
dfx_start
WALLET=$(dfx identity get-wallet)
assert_command dfx canister create --all --wallet default
assert_command dfx build
assert_command dfx canister install --all --wallet default

assert_command dfx canister call aaaaa-aa canister_info --wallet default \
"(record { canister_id= principal \"$(dfx canister id e2e_project_backend)\"; num_requested_changes= opt 20})"
assert_contains "$WALLET"
assert_contains "$(dfx identity get-principal)"
assert_contains "3_862_312_591 = 2 : nat64;"
}

@test "forward user call through wallet" {
dfx_new
install_asset identity
Expand Down

0 comments on commit 29f2254

Please sign in to comment.