From b7d90838eef83a2fb5cc80065ad1370b6082c11f Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Fri, 21 Jun 2024 23:34:03 +0000 Subject: [PATCH] test(a3p): add genesis fork acceptance test --- .../proposals/z:acceptance/genesis-test.sh | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 a3p-integration/proposals/z:acceptance/genesis-test.sh 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