-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
# Executed before each test. | ||
setup() { | ||
cd examples/management_canister | ||
bitcoind -regtest -daemonwait | ||
# Make sure the directory is clean. | ||
dfx start --clean --background | ||
} | ||
|
||
# executed after each test | ||
teardown() { | ||
dfx stop | ||
bitcoin-cli -regtest stop | ||
} | ||
|
||
@test "All management canister methods succeed" { | ||
@test "http_request example succeed" { | ||
dfx start --clean --background --enable-canister-http | ||
dfx deploy | ||
dfx canister call caller http_request_example | ||
} | ||
|
||
@test "ecdsa methods succeed" { | ||
dfx start --clean --background | ||
dfx deploy | ||
dfx canister call caller execute_ecdsa_methods | ||
} | ||
|
||
@test "bitcoin methods succeed" { | ||
bitcoind -regtest -daemonwait | ||
dfx start --clean --background --enable-bitcoin | ||
dfx deploy | ||
run dfx canister call caller http_request_example | ||
run dfx canister call caller execute_ecdsa_methods | ||
run dfx canister call caller execute_bitcoin_methods | ||
dfx canister call caller execute_bitcoin_methods | ||
bitcoin-cli -regtest stop | ||
} |