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 25, 2024
1 parent f476bd5 commit 17a5374
Show file tree
Hide file tree
Showing 2 changed files with 26 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"
1 change: 1 addition & 0 deletions a3p-integration/proposals/z:acceptance/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ yarn ava ./*.test.js
./create-kread-item-test.sh

./state-sync-snapshots-test.sh
./genesis-test.sh

0 comments on commit 17a5374

Please sign in to comment.