Skip to content

Commit

Permalink
Merge branch 'fix-coreth-wallet-dep' of github.com:ava-labs/avalanche…
Browse files Browse the repository at this point in the history
…go into fix-coreth-wallet-dep
  • Loading branch information
ceyonur committed Dec 24, 2024
2 parents 5d45cc5 + 420361a commit fe32171
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/trigger-antithesis-avalanchego.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: Run Antithesis Avalanchego Test Setup
runs-on: ubuntu-latest
steps:
- uses: antithesishq/antithesis-trigger-action@v0.5
- uses: antithesishq/antithesis-trigger-action@v0.6
with:
notebook_name: avalanche
tenant: avalanche
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-antithesis-xsvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: Run Antithesis XSVM Test Setup
runs-on: ubuntu-latest
steps:
- uses: antithesishq/antithesis-trigger-action@v0.5
- uses: antithesishq/antithesis-trigger-action@v0.6
with:
notebook_name: avalanche
tenant: avalanche
Expand Down
6 changes: 6 additions & 0 deletions scripts/ginkgo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

# If an explicit version is not specified, go run uses the ginkgo version from go.mod
go run github.com/onsi/ginkgo/v2/ginkgo "${@}"
5 changes: 1 addition & 4 deletions scripts/tests.e2e.bootstrap_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,4 @@ ensure_command "kind-with-registry.sh" "https://raw.githubusercontent.com/kubern
# call them without a qualifying path.
PATH="${PWD}/bin:$PATH" bash -x "${PWD}/bin/kind-with-registry.sh"

# TODO(marun) Factor out ginkgo installation to avoid duplicating it across test scripts
go install -v github.com/onsi/ginkgo/v2/[email protected]

KUBECONFIG="$HOME/.kube/config" PATH="${PWD}/bin:$PATH" ginkgo -v ./tests/fixture/bootstrapmonitor/e2e
KUBECONFIG="$HOME/.kube/config" PATH="${PWD}/bin:$PATH" ./scripts/ginkgo.sh -v ./tests/fixture/bootstrapmonitor/e2e
2 changes: 1 addition & 1 deletion scripts/tests.e2e.existing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function print_separator {
function cleanup {
print_separator
echo "cleaning up reusable network"
ginkgo -v ./tests/e2e/e2e.test -- --stop-network
./scripts/ginkgo.sh -v ./tests/e2e -- --stop-network
}
trap cleanup EXIT

Expand Down
9 changes: 1 addition & 8 deletions scripts/tests.e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ fi
# the instructions to build non-portable BLST.
source ./scripts/constants.sh

#################################
echo "building e2e.test"
# to install the ginkgo binary (required for test build and run)
go install -v github.com/onsi/ginkgo/v2/[email protected]
ACK_GINKGO_RC=true ginkgo build ./tests/e2e
./tests/e2e/e2e.test --help

# Enable subnet testing by building xsvm
./scripts/build_xsvm.sh
echo ""
Expand Down Expand Up @@ -66,4 +59,4 @@ fi

#################################
# shellcheck disable=SC2086
ginkgo ${GINKGO_ARGS} -v ./tests/e2e/e2e.test -- "${E2E_ARGS[@]}" "${@}"
./scripts/ginkgo.sh ${GINKGO_ARGS} -v ./tests/e2e -- "${E2E_ARGS[@]}" "${@}"
10 changes: 1 addition & 9 deletions scripts/tests.upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,9 @@ find "/tmp/avalanchego-v${VERSION}"
# the instructions to build non-portable BLST.
source ./scripts/constants.sh

#################################
echo "building upgrade.test"
# to install the ginkgo binary (required for test build and run)
go install -v github.com/onsi/ginkgo/v2/[email protected]
ACK_GINKGO_RC=true ginkgo build ./tests/upgrade
./tests/upgrade/upgrade.test --help

#################################
# By default, it runs all upgrade test cases!
echo "running upgrade tests against the local cluster with ${AVALANCHEGO_PATH}"
./tests/upgrade/upgrade.test \
--ginkgo.v \
./scripts/ginkgo.sh -v ./tests/upgrade -- \
--avalanchego-path="/tmp/avalanchego-v${VERSION}/avalanchego" \
--avalanchego-path-to-upgrade-to="${AVALANCHEGO_PATH}"
26 changes: 9 additions & 17 deletions tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
## Running tests

```bash
go install -v github.com/onsi/ginkgo/v2/[email protected]
ACK_GINKGO_RC=true ginkgo build ./tests/e2e
./tests/e2e/e2e.test --help

./tests/e2e/e2e.test \
--avalanchego-path=./build/avalanchego
./scripts/build.sh # Builds avalanchego for use in deploying a test network
./scripts/build_xsvm.sh # Builds xsvm for use in deploying a test network with a subnet
./scripts/ginkgo.sh -v ./tests/e2e -- --avalanchego-path=./build/avalanchego
```

See [`tests.e2e.sh`](../../scripts/tests.e2e.sh) for an example.
Expand All @@ -27,9 +24,7 @@ primarily target the X-Chain:


```bash
./tests/e2e/e2e.test \
--avalanchego-path=./build/avalanchego \
--ginkgo.label-filter=x
./scripts/ginkgo.sh -v --label-filter=x ./tests/e2e -- --avalanchego-path=./build/avalanchego
```

The ginkgo docs provide further detail on [how to compose label
Expand All @@ -45,17 +40,14 @@ Create a new package to implement feature-specific tests, or add tests to an exi
tests
└── e2e
├── README.md
├── e2e.go
├── e2e_test.go
└── x
└── transfer.go
└── virtuous.go
```

`e2e.go` defines common configuration for other test
packages. `x/transfer/virtuous.go` defines X-Chain transfer tests,
labeled with `x`, which can be selected by `./tests/e2e/e2e.test
--ginkgo.label-filter "x"`.
`x/transfer/virtuous.go` defines X-Chain transfer tests,
labeled with `x`, which can be selected by `--label-filter=x`.

## Reusing temporary networks

Expand All @@ -70,7 +62,7 @@ To enable network reuse across test runs, pass `--reuse-network` as an
argument to the test suite:

```bash
ginkgo -v ./tests/e2e -- --avalanchego-path=/path/to/avalanchego --reuse-network
./scripts/gingko.sh -v ./tests/e2e -- --avalanchego-path=/path/to/avalanchego --reuse-network
```

If a network is not already running the first time the suite runs with
Expand All @@ -93,7 +85,7 @@ To stop a network configured for reuse, invoke the test suite with the
immediately without executing any tests:

```bash
ginkgo -v ./tests/e2e -- --stop-network
./scripts/gingko.sh -v ./tests/e2e -- --stop-network
```

## Skipping bootstrap checks
Expand All @@ -105,5 +97,5 @@ these bootstrap checks during development, set the
`E2E_SKIP_BOOTSTRAP_CHECKS` env var to a non-empty value:

```bash
E2E_SKIP_BOOTSTRAP_CHECKS=1 ginkgo -v ./tests/e2e ...
E2E_SKIP_BOOTSTRAP_CHECKS=1 ./scripts/ginkgo.sh -v ./tests/e2e ...
```

0 comments on commit fe32171

Please sign in to comment.