-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into TT-1032-replace-gotestfmt
- Loading branch information
Showing
42 changed files
with
1,470 additions
and
1,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Install gauntlet dependencies | ||
description: A GitHub Action to get tool versions and build Gauntlet | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/[email protected] | ||
|
||
- name: Get Tool Versions | ||
uses: smartcontractkit/[email protected] | ||
id: tool-versions | ||
|
||
- name: Setup Node ${{ steps.tool-versions.outputs.nodejs_version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ steps.tool-versions.outputs.nodejs_version }} | ||
|
||
- name: Install Dependencies | ||
run: yarn --cwd ./gauntlet install --frozen-lockfile | ||
shell: bash | ||
|
||
- name: Build Gauntlet | ||
run: yarn --cwd ./gauntlet build | ||
shell: bash | ||
|
||
- name: Run Gauntlet | ||
run: yarn --cwd ./gauntlet gauntlet | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
# Running e2e tests | ||
|
||
The e2e tests run inside of a k8s cluster. They will run against whatever cluster your current kubectl context is set to. This can be an external k8s cluster or a local one (using something like minikube or k3d). | ||
|
||
Note: If running against a local k8s cluster, make sure you have plenty of ram allocated for docker, 12 gb if running individual tests and a lot more if you run parallel test like the ones in `make test_smoke` since it can run multiple tests in parallel | ||
|
||
Steps to run the e2e tests: | ||
|
||
1. Build using the `make build` command if you haven't already built the contracts. | ||
2. Make sure your kubectl context is pointing to the cluster you want to run tests against. | ||
3. Run a test, you have several options | ||
- `make test_smoke` will run the ocr2 e2e tests | ||
- `make test_chaos` will run the chaos tests | ||
|
||
## Env variables | ||
```bash | ||
CHAINLINK_ENV_USER=John; | ||
CHAINLINK_IMAGE={AWS_OIDC}.dkr.ecr.{AWS_REGION}.amazonaws.com/chainlink; | ||
CHAINLINK_VERSION=develop; # Can be SHA | ||
SELECTED_NETWORKS=SIMULATED; | ||
INTERNAL_DOCKER_REPO={AWS_OIDC}.dkr.ecr.{AWS_REGION}.amazonaws.com | ||
TTL=72h; # optional | ||
TEST_LOG_LEVEL=debug # optional | ||
|
||
# Running on testnet | ||
LINK_TOKEN=Dmw5mDvteezKfop9zd3RQbJmZfBATF3QuSqDU66axyts; | ||
PROGRAM_ID_ACCESS_CONTROLLER=9xi644bRR8birboDGdTiwBq3C7VEeR7VuamRYYXCubUW; | ||
PROGRAM_ID_OCR2=cjg3oHmg9uuPsP8D6g29NWvhySJkdYdAo9D25PRbKXJ; | ||
PROGRAM_ID_STORE=HEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHny; | ||
VAULT_ADDRESS=G27m7KxTh4KVLapxB9MXfEA8HLUfYuGYQ1ELEs2zQdiQ; | ||
PRIVATE_KEY=[123, 123, ...]; | ||
RPC_URL=https://api.devnet.solana.com; | ||
WS_URL=wss://api.devnet.solana.com/; | ||
``` | ||
|
||
You can always look at the [Makefile](../Makefile) in this repo to see other commands or tests that have been added since this readme was last updated. | ||
# Running tests | ||
|
||
## Installation | ||
`make build && make install` | ||
|
||
|
||
## Configuration | ||
The main test config logic resides in the `integration-tests/testconfig/` directory. Everything is configured using TOML. The minimum OCR2 required values can be located at `integration-tests/testconfig/default.toml`, these values default to running the tests locally in docker using devnet. | ||
|
||
### Combinations | ||
There are a few possibile combinations to run tests that we support. | ||
|
||
**Devnet** | ||
Devnet requires previously deployed programs that are owned by the person running the tests. The program ID's are required for testnet, but ignored in localnet. | ||
|
||
- `Common.network` needs to be set to `devnet` which will instruct the tests to run against devnet | ||
- `ocr2_program_id`, `access_controller_program_id`, `store_program_id`, `link_token_address`, `vault_address` need to be set so the tests know what programs to use so we avoid deploying each time. | ||
- `rpc_url` and `ws_url` need to be set | ||
|
||
**Localnet** | ||
Setting localnet will instruct the tests to run in localnet, the program ID's are not taken from the TOML in this scenario, but rather defined in the `integration-tests/config/config.go`. | ||
|
||
**K8s** | ||
|
||
Running in Kubernetes will require aws auth. | ||
|
||
- `Common.inside_k8` needs to be set to true if you want to run the tests in k8 | ||
|
||
### Overrides | ||
|
||
By default all values are pulled either from `default.toml` or if we create an `overrides.toml` where we want to set new values or override existing values. Both `default.toml` and `overrides.toml` will end up being merged where values that are set in both files will be taken based on the value in `overrides.toml`. | ||
|
||
## Run tests | ||
|
||
`cd integration-tests/smoke && go test -timeout 24h -count=1 -run TestSolanaOCRV2Smoke -test.timeout 30m;` | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
gauntlet/packages/gauntlet-solana-contracts/networks/.env.devnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.