Skip to content

Commit

Permalink
newlines and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Jun 24, 2024
1 parent 5f6935f commit 1f4987c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/execute_advanced_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ jobs:
- name: Full Log Dump On Failure
if: failure()
run: |
make stop-localnet
make stop-localnet
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ TEST_BUILD_FLAGS := -tags pebbledb,ledger
HSM_BUILD_FLAGS := -tags pebbledb,ledger,hsm_test

export DOCKER_BUILDKIT := 1

# parameters for localnet docker compose files
# set defaults to empty to prevent docker warning
export LOCALNET_MODE
export E2E_ARGS := $(E2E_ARGS)
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/docker-compose-stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ services:
- HOTKEY_PASSWORD=password # test purposes only
volumes:
- ssh:/root/.ssh
- preparams:/root/preparams
- preparams:/root/preparams
2 changes: 1 addition & 1 deletion contrib/localnet/docker-compose-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ services:
environment:
- UPGRADE_HEIGHT=${UPGRADE_HEIGHT}
volumes:
- ssh:/root/.ssh
- ssh:/root/.ssh
2 changes: 1 addition & 1 deletion contrib/localnet/scripts/import-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ mkdir ~/.zetacored/genesis_data
echo "Download Latest State Export"
LATEST_EXPORT_URL=$(curl https://snapshots.zetachain.com/latest-state-export | jq -r ."${NETWORK}")
echo "LATEST EXPORT URL: ${LATEST_EXPORT_URL}"
wget -q ${LATEST_EXPORT_URL} -O ~/.zetacored/genesis_data/exported-genesis.json
wget -q ${LATEST_EXPORT_URL} -O ~/.zetacored/genesis_data/exported-genesis.json
19 changes: 12 additions & 7 deletions docs/development/LOCAL_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ Now we have built all the docker images, we can run the e2e test with make comma
make start-e2e-test
```

This uses `docker compose` to start the localnet and run standard e2e tests inside the orchestrator container. There are several parameters that the `Makefile` can provide to `docker compose` via environment variables:

- `LOCALNET_MODE`
- `setup-only`: only setup the localnet, do not run the e2e tests
- `upgrade`: run the upgrade tests
- unset: run the e2e tests
- `E2E_ARGS`: arguments to provide to the `zetae2e local` command
- `UPGRADE_HEIGHT`: block height to upgrade at when `LOCALNET_MODE=upgrade`
- `ZETACORED_IMPORT_GENESIS_DATA`: path to genesis data to import before starting zetacored
- `ZETACORED_START_PERIOD`: duration to tolerate `zetacored` health check failures during startup

#### Run admin functions e2e tests

We define e2e tests allowing to test admin functionalities (emergency network pause for example).
Expand All @@ -42,13 +53,7 @@ make start-e2e-admin-test
Upgrade tests run the E2E tests with an older version, upgrade the nodes to the new version, and run the E2E tests again.
This allows testing the upgrade process with a populated state.

Before running the upgrade tests, the versions must be specified in `Dockefile-upgrade`:

```dockerfile
ARG OLD_VERSION=v{old_major_version}.{old_minor_version}.{old_patch_version}
ENV NEW_VERSION=v{new_major_version}
```
The new version must match the version specified in `app/setup_handlers.go`
Before running the upgrade tests, the old version must be specified the Makefile.

NOTE: We only specify the major version for `NEW_VERSION` since we use major version only for chain upgrade. Semver is needed for `OLD_VERSION` because we use this value to fetch the release tag from the GitHub repository.

Expand Down

0 comments on commit 1f4987c

Please sign in to comment.