Skip to content

Commit

Permalink
fix failures caused by increased cycles cost
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity committed Nov 13, 2024
1 parent 0dfaba1 commit 97d0064
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions e2e/tests-dfx/call.bash
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ teardown() {
dfx canister create --all
dfx build
dfx canister install hello_backend
[[ "$USE_POCKETIC" ]] && dfx ledger fabricate-cycles --t 9999999 --canister hello_backend
assert_command dfx canister call hello_backend recurse 100
}

Expand Down
9 changes: 9 additions & 0 deletions e2e/tests-dfx/playground.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ setup_playground() {
dfx_start
dfx deploy backend
dfx ledger fabricate-cycles --t 9999999 --canister backend

PLAYGROUND_CANISTER_ID=$(dfx canister id backend)
export PLAYGROUND_CANISTER_ID
echo "PLAYGROUND_CANISTER_ID is $PLAYGROUND_CANISTER_ID"
Expand All @@ -45,6 +46,10 @@ setup_playground() {
}

@test "canister lifecycle" {
assert_command dfx canister create --all --playground
[[ "$USE_POCKETIC" ]] && dfx ledger fabricate-cycles --t 9999999 --canister hello_backend --playground
[[ "$USE_POCKETIC" ]] && dfx ledger fabricate-cycles --t 9999999 --canister hello_frontend --playground

assert_command dfx deploy --playground
assert_command dfx canister --playground call hello_backend greet '("player")'
assert_match "Hello, player!"
Expand Down Expand Up @@ -87,6 +92,10 @@ setup_playground() {
# If the hashes didn't match then the playground would attempt to
# instrument the asset canister during upload which would run into execution limits.
@test "playground-installed asset canister is same wasm as normal asset canister" {
assert_command dfx canister create --all --playground
[[ "$USE_POCKETIC" ]] && dfx ledger fabricate-cycles --t 9999999 --canister hello_backend --playground
[[ "$USE_POCKETIC" ]] && dfx ledger fabricate-cycles --t 9999999 --canister hello_frontend --playground

assert_command dfx deploy --playground
PLAYGROUND_HASH=$(dfx canister --playground info hello_frontend | grep hash)
echo "PLAYGROUND_HASH: ${PLAYGROUND_HASH}"
Expand Down

0 comments on commit 97d0064

Please sign in to comment.