Skip to content

Commit

Permalink
Renaming to align with core
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Oct 23, 2024
1 parent 401b636 commit 4deda0e
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ccip-client-compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ jobs:
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@d38226be720c5ccc1ff4d3cee40608ebf264cd59 # v2.3.26
env:
BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=2 ${{ matrix.evm_node.run }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ccip-live-network-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ jobs:
echo ::add-mask::$SLACK_USER
echo "SLACK_USER=$SLACK_USER" >> "$GITHUB_ENV"
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.event_name }}" == "schedule" ]]; then
BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/${{ matrix.config }})
echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
BASE64_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/${{ matrix.config }})
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
echo "SLACK_USER=${{ secrets.QA_SLACK_USER }}" >> $GITHUB_ENV
fi
- name: step summary
Expand Down Expand Up @@ -212,8 +212,8 @@ jobs:
RR_CPU: 4
DETACH_RUNNER: true
TEST_TRIGGERED_BY: ccip-load-test-ci
BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/6vjVx-1V8/ccip-long-running-tests"
with:
test_command_to_run: cd ./integration-tests/ccip-tests && go test -v -timeout 70m -count=1 -json -run ^TestLoadCCIPStableRPS$ ./load 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false
Expand Down Expand Up @@ -338,14 +338,14 @@ jobs:
echo ::add-mask::$SLACK_USER
echo "SLACK_USER=$SLACK_USER" >> "$GITHUB_ENV"
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
BASE64_CCIP_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
BASE64_CONFIG_OVERRIDE=$(jq -r '.inputs.base64_test_input' $GITHUB_EVENT_PATH)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.event_name }}" == "schedule" ]]; then
BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/mainnet.toml)
echo ::add-mask::$BASE64_CCIP_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CCIP_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
BASE64_CONFIG_OVERRIDE=$(base64 -w 0 -i ./integration-tests/ccip-tests/testconfig/override/mainnet.toml)
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
echo "base_64_override=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_OUTPUT
echo "SLACK_USER=${{ secrets.QA_SLACK_USER }}" >> $GITHUB_ENV
fi
- name: step summary
Expand Down Expand Up @@ -374,8 +374,8 @@ jobs:
RR_MEM: 8Gi
RR_CPU: 4
TEST_TRIGGERED_BY: ccip-smoke-test-ci
BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.setup_create_base64_config_ccip.outputs.base64_config }},${{ steps.set_override_config.outputs.base_64_override }}
E2E_TEST_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs"
OVERRIDE_NETWORK_PAIRS: ${{ matrix.lanes.pairs }}
OVERRIDE_PHASE_TIMEOUT: ${{ matrix.lanes.phaseTimeout }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ccip-offchain-upgrade-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ jobs:
if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32
env:
BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
ENV_JOB_IMAGE: ${{ env.ENV_JOB_IMAGE_BASE }}:${{ github.sha }}
TEST_SUITE: smoke
TEST_ARGS: -test.timeout 30m
Expand Down Expand Up @@ -371,8 +371,8 @@ jobs:
if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@94cb11f4bd545607a2f221c6685052b3abee723d # v2.3.32
env:
BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CCIP_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
TEST_BASE64_CONFIG_OVERRIDE: ${{ steps.set_override_config.outputs.base_64_override }},${{ steps.setup_create_base64_config_ccip.outputs.base64_config }}
ENV_JOB_IMAGE: ${{ env.ENV_JOB_IMAGE_BASE }}:${{ github.sha }}
TEST_SUITE: load
TEST_ARGS: -test.timeout 1h
Expand Down
12 changes: 6 additions & 6 deletions integration-tests/ccip-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
set_config:
if [ -s "$(override_toml)" ]; then \
echo "Overriding config with $(override_toml)"; \
echo "export BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/.env; \
echo "export TEST_BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/.env; \
echo "BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/debug.env; \
echo "TEST_BASE64_CCIP_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/debug.env; \
echo "export BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/.env; \
echo "export TEST_BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/.env; \
echo "BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" > ./testconfig/override/debug.env; \
echo "TEST_BASE64_CONFIG_OVERRIDE=$$(base64 -i $(override_toml))" >> ./testconfig/override/debug.env; \
else \
echo "No override config found, using default config"; \
echo > ./testconfig/override/.env; \
Expand Down Expand Up @@ -52,8 +52,8 @@ test_smoke_ccip: set_config
test_smoke_ccip_default: set_config
source ./testconfig/override/.env && \
DATABASE_URL=postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable \
BASE64_CCIP_CONFIG_OVERRIDE="" \
TEST_BASE64_CCIP_CONFIG_OVERRIDE="" \
BASE64_CONFIG_OVERRIDE="" \
TEST_BASE64_CONFIG_OVERRIDE="" \
ENV_JOB_IMAGE="" \
TEST_SUITE=smoke \
TEST_ARGS="-test.timeout 900h" \
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/ccip-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CCIP tests are designed to be highly configurable. Instead of writing many tests

1. Default test input - set via TOML - If no specific input is set; the tests will run with default inputs mentioned in [default.toml](./testconfig/tomls/ccip-default.toml).
Please refer to the [testconfig README](../testconfig/README.md) for a more detailed look at how testconfig works.
2. If you want to run your test with a different config, you can override the default inputs. You can either write an [overrides.toml](../testconfig/README.md#configuration-and-overrides) file, or set the env var `BASE64_CCIP_CONFIG_OVERRIDE` containing the base64 encoded TOML file content with updated test input parameters.
2. If you want to run your test with a different config, you can override the default inputs. You can either write an [overrides.toml](../testconfig/README.md#configuration-and-overrides) file, or set the env var `BASE64_CONFIG_OVERRIDE` containing the base64 encoded TOML file content with updated test input parameters.
For example, if you want to override the `Network` input in test and want to run your test on `avalanche testnet` and `arbitrum goerli` network, you need to:
1. Create a TOML file with the following content:

Expand All @@ -20,18 +20,18 @@ For example, if you want to override the `Network` input in test and want to run
```

2. Encode it using the `base64` command
3. Set the env var `BASE64_CCIP_CONFIG_OVERRIDE` with the encoded content.
3. Set the env var `BASE64_CONFIG_OVERRIDE` with the encoded content.

```bash
export BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -i <path-to-override-toml-file>)
export BASE64_CONFIG_OVERRIDE=$(base64 -i <path-to-override-toml-file>)
```

[mainnet.toml](./testconfig/override/mainnet.toml), [override.toml](./testconfig/examples/override.toml.example) are some of the sample override TOML files.

For example - In order to run the smoke test (TestSmokeCCIPForBidirectionalLane) on mainnet, run the test with following env var set:

```bash
export BASE64_CCIP_CONFIG_OVERRIDE=$(base64 -i ./testconfig/override/mainnet.toml)
export BASE64_CONFIG_OVERRIDE=$(base64 -i ./testconfig/override/mainnet.toml)
```

3. Secrets - You also need to set some secrets. This is a mandatory step needed to run the tests. Please refer to [.testsecrets.example](./examples/.testsecrets.example) for the list of secrets and instruction how to set them up.
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/ccip-tests/testconfig/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

const (
OVERIDECONFIG = "BASE64_CCIP_CONFIG_OVERRIDE"
OVERIDECONFIG = "BASE64_CONFIG_OVERRIDE"
ErrReadConfig = "failed to read TOML config"
ErrUnmarshalConfig = "failed to unmarshal TOML config"
Load string = "load"
Expand Down

0 comments on commit 4deda0e

Please sign in to comment.