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 6ef622d
Show file tree
Hide file tree
Showing 2 changed files with 27 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
2 changes: 2 additions & 0 deletions a3p-integration/proposals/z:acceptance/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6ef622d

Please sign in to comment.