-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(a3p): add test for snapshots export and restore
- Loading branch information
Showing
5 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
a3p-integration/.yarn/patches/@agoric-synthetic-chain-npm-0.1.0-148de716a6.patch
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/dist/upgrade-test-scripts/env_setup.sh b/dist/upgrade-test-scripts/env_setup.sh | ||
index 617a0fbe7efdfa457e28fc52806dba1b323930d8..25f52a6cf133dca830bd0dcd47c91700e6a8effe 100755 | ||
--- a/dist/upgrade-test-scripts/env_setup.sh | ||
+++ b/dist/upgrade-test-scripts/env_setup.sh | ||
@@ -100,7 +100,7 @@ killAgd() { | ||
AGD_PID=$(cat $HOME/.agoric/agd.pid) | ||
kill $AGD_PID | ||
rm $HOME/.agoric/agd.pid | ||
- wait $AGD_PID || true | ||
+ tail --pid=$AGD_PID -f /dev/null || true | ||
} | ||
|
||
provisionSmartWallet() { |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
"doctor": "yarn synthetic-chain doctor" | ||
}, | ||
"dependencies": { | ||
"@agoric/synthetic-chain": "^0.1.0", | ||
"@agoric/synthetic-chain": "patch:@agoric/synthetic-chain@npm%3A0.1.0#~/.yarn/patches/@agoric-synthetic-chain-npm-0.1.0-148de716a6.patch", | ||
"@types/better-sqlite3": "^7.6.9" | ||
}, | ||
"packageManager": "[email protected]", | ||
|
14 changes: 14 additions & 0 deletions
14
a3p-integration/proposals/z:acceptance/state-sync-snapshots-test.sh
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
source /usr/src/upgrade-test-scripts/env_setup.sh | ||
|
||
set -e | ||
|
||
killAgd | ||
agd snapshots export | ||
SNAPSHOT_DETAILS=$(agd snapshots list | head -n1 | sed -E 's/height: ([0-9]+) format: ([0-9]+) chunks: [0-9]+/\1 \2/') | ||
echo found snapshot $SNAPSHOT_DETAILS | ||
rm -rf /root/.agoric/data/application.db /root/.agoric/data/agoric | ||
agd snapshots restore $SNAPSHOT_DETAILS | ||
|
||
startAgd |
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 |
---|---|---|
|
@@ -11,3 +11,5 @@ GLOBIGNORE=initial.test.js | |
yarn ava ./*.test.js | ||
|
||
./create-kread-item-test.sh | ||
|
||
./state-sync-snapshots-test.sh |
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