From 39dc27a41c2a16249b988feda2569445919ba5ec Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Thu, 27 Jul 2023 18:43:32 +0000 Subject: [PATCH] feat(deployment): add genesis export test --- .../upgrade-test-scripts/agoric-upgrade-11/test.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/deployment/upgrade-test/upgrade-test-scripts/agoric-upgrade-11/test.sh b/packages/deployment/upgrade-test/upgrade-test-scripts/agoric-upgrade-11/test.sh index cd771b3b10ee..d2e82cceffff 100755 --- a/packages/deployment/upgrade-test/upgrade-test-scripts/agoric-upgrade-11/test.sh +++ b/packages/deployment/upgrade-test/upgrade-test-scripts/agoric-upgrade-11/test.sh @@ -8,13 +8,21 @@ waitForBlock 2 # CWD is agoric-sdk upgrade11=./upgrade-test-scripts/agoric-upgrade-11 -# verify swing-store export-data is consistent +# verify swing-store export-data is consistent and perform genesis style "upgrade" killAgd EXPORT_DIR=$(mktemp -t -d swing-store-export-upgrade-11-XXX) make_swing_store_snapshot $EXPORT_DIR --artifact-mode none || fail "Couldn't make swing-store snapshot" -test_val "$(compare_swing_store_export_data $EXPORT_DIR)" "match" "swing-store consistent state-sync" -rm -rf $EXPORT_DIR +test_val "$(compare_swing_store_export_data $EXPORT_DIR)" "match" "swing-store consistent cosmos kvstore" + +TMP_GENESIS_DIR=$EXPORT_DIR/genesis-export +cp $HOME/.agoric/config/genesis.json $TMP_GENESIS_DIR/old_genesis.json +cp $HOME/.agoric/data/priv_validator_state.json $TMP_GENESIS_DIR/priv_validator_state.json +rm -rf $HOME/.agoric/data +mkdir $HOME/.agoric/data +mv $TMP_GENESIS_DIR/priv_validator_state.json $HOME/.agoric/data +mv $TMP_GENESIS_DIR/* $HOME/.agoric/config/ startAgd +rm -rf $EXPORT_DIR # zoe vat is at incarnation 1 echo "FIXME: bypassed zoe-full-upgrade validation"; return 0