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 00000000000..b2262e404cf --- /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 0447826a85d..7e4b0145a04 100755 --- a/a3p-integration/proposals/z:acceptance/test.sh +++ b/a3p-integration/proposals/z:acceptance/test.sh @@ -13,3 +13,4 @@ yarn ava ./*.test.js ./create-kread-item-test.sh ./state-sync-snapshots-test.sh +./genesis-test.sh