diff --git a/a3p-integration/proposals/z:acceptance/genesis-test.sh b/a3p-integration/proposals/z:acceptance/genesis-test.sh new file mode 100755 index 000000000000..ac07d32b2f89 --- /dev/null +++ b/a3p-integration/proposals/z:acceptance/genesis-test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +source /usr/src/upgrade-test-scripts/env_setup.sh + +export_genesis() { + GENESIS_EXPORT_DIR="$1" + shift + GENESIS_HEIGHT_ARG= + + if [ -n "$1" ]; then + GENESIS_HEIGHT_ARG="--height $1" + shift + fi + + agd export --export-dir "$GENESIS_EXPORT_DIR" $GENESIS_HEIGHT_ARG "$@" +} + +killAgd +FORK_TEST_DIR=$(mktemp -t -d fork-test-XXX) +mkdir -p $FORK_TEST_DIR/config +cp /root/.agoric/config/priv_validator_key.json $FORK_TEST_DIR/config +agd --home $FORK_TEST_DIR tendermint unsafe-reset-all + +export_genesis $FORK_TEST_DIR/config +startAgd --home $FORK_TEST_DIR diff --git a/a3p-integration/proposals/z:acceptance/test.sh b/a3p-integration/proposals/z:acceptance/test.sh index f165b2bc6138..2c65f0dec6d7 100755 --- a/a3p-integration/proposals/z:acceptance/test.sh +++ b/a3p-integration/proposals/z:acceptance/test.sh @@ -9,3 +9,5 @@ yarn ava initial.test.js # test more, in ways that change system state GLOBIGNORE=initial.test.js yarn ava ./*.test.js + +./genesis-test.sh