You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert_contains "Failed to read principal from id 'broken' (Text must be in valid Base32 encoding.), and failed to load the wallet for that identity"
27
27
assert_contains "missing field \`identities\`"
@@ -236,11 +236,41 @@ teardown() {
236
236
}
237
237
238
238
@test "detects if there is no wallet to upgrade" {
239
+
dfx_start
239
240
dfx_new hello
240
241
assert_command_fail dfx wallet upgrade
241
242
assert_match "There is no wallet defined for identity 'default' on network 'local'. Nothing to do."
242
243
}
243
244
245
+
@test "creates a new wallet when switching between pocketic and replica" {
246
+
dfx_new hello
247
+
248
+
USE_REPLICA=1 dfx_start --artificial-delay 101
249
+
dfx deploy
250
+
251
+
dfx_stop
252
+
253
+
USE_REPLICA="" dfx_start --artificial-delay 99
254
+
dfx deploy
255
+
}
256
+
257
+
@test "creates new wallet if backend changes" {
258
+
dfx_new hello
259
+
260
+
dfx_start --artificial-delay 101
261
+
dfx deploy
262
+
263
+
dfx_stop
264
+
265
+
dfx_start --artificial-delay 99
266
+
dfx deploy
267
+
}
268
+
269
+
@test "must run dfx start before accessing wallet on shared local network" {
270
+
assert_command_fail dfx wallet upgrade
271
+
assert_contains "cannot use a wallet before dfx start"
272
+
}
273
+
244
274
@test "redeem-faucet-coupon can set a new wallet and top up an existing one" {
245
275
dfx_new hello
246
276
dfx_start
@@ -254,7 +284,7 @@ teardown() {
254
284
# prepare wallet to hand out
255
285
dfx wallet balance # this creates a new wallet with user faucet_testing as controller
256
286
dfx canister call faucet set_wallet_to_hand_out "(principal \"$(dfx identity get-wallet)\")"# register the wallet as the wallet that the faucet will return
257
-
rm"$E2E_SHARED_LOCAL_NETWORK_DATA_DIRECTORY/wallets.json"# forget about the currently configured wallet
287
+
find"$E2E_SHARED_LOCAL_NETWORK_DATA_DIRECTORY" -name wallets.json -exec rm {} \;# forget about the currently configured wallet
0 commit comments