Skip to content

Commit

Permalink
test(a3p): add genesis fork acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Jun 21, 2024
1 parent f2987cb commit b7d9083
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions a3p-integration/proposals/z:acceptance/genesis-test.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b7d9083

Please sign in to comment.