From f691a169bc77ebb0cf07d62a93bd3a360d82796a Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 11:19:02 -0800 Subject: [PATCH 01/30] chore: skip unnecessary tests --- .github/workflows/integration-in-memory-tests.yml | 3 ++- .github/workflows/integration-tests.yml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-in-memory-tests.yml b/.github/workflows/integration-in-memory-tests.yml index e21de702571..ebdb9fd9d6d 100644 --- a/.github/workflows/integration-in-memory-tests.yml +++ b/.github/workflows/integration-in-memory-tests.yml @@ -81,7 +81,8 @@ jobs: id-token: write contents: read needs: changes - if: github.event_name == 'pull_request' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') + if: false + # if: github.event_name == 'pull_request' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true') uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@9874c1f4ab4a4c70433df6d8f862044ca18456df # 2025-11-26 with: workflow_name: Run CCIP Integration Tests For PR diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index dddaa80f231..17bd3420d13 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -137,7 +137,8 @@ jobs: labels: name: Get PR labels and set runner labels - if: github.actor != 'dependabot[bot]' + # if: github.actor != 'dependabot[bot]' + if: false runs-on: ubuntu-latest permissions: contents: read @@ -192,7 +193,8 @@ jobs: build-chainlink: name: Build Chainlink Image ${{ matrix.image.name }} - if: github.actor != 'dependabot[bot]' + # if: github.actor != 'dependabot[bot]' + if: false environment: integration runs-on: ${{ matrix.image.runner }} needs: From 0a0343d758eeeea9f1a1b5a1da1d908ae152eca1 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 11:19:52 -0800 Subject: [PATCH 02/30] chore: updates to test scripts --- tools/bin/go_core_ccip_deployment_tests | 16 ++++++++++------ tools/bin/go_core_tests | 17 +++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/tools/bin/go_core_ccip_deployment_tests b/tools/bin/go_core_ccip_deployment_tests index b453b1e17ec..9a3d61e8522 100755 --- a/tools/bin/go_core_ccip_deployment_tests +++ b/tools/bin/go_core_ccip_deployment_tests @@ -6,6 +6,7 @@ SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} JUNIT_FILE=${JUNIT_FILE:-"./junit.xml"} GO_TEST_TIMEOUT=${GO_TEST_TIMEOUT:-"15m"} + # Adjusting freeport port block size for tests. export CL_RESERVE_PORTS=128 @@ -17,16 +18,19 @@ PATH=$PATH:$(go env GOPATH)/bin export PATH echo "Running go_core_ccip_deployment_tests for event: $GITHUB_EVENT_NAME" -GO_TEST_FLAGS="-timeout=${GO_TEST_TIMEOUT}" + +GO_TEST_FLAGS=( "-timeout=${GO_TEST_TIMEOUT}" ) + if [[ "$GITHUB_EVENT_NAME" == 'push' ]]; then - GO_TEST_FLAGS="$GO_TEST_FLAGS -count=1" + GO_TEST_FLAGS+=( "-count=1" ) elif [[ "$GITHUB_EVENT_NAME" == 'schedule' ]]; then - GO_TEST_FLAGS="$GO_TEST_FLAGS -covermode=atomic -coverpkg=./... -coverprofile=coverage.txt" + GO_TEST_FLAGS+=( "-covermode=atomic" "-coverpkg=./..." "-coverprofile=coverage.txt" ) elif [[ "$GITHUB_EVENT_NAME" == 'pull_request' || "$GITHUB_EVENT_NAME" == 'merge_group' ]]; then RERUN_FLAGS="" if [[ "$TRUNK_AUTO_QUARANTINE" != "true" ]]; then echo "TRUNK_AUTO_QUARANTINE disabled, allowing for gotestsum to rerun failed tests" - RERUN_FLAGS="--rerun-fails-abort-on-data-race --rerun-fails=3" + # TODO: Change back to 3 + RERUN_FLAGS="--rerun-fails-abort-on-data-race --rerun-fails=0" else echo "TRUNK_AUTO_QUARANTINE enabled, gotestsum will not rerun failed tests" fi @@ -36,7 +40,7 @@ if [[ "$PRODUCE_JUNIT_XML" == "true" ]]; then JUNIT_FLAG="--junitfile=$JUNIT_FILE" fi -echo "Using GO_TEST_FLAGS: $GO_TEST_FLAGS" +echo "Using GO_TEST_FLAGS: ${GO_TEST_FLAGS[*]}" echo "Using RERUN_FLAGS: $RERUN_FLAGS" echo "Using JUNIT_FLAG: $JUNIT_FLAG" @@ -52,7 +56,7 @@ gotestsum \ --packages='./...' \ --jsonfile "$OUTPUT_FILE" \ "$JUNIT_FLAG" \ - -- $GO_TEST_FLAGS + -- "${GO_TEST_FLAGS[@]}" EXITCODE=${PIPESTATUS[0]} diff --git a/tools/bin/go_core_tests b/tools/bin/go_core_tests index 5a2968f9a43..e29bda76bef 100755 --- a/tools/bin/go_core_tests +++ b/tools/bin/go_core_tests @@ -13,18 +13,19 @@ PATH=$PATH:$(go env GOPATH)/bin export PATH echo "Running go_core_tests for event: $GITHUB_EVENT_NAME" -GO_TEST_FLAGS="-timeout=${GO_TEST_TIMEOUT}" -# Temporary reduction in concurrent packages to reduce RAM usage -GO_TEST_FLAGS="$GO_TEST_FLAGS -p=4" + +GO_TEST_FLAGS=( "-timeout=${GO_TEST_TIMEOUT}" ) + if [[ "$GITHUB_EVENT_NAME" == 'push' ]]; then - GO_TEST_FLAGS="$GO_TEST_FLAGS -count=1" + GO_TEST_FLAGS+=( "-count=1" ) elif [[ "$GITHUB_EVENT_NAME" == 'schedule' ]]; then - GO_TEST_FLAGS="$GO_TEST_FLAGS -covermode=atomic -coverpkg=./... -coverprofile=coverage.txt" + GO_TEST_FLAGS+=( "-covermode=atomic" "-coverpkg=./..." "-coverprofile=coverage.txt" ) elif [[ "$GITHUB_EVENT_NAME" == 'pull_request' || "$GITHUB_EVENT_NAME" == 'merge_group' ]]; then RERUN_FLAGS="" if [[ "$TRUNK_AUTO_QUARANTINE" != "true" ]]; then echo "TRUNK_AUTO_QUARANTINE disabled, allowing for gotestsum to rerun failed tests" - RERUN_FLAGS="--rerun-fails-abort-on-data-race --rerun-fails=3" + # TODO: Change back to 3 + RERUN_FLAGS="--rerun-fails-abort-on-data-race --rerun-fails=0" else echo "TRUNK_AUTO_QUARANTINE enabled, gotestsum will not rerun failed tests" fi @@ -34,7 +35,7 @@ if [[ "$PRODUCE_JUNIT_XML" == "true" ]]; then JUNIT_FLAG="--junitfile=$JUNIT_FILE" fi -echo "Using GO_TEST_FLAGS: $GO_TEST_FLAGS" +echo "Using GO_TEST_FLAGS: ${GO_TEST_FLAGS[*]}" echo "Using RERUN_FLAGS: $RERUN_FLAGS" echo "Using JUNIT_FLAG: $JUNIT_FLAG" @@ -50,7 +51,7 @@ gotestsum \ --packages='./...' \ --jsonfile "$OUTPUT_FILE" \ "$JUNIT_FLAG" \ - -- $GO_TEST_FLAGS + -- "${GO_TEST_FLAGS[@]}" EXITCODE=${PIPESTATUS[0]} From 3f175b5d9d6dcf519842534c4addab23a5f711e4 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 11:21:24 -0800 Subject: [PATCH 03/30] chore: bump chainlink-common --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 ++-- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 3ad1b2e450e..f04119b3870 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -47,7 +47,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-data-streams v0.1.7 github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 996a41fd9b3..67caaa575e7 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1634,8 +1634,8 @@ github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb09e5363e/go.mod h1:IaoLCQE1miX3iUlQNxOPcVrXrshcO/YsFpxnFuhG9DM= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/deployment/go.mod b/deployment/go.mod index ca1fc86b614..ff66dd06de3 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -42,7 +42,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a diff --git a/deployment/go.sum b/deployment/go.sum index 197115f00fb..8f0cd3affd2 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1358,8 +1358,8 @@ github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb09e5363e/go.mod h1:IaoLCQE1miX3iUlQNxOPcVrXrshcO/YsFpxnFuhG9DM= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/go.mod b/go.mod index da2e45813ba..bff25262b57 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 github.com/smartcontractkit/chainlink-data-streams v0.1.7 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec diff --git a/go.sum b/go.sum index 87cf6b86c93..d22dd9a2bee 100644 --- a/go.sum +++ b/go.sum @@ -1164,8 +1164,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 2c929144d13..93317326efa 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -51,7 +51,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 972961d5a92..4f67aea4db9 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1601,8 +1601,8 @@ github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb09e5363e/go.mod h1:IaoLCQE1miX3iUlQNxOPcVrXrshcO/YsFpxnFuhG9DM= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 94686e81d96..6a85749fbaf 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index cd29b47fc8e..7ff5830fe93 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1580,8 +1580,8 @@ github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb09e5363e/go.mod h1:IaoLCQE1miX3iUlQNxOPcVrXrshcO/YsFpxnFuhG9DM= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index 8857b2a7cc2..f2458bb1e6b 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -33,7 +33,7 @@ require ( github.com/sethvargo/go-retry v0.3.0 github.com/smartcontractkit/chain-selectors v1.0.85 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index 1049998e0fc..889ad53ee3f 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1602,8 +1602,8 @@ github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb09e5363e/go.mod h1:IaoLCQE1miX3iUlQNxOPcVrXrshcO/YsFpxnFuhG9DM= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index 0250c85c94f..88f7d7eeb7a 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -46,7 +46,7 @@ require ( github.com/rs/zerolog v1.34.0 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.85 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f github.com/smartcontractkit/chainlink-data-streams v0.1.7 github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index 071be514210..b0c5ebe92fb 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1799,8 +1799,8 @@ github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20251027185542-babb09e5363e/go.mod h1:IaoLCQE1miX3iUlQNxOPcVrXrshcO/YsFpxnFuhG9DM= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599 h1:0IMjHpzI9mgvGGtmsr1NdRhoXp++gU805f/f9oN94ls= github.com/smartcontractkit/chainlink-ccv v0.0.0-20251210114515-e8434089d599/go.mod h1:Ysd/qkofD0bepk29RS7Q4ZlVDd4yAHXucYsp5gAy6AE= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4 h1:i1Vi+c3Zptqgpvj99IOJZcux6OdYl/2X1QM/fudALP8= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251211140724-319861e514c4/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f h1:t7BjsXN2+cxS0oNyMOC97Vl2VJAh2iKMF7VbQTrCGcs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251212170844-7c3688b0618f/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= From 16d3e97c9766f25b971b2a332ccaf34d5a6f6a45 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 11:25:59 -0800 Subject: [PATCH 04/30] test: create/modify pipelines --- .github/workflows/ci-core.yml | 76 +++--------- .github/workflows/ci-integration.yml | 169 +++++++++++++++++++++++++++ 2 files changed, 182 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/ci-integration.yml diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 863d3183368..ea6200c6baf 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -197,10 +197,6 @@ jobs: fi core: - env: - # We explicitly have this env var not be "CL_DATABASE_URL" to avoid having it be used by core related tests - # when they should not be using it, while still allowing us to DRY up the setup - DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable strategy: fail-fast: false matrix: @@ -208,14 +204,15 @@ jobs: - cmd: go_core_tests os: ${{ needs.runner-config.outputs.core-tests-runner }} should-run: ${{ needs.filter.outputs.should-run-core-tests }} - trunk-auto-quarantine: "true" + # test-suite: "unit" + # trunk-auto-quarantine: "true" - - cmd: go_core_tests_integration - os: ${{ needs.runner-config.outputs.core-tests-integration-runner }} - should-run: ${{ needs.filter.outputs.should-run-core-tests }} - trunk-auto-quarantine: "true" - setup-solana: "true" - install-loopps: "true" + # - cmd: go_core_tests_integration + # os: ${{ needs.runner-config.outputs.core-tests-integration-runner }} + # should-run: ${{ needs.filter.outputs.should-run-core-tests }} + # trunk-auto-quarantine: "true" + # setup-solana: "true" + # install-loopps: "true" - cmd: go_core_fuzz os: ${{ needs.runner-config.outputs.core-fuzz-tests-runner }} @@ -228,14 +225,11 @@ jobs: - cmd: go_core_ccip_deployment_tests os: ${{ needs.runner-config.outputs.deployment-tests-runner }} should-run: ${{ needs.filter.outputs.should-run-deployment-tests }} - trunk-auto-quarantine: "true" go-mod-directory: "deployment/" - setup-solana: "true" - setup-aptos: "true" - install-loopps: "true" - setup-sui: "true" + # test-suite: "unit" + # trunk-auto-quarantine: "true" - name: Core Tests (${{ matrix.type.cmd }}) # Be careful modifying the job name, as it is used to fetch the job URL + name: Core Tests (${{ matrix.type.cmd }}) # We don't directly merge dependabot PRs, so let's not waste the resources if: ${{ github.actor != 'dependabot[bot]' }} needs: [filter, run-frequency, runner-config] @@ -267,34 +261,6 @@ jobs: go-version-file: ${{ matrix.type.go-mod-directory }}go.mod go-module-file: ${{ matrix.type.go-mod-directory }}go.sum - - name: Setup Solana - if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-solana == 'true' }} - uses: ./.github/actions/setup-solana - - - name: Setup Aptos - if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-aptos == 'true' }} - uses: aptos-labs/actions/install-aptos-cli@63740b290d839b87ecfafbcf75ed03a36a54a29f # jan 15, 2025 - with: - CLI_VERSION: 7.10.0 - - - name: Setup Sui CLI v1.61.2 - if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-sui == 'true' }} - uses: ./.github/actions/setup-sui - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - version: mainnet-v1.61.2 - - - name: Setup wasmd - if: ${{ matrix.type.should-run == 'true' }} - uses: ./.github/actions/setup-wasmd - - - name: Setup Postgres - if: ${{ matrix.type.should-run == 'true' }} - uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1 - with: - tmpfs: "true" - image-tag: "16-alpine" - - name: Touching core/web/assets/index.html if: ${{ matrix.type.should-run == 'true' }} run: mkdir -p core/web/assets && touch core/web/assets/index.html @@ -303,16 +269,6 @@ jobs: if: ${{ matrix.type.should-run == 'true' }} run: go mod download - - name: Setup DB - if: ${{ matrix.type.should-run == 'true' }} - run: go run ./core/store/cmd/preparetest - env: - CL_DATABASE_URL: ${{ env.DB_URL }} - - - name: Install LOOP Plugins - if: ${{ matrix.type.should-run == 'true' && matrix.type.install-loopps == 'true' }} - run: make install-plugins - - name: Increase Timeouts for Fuzz/Race # Increase timeouts for scheduled runs only if: ${{ github.event.schedule != '' && matrix.type.should-run == 'true' }} @@ -328,9 +284,9 @@ jobs: id: run-tests shell: bash env: - CL_DATABASE_URL: ${{ env.DB_URL }} + # CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite || '' }} OUTPUT_FILE: ./output.txt - PRODUCE_JUNIT_XML: ${{ matrix.type.trunk-auto-quarantine }} + PRODUCE_JUNIT_XML: "true" TRUNK_AUTO_QUARANTINE: ${{ matrix.type.trunk-auto-quarantine }} RUN_QUARANTINED_TESTS: "true" # always run quarantined tests in CI JUNIT_FILE: ${{ github.workspace }}/junit.xml @@ -367,12 +323,6 @@ jobs: echo "github.event_name: ${{ github.event_name }}" echo "github.ref: ${{ github.ref }}" - - name: Print postgres logs - if: ${{ always() && matrix.type.should-run == 'true' }} - uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1 - with: - print-logs: "true" - - name: Store logs artifacts if: ${{ always() && matrix.type.should-run == 'true' }} uses: actions/upload-artifact@v4 diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml new file mode 100644 index 00000000000..45b468bf64f --- /dev/null +++ b/.github/workflows/ci-integration.yml @@ -0,0 +1,169 @@ +name: CI Core Integration +run-name: CI Core Integration + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +# Run on key branches to make sure integration is good, otherwise run on all PR's +on: + push: + branches: + - develop + - "release/*" + merge_group: + pull_request: + + +jobs: + integration-tests: + # TODO: Enable once tests are added + if: false + name: "${{ matrix.type.module }} (${{matrix.type.test-suite}})" + timeout-minutes: 20 + runs-on: runs-on=${{ github.run_id }}-${{ strategy.job-index }}/${{ matrix.type.os }} + permissions: + id-token: write + contents: read + actions: read + env: + # We explicitly have this env var not be "CL_DATABASE_URL" to avoid having it be used by core related tests + # when they should not be using it, while still allowing us to DRY up the setup + DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable + + strategy: + fail-fast: false + matrix: + type: + - module: Core + test-suite: "with-db" + cmd: go_core_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + + - module: Deployment + cmd: go_core_ccip_deployment_tests + test-suite: "solana" + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + go-mod-directory: "deployment/" + setup-solana: "true" + # setup-loopps: "true" + + - module: Deployment + test-suite: "aptos" + cmd: go_core_ccip_deployment_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + go-mod-directory: "deployment/" + aptos-cli-version: "7.10.0" + # setup-loopps: "true" + + - module: Deployment + test-suite: "with-db" + cmd: go_core_ccip_deployment_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + go-mod-directory: "deployment/" + # setup-loopps: "true" + steps: + - name: Enable S3 Cache for Self-Hosted Runners + # these env vars are set (and exposed) when it is a self-hosted runner with extras=s3-cache + if: ${{ env.RUNS_ON_INSTANCE_ID != '' && env.ACTIONS_CACHE_URL != '' }} + uses: runs-on/action@66d4449b717b5462159659523d1241051ff470b9 # v1 + + - name: Checkout the repo + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Setup Go + uses: ./.github/actions/setup-go + with: + build-cache-version: ${{ matrix.type.cmd }} + go-version-file: ${{ matrix.type.go-mod-directory }}go.mod + go-module-file: ${{ matrix.type.go-mod-directory }}go.sum + + - name: Setup Postgres Container + uses: smartcontractkit/.github/actions/setup-postgres@setup-postgres/v1 + with: + tmpfs: "true" + image-tag: "16-alpine" + + - name: Standard setup commands + env: + CL_DATABASE_URL: ${{ env.DB_URL }} + run: | + echo "::group::Run core/store/cmd/preparetest" + go run ./core/store/cmd/preparetest + echo "::endgroup::" + + echo "::group::Touching core/web/assets/index.html" + mkdir -p core/web/assets && touch core/web/assets/index.html + echo "::endgroup::" + + echo "::group::Download Go vendor packages" + go mod download + echo "::endgroup::" + + - name: Setup Solana + if: ${{ matrix.type.setup-solana == 'true' }} + uses: ./.github/actions/setup-solana + + - name: Setup Aptos + if: ${{ matrix.type.aptos-cli-version != '' }} + uses: aptos-labs/actions/install-aptos-cli@63740b290d839b87ecfafbcf75ed03a36a54a29f # jan 15, 2025 + with: + CLI_VERSION: ${{ matrix.type.aptos-cli-version }} + + - name: Setup Sui CLI v1.57.2 + if: ${{ matrix.type.sui-cli-version != '' }} + uses: ./.github/actions/setup-sui + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + version: ${{ matrix.type.sui-cli-version }} + + - name: Setup wasmd + if: ${{ matrix.type.setup-loopps == 'true' }} + uses: ./.github/actions/setup-wasmd + + - name: Install LOOP Plugins + if: ${{ matrix.type.setup-loopps == 'true' }} + run: make install-plugins + + - name: Run tests + timeout-minutes: 22 + id: run-tests + shell: bash + env: + CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite }} + CL_DATABASE_URL: ${{ env.DB_URL }} + OUTPUT_FILE: ./output.txt + PRODUCE_JUNIT_XML: "true" + JUNIT_FILE: ${{ github.workspace }}/junit.xml + RUN_QUARANTINED_TESTS: "true" # always run quarantined tests in CI + run: | + GODEBUG=goindex=0 ./tools/bin/${{ matrix.type.cmd }} ./... + # See: https://github.com/golang/go/issues/69179 + + - name: Artifact name + id: artifact-name + if: ${{ always() }} + env: + CMD: ${{ matrix.type.cmd }} + REGEX: ${{ matrix.type.regex }} + run: | + REGEX_SANITIZED=$(echo "$REGEX" | sed 's/[\\^$.*+?{}()|\[\]]//g' | tr ' ' '_') + ARTIFACT_NAME="${CMD}_${REGEX_SANITIZED}_logs" + echo "artifact-name=$ARTIFACT_NAME" | tee -a "$GITHUB_OUTPUT" + + - name: Store logs artifacts + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.artifact-name.outputs.artifact-name }} + path: | + ./output.txt + ./output-short.txt + ./race.* + ./coverage.txt + ./postgres_logs.txt + ./junit.xml + ./deployment/junit.xml + retention-days: 7 From 3981124724440655bff879b679d31b9073fff3d2 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 12:02:32 -0800 Subject: [PATCH 05/30] test: tag deployment tests --- deployment/ccip/changeset/v1_5/e2e_test.go | 2 ++ .../v1_5_1/cs_accept_admin_role_test.go | 3 +++ .../v1_5_1/cs_configure_token_pools_test.go | 5 +++++ .../cs_deploy_token_pool_factory_test.go | 2 ++ .../v1_5_1/cs_deploy_token_pools_test.go | 4 ++++ .../v1_5_1/cs_deploy_usdc_token_pools_test.go | 4 ++++ .../cs_fast_transfer_token_pools_test.go | 12 ++++++++++++ .../cs_hybrid_token_pool_groups_test.go | 6 ++++++ .../v1_5_1/cs_propose_admin_role_test.go | 11 +++++++++++ .../ccip/changeset/v1_5_1/cs_set_pool_test.go | 3 +++ .../cs_set_token_transfer_fee_config_test.go | 10 ++++++++++ .../cs_sync_usdc_domains_with_chains_test.go | 2 ++ .../v1_5_1/cs_transfer_admin_role_test.go | 8 ++++++++ .../v1_5_1/cs_update_admin_role_test.go | 6 ++++++ .../changeset/v1_6/accept_ownership_test.go | 2 ++ .../v1_6/cs_active_candidate_test.go | 3 +++ .../ccip/changeset/v1_6/cs_add_lane_test.go | 3 +++ .../v1_6/cs_add_new_chain_e2e_test.go | 5 +++++ .../ccip/changeset/v1_6/cs_ccip_home_test.go | 6 ++++++ .../changeset/v1_6/cs_chain_contracts_test.go | 19 +++++++++++++++++++ .../changeset/v1_6/cs_deploy_chain_test.go | 3 +++ .../ccip/changeset/v1_6/cs_home_chain_test.go | 9 +++++++++ .../ccip/changeset/v1_6/cs_jobspec_test.go | 3 +++ .../v1_6/cs_migration_from_v1_5_test.go | 2 ++ .../cs_translate_onramp_to_feequoter_test.go | 2 ++ .../cs_update_bidirectional_lanes_test.go | 3 +++ ...ure_cctp_message_transmitter_proxy_test.go | 3 +++ .../cs_configure_usdc_token_pool_test.go | 3 +++ ...loy_cctp_message_transmitter_proxy_test.go | 3 +++ .../v1_6_2/cs_deploy_usdc_token_pools_test.go | 5 +++++ .../deployergroup/deployer_group_test.go | 6 ++++++ .../ccip/shared/stateview/state_test.go | 5 +++++ deployment/ccip/shared/stateview/view_test.go | 2 ++ deployment/common/opsutils/evm_test.go | 12 ++++++++++++ .../internal/jdtestutils/client_test.go | 3 +++ deployment/utils/nodetestutils/node_test.go | 2 ++ 36 files changed, 182 insertions(+) diff --git a/deployment/ccip/changeset/v1_5/e2e_test.go b/deployment/ccip/changeset/v1_5/e2e_test.go index cd84a452282..aba9d08b605 100644 --- a/deployment/ccip/changeset/v1_5/e2e_test.go +++ b/deployment/ccip/changeset/v1_5/e2e_test.go @@ -25,11 +25,13 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/rmn_contract" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // This test only works if the destination chain id is 1337 // Otherwise it shows error for offchain and onchain config digest mismatch func TestE2ELegacy(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment( t, testhelpers.WithPrerequisiteDeploymentOnly(&changeset.V1_5DeploymentConfig{ diff --git a/deployment/ccip/changeset/v1_5_1/cs_accept_admin_role_test.go b/deployment/ccip/changeset/v1_5_1/cs_accept_admin_role_test.go index ffcec8a6de7..65a02f1bfe8 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_accept_admin_role_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_accept_admin_role_test.go @@ -8,6 +8,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -20,6 +21,7 @@ import ( func TestAcceptAdminRoleChangeset_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, _, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -120,6 +122,7 @@ func TestAcceptAdminRoleChangeset_Validations(t *testing.T) { } func TestAcceptAdminRoleChangeset_Execution(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, mcmsConfig := range []*proposalutils.TimelockConfig{nil, {MinDelay: 0 * time.Second}} { msg := "Accept admin role with MCMS" if mcmsConfig == nil { diff --git a/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go b/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go index 6c49b7f6313..eeab6728494 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go @@ -30,6 +30,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" ) @@ -141,6 +142,7 @@ func validateSolanaConfig(t *testing.T, state stateview.CCIPOnChainState, solCha func TestValidateRemoteChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { IsEnabled bool @@ -194,6 +196,7 @@ func TestValidateRemoteChains(t *testing.T) { func TestValidateTokenPoolConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, _, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.Test(t), true) @@ -247,6 +250,7 @@ func TestValidateTokenPoolConfig(t *testing.T) { func TestValidateConfigureTokenPoolContractsConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 2), @@ -347,6 +351,7 @@ func TestValidateConfigureTokenPoolContractsConfig(t *testing.T) { func TestValidateConfigureTokenPoolContracts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") type regPass struct { SelectorA2B v1_5_1.RateLimiterConfig diff --git a/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pool_factory_test.go b/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pool_factory_test.go index b36e699c492..8d665fdf9e8 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pool_factory_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pool_factory_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -27,6 +28,7 @@ import ( func TestDeployTokenPoolFactoryChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { Msg string diff --git a/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pools_test.go b/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pools_test.go index 8d171d1bcc4..d6f2690ecd6 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pools_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_deploy_token_pools_test.go @@ -17,6 +17,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -28,6 +29,7 @@ import ( func TestValidateDeployTokenPoolContractsConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 2), @@ -99,6 +101,7 @@ func TestValidateDeployTokenPoolContractsConfig(t *testing.T) { func TestValidateDeployTokenPoolInput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, _, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.Test(t), true) acceptLiquidity := false @@ -231,6 +234,7 @@ func TestValidateDeployTokenPoolInput(t *testing.T) { func TestDeployTokenPoolContracts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") acceptLiquidity := false diff --git a/deployment/ccip/changeset/v1_5_1/cs_deploy_usdc_token_pools_test.go b/deployment/ccip/changeset/v1_5_1/cs_deploy_usdc_token_pools_test.go index 7fc132284bc..cdbe446eed7 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_deploy_usdc_token_pools_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_deploy_usdc_token_pools_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/burn_mint_erc677" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -87,6 +88,7 @@ func deployUSDCPrerequisites( func TestValidateDeployUSDCTokenPoolContractsConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 2), @@ -138,6 +140,7 @@ func TestValidateDeployUSDCTokenPoolContractsConfig(t *testing.T) { func TestValidateDeployUSDCTokenPoolInput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector e, err := environment.New(t.Context(), @@ -240,6 +243,7 @@ func TestValidateDeployUSDCTokenPoolInput(t *testing.T) { func TestDeployUSDCTokenPoolContracts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") for _, numRuns := range []int{1, 2} { t.Run(fmt.Sprintf("Run deployment %d time(s)", numRuns), func(t *testing.T) { diff --git a/deployment/ccip/changeset/v1_5_1/cs_fast_transfer_token_pools_test.go b/deployment/ccip/changeset/v1_5_1/cs_fast_transfer_token_pools_test.go index 46234224bd3..8ea98b39bef 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_fast_transfer_token_pools_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_fast_transfer_token_pools_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -20,6 +21,7 @@ import ( ) func TestFastTransferUpdateLaneConfigChangeset_ValidationErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -91,6 +93,7 @@ func TestFastTransferUpdateLaneConfigChangeset_ValidationErrors(t *testing.T) { } func TestFastTransferFillerAllowlistChangeset_ValidationErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -168,6 +171,7 @@ func TestFastTransferFillerAllowlistChangeset_ValidationErrors(t *testing.T) { } func TestFastTransferFillerAllowlistChangeset_RemoveFillers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -290,6 +294,7 @@ func TestFastTransferFillerAllowlistChangeset_RemoveFillers(t *testing.T) { } func TestFastTransferFillerAllowlistChangeset_AddAndRemoveSimultaneously(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -490,6 +495,7 @@ var testCases = []testCase{ } func TestFastTransferUpdateLaneConfigChangeset_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), tc.mcmsEnabled) @@ -558,6 +564,7 @@ func TestFastTransferUpdateLaneConfigChangeset_WithMCMS(t *testing.T) { } func TestFastTransferFillerAllowlistChangeset_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), tc.mcmsEnabled) @@ -621,6 +628,7 @@ func TestFastTransferFillerAllowlistChangeset_WithMCMS(t *testing.T) { } func TestFastTransferUpdateLaneConfigChangeset_EdgeCases(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -800,6 +808,7 @@ func TestFastTransferUpdateLaneConfigChangeset_EdgeCases(t *testing.T) { } func TestFastTransferFillerAllowlistChangeset_DuplicateFillerValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -858,6 +867,7 @@ func TestFastTransferFillerAllowlistChangeset_DuplicateFillerValidation(t *testi } func TestFastTransferUpdateLaneConfigChangeset_SettlementOverheadGasAndCustomExtraArgs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ @@ -979,6 +989,7 @@ func TestFastTransferUpdateLaneConfigChangeset_SettlementOverheadGasAndCustomExt } func TestFastTransferUpdateLaneConfigChangeset_DestinationPoolTypeAndVersion(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) // Deploy different types of pools on different chains @@ -1120,6 +1131,7 @@ func TestFastTransferUpdateLaneConfigChangeset_DestinationPoolTypeAndVersion(t * } func TestFastTransferUpdateLaneConfigChangeset_ValidationErrors_DestinationFields(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) e = testhelpers.DeployTestTokenPools(t, e, map[uint64]v1_5_1.DeployTokenPoolInput{ diff --git a/deployment/ccip/changeset/v1_5_1/cs_hybrid_token_pool_groups_test.go b/deployment/ccip/changeset/v1_5_1/cs_hybrid_token_pool_groups_test.go index dfb4f579fad..b345c7e532a 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_hybrid_token_pool_groups_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_hybrid_token_pool_groups_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_1/token_pool" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // configureHybridTokenPoolChains sets up supported chains for hybrid token pools @@ -68,6 +69,7 @@ func configureHybridTokenPoolChains(t *testing.T, e cldf.Environment, selectorA, } func TestHybridTokenPoolUpdateGroupsChangeset_ValidationErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) externalMinterA, _ := testhelpers.DeployTokenGovernor(t, e, selectorA, tokens[selectorA].Address) @@ -209,6 +211,7 @@ func TestHybridTokenPoolUpdateGroupsChangeset_ValidationErrors(t *testing.T) { } func TestHybridTokenPoolUpdateGroupsChangeset_BasicUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) externalMinterA, _ := testhelpers.DeployTokenGovernor(t, e, selectorA, tokens[selectorA].Address) @@ -312,6 +315,7 @@ func TestHybridTokenPoolUpdateGroupsChangeset_BasicUpdates(t *testing.T) { } func TestHybridTokenPoolUpdateGroupsChangeset_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string mcmsEnabled bool @@ -406,6 +410,7 @@ func TestHybridTokenPoolUpdateGroupsChangeset_WithMCMS(t *testing.T) { } func TestHybridTokenPoolUpdateGroupsChangeset_EdgeCases(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) externalMinterA, _ := testhelpers.DeployTokenGovernor(t, e, selectorA, tokens[selectorA].Address) @@ -455,6 +460,7 @@ func TestHybridTokenPoolUpdateGroupsChangeset_EdgeCases(t *testing.T) { } func TestHybridTokenPoolUpdateGroupsChangeset_NoOpUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) externalMinterA, _ := testhelpers.DeployTokenGovernor(t, e, selectorA, tokens[selectorA].Address) diff --git a/deployment/ccip/changeset/v1_5_1/cs_propose_admin_role_test.go b/deployment/ccip/changeset/v1_5_1/cs_propose_admin_role_test.go index 69f45a35154..0c43b4b6354 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_propose_admin_role_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_propose_admin_role_test.go @@ -10,6 +10,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -22,6 +23,7 @@ import ( func TestProposeAdminRoleChangeset_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, _, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -161,6 +163,7 @@ func TestProposeAdminRoleChangeset_Validations(t *testing.T) { } func TestProposeAdminRoleChangeset_ExecutionWithoutExternalAdmin(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, mcmsConfig := range []*proposalutils.TimelockConfig{nil, {MinDelay: 0 * time.Second}} { msg := "Propose admin role without external admin with MCMS" if mcmsConfig == nil { @@ -233,6 +236,7 @@ func TestProposeAdminRoleChangeset_ExecutionWithoutExternalAdmin(t *testing.T) { } func TestProposeAdminRoleChangeset_ExecutionWithExternalAdmin(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, mcmsConfig := range []*proposalutils.TimelockConfig{nil, {MinDelay: 0 * time.Second}} { msg := "Propose admin role with external admin with MCMS" if mcmsConfig == nil { @@ -302,6 +306,7 @@ func TestProposeAdminRoleChangeset_ExecutionWithExternalAdmin(t *testing.T) { func TestProposeAdminRoleChangesetV2_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, _, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -455,6 +460,7 @@ func TestProposeAdminRoleChangesetV2_Validations(t *testing.T) { func TestProposeAdminRoleChangesetV2_ExecutionWithMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -507,6 +513,7 @@ func TestProposeAdminRoleChangesetV2_ExecutionWithMCMS(t *testing.T) { func TestProposeAdminRoleChangesetV2_ExecutionWithoutMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) @@ -557,6 +564,7 @@ func TestProposeAdminRoleChangesetV2_ExecutionWithoutMCMS(t *testing.T) { func TestProposeAdminRoleChangesetV2_MultipleTokensPerChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -616,6 +624,7 @@ func TestProposeAdminRoleChangesetV2_MultipleTokensPerChain(t *testing.T) { func TestProposeAdminRoleChangesetV2_EmptyConfigReturnsError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, _, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -634,6 +643,7 @@ func TestProposeAdminRoleChangesetV2_EmptyConfigReturnsError(t *testing.T) { func TestProposeAdminRoleChangesetV2_PendingAdminValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -714,6 +724,7 @@ func TestProposeAdminRoleChangesetV2_PendingAdminValidation(t *testing.T) { func TestProposeAdminRoleChangesetV2_OverrideFunctionality(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) diff --git a/deployment/ccip/changeset/v1_5_1/cs_set_pool_test.go b/deployment/ccip/changeset/v1_5_1/cs_set_pool_test.go index 36e5f55beca..6d40220ad4e 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_set_pool_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_set_pool_test.go @@ -8,6 +8,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -20,6 +21,7 @@ import ( func TestSetPoolChangeset_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, _, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -120,6 +122,7 @@ func TestSetPoolChangeset_Validations(t *testing.T) { } func TestSetPoolChangeset_Execution(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, mcmsConfig := range []*proposalutils.TimelockConfig{nil, {MinDelay: 0 * time.Second}} { msg := "Set pool with MCMS" if mcmsConfig == nil { diff --git a/deployment/ccip/changeset/v1_5_1/cs_set_token_transfer_fee_config_test.go b/deployment/ccip/changeset/v1_5_1/cs_set_token_transfer_fee_config_test.go index 1a6d8f0515e..7fb14d70398 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_set_token_transfer_fee_config_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_set_token_transfer_fee_config_test.go @@ -23,6 +23,7 @@ import ( commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" "github.com/smartcontractkit/chainlink/deployment/helpers/pointer" ) @@ -52,6 +53,7 @@ func ReadTokenTransferFeeConfig(t *testing.T, e testhelpers.DeployedEnv, srcSele func TestSetTokenTransferFeeConfig_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // Spin up a memory env with minimal prerequisite deployment e, _ := testhelpers.NewMemoryEnvironment(t, @@ -196,6 +198,8 @@ func TestSetTokenTransferFeeConfig_Validations(t *testing.T) { } func TestSetTokenTransferFeeConfig_EmptyConfigIsGracefullyHandled(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + // Spin up a memory env with minimal prerequisite deployment e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2), @@ -233,6 +237,8 @@ func TestSetTokenTransferFeeConfig_EmptyConfigIsGracefullyHandled(t *testing.T) } func TestSetTokenTransferFeeConfig_Execution_WithoutMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + // Spin up a memory env with minimal prerequisite deployment e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2), @@ -303,6 +309,8 @@ func TestSetTokenTransferFeeConfig_Execution_WithoutMCMS(t *testing.T) { } func TestSetTokenTransferFeeConfig_Execution_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + // Spin up a memory env with minimal prerequisite deployment e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2), @@ -416,6 +424,8 @@ func TestSetTokenTransferFeeConfig_Execution_WithMCMS(t *testing.T) { } func TestSetTokenTransferFeeConfig_MultipleChains(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + // Spin up a memory env with minimal prerequisite deployment e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2), diff --git a/deployment/ccip/changeset/v1_5_1/cs_sync_usdc_domains_with_chains_test.go b/deployment/ccip/changeset/v1_5_1/cs_sync_usdc_domains_with_chains_test.go index 1435bbd88ea..314f870b02f 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_sync_usdc_domains_with_chains_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_sync_usdc_domains_with_chains_test.go @@ -27,6 +27,7 @@ import ( func TestValidateSyncUSDCDomainsWithChainsConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { Msg string @@ -185,6 +186,7 @@ func TestValidateSyncUSDCDomainsWithChainsConfig(t *testing.T) { func TestSyncUSDCDomainsWithChainsChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") for _, mcmsConfig := range []*proposalutils.TimelockConfig{nil, {MinDelay: 0 * time.Second}} { msg := "Sync domains without MCMS" diff --git a/deployment/ccip/changeset/v1_5_1/cs_transfer_admin_role_test.go b/deployment/ccip/changeset/v1_5_1/cs_transfer_admin_role_test.go index 0a24ed57a02..3d7c9782da6 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_transfer_admin_role_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_transfer_admin_role_test.go @@ -12,6 +12,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -24,6 +25,7 @@ import ( func TestTransferAdminRoleChangeset_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, _, tokens := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -140,6 +142,7 @@ func TestTransferAdminRoleChangeset_Validations(t *testing.T) { } func TestTransferAdminRoleChangeset_Execution(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, mcmsConfig := range []*proposalutils.TimelockConfig{nil, {MinDelay: 0 * time.Second}} { msg := "Transfer admin role with MCMS" if mcmsConfig == nil { @@ -245,6 +248,7 @@ func TestTransferAdminRoleChangeset_Execution(t *testing.T) { func TestTransferAdminRoleChangesetV2_EmptyConfigReturnsError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, _, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -260,6 +264,7 @@ func TestTransferAdminRoleChangesetV2_EmptyConfigReturnsError(t *testing.T) { func TestTransferAdminRoleChangesetV2_ExecutionWithMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -311,6 +316,7 @@ func TestTransferAdminRoleChangesetV2_ExecutionWithMCMS(t *testing.T) { func TestTransferAdminRoleChangesetV2_ExecutionWithoutMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) @@ -417,6 +423,7 @@ func TestTransferAdminRoleChangesetV2_ExecutionWithoutMCMS(t *testing.T) { func TestTransferAdminRoleChangesetV2_MultipleTokensPerChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -458,6 +465,7 @@ func TestTransferAdminRoleChangesetV2_MultipleTokensPerChain(t *testing.T) { func TestTransferAdminRoleChangesetV2_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) diff --git a/deployment/ccip/changeset/v1_5_1/cs_update_admin_role_test.go b/deployment/ccip/changeset/v1_5_1/cs_update_admin_role_test.go index fb91dbcf5ea..c79f05c0db2 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_update_admin_role_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_update_admin_role_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" @@ -20,6 +21,7 @@ import ( func TestUpdateAdminRoleChangesetV2_Validations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -140,6 +142,7 @@ func TestUpdateAdminRoleChangesetV2_Validations(t *testing.T) { func TestUpdateAdminRoleChangesetV2_EmptyConfigIsGracefullyHandled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, _, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -154,6 +157,7 @@ func TestUpdateAdminRoleChangesetV2_EmptyConfigIsGracefullyHandled(t *testing.T) func TestUpdateAdminRoleChangesetV2_ExecutionWithoutMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), false) @@ -256,6 +260,7 @@ func TestUpdateAdminRoleChangesetV2_ExecutionWithoutMCMS(t *testing.T) { func TestUpdateAdminRoleChangesetV2_ExecutionWithMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, selectorB, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) @@ -307,6 +312,7 @@ func TestUpdateAdminRoleChangesetV2_ExecutionWithMCMS(t *testing.T) { func TestUpdateAdminRoleChangesetV2_MultipleTokensPerChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mcmsConfig := &proposalutils.TimelockConfig{MinDelay: 0 * time.Second} e, selectorA, _, _ := testhelpers.SetupTwoChainEnvironmentWithTokens(t, logger.TestLogger(t), true) diff --git a/deployment/ccip/changeset/v1_6/accept_ownership_test.go b/deployment/ccip/changeset/v1_6/accept_ownership_test.go index b75a3fa19d7..af66d9f1c99 100644 --- a/deployment/ccip/changeset/v1_6/accept_ownership_test.go +++ b/deployment/ccip/changeset/v1_6/accept_ownership_test.go @@ -8,6 +8,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" @@ -15,6 +16,7 @@ import ( func Test_NewAcceptOwnershipChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) _, err := stateview.LoadOnchainState(e.Env) require.NoError(t, err) diff --git a/deployment/ccip/changeset/v1_6/cs_active_candidate_test.go b/deployment/ccip/changeset/v1_6/cs_active_candidate_test.go index 33ebd1b7b45..507d3b768bd 100644 --- a/deployment/ccip/changeset/v1_6/cs_active_candidate_test.go +++ b/deployment/ccip/changeset/v1_6/cs_active_candidate_test.go @@ -24,12 +24,15 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func Test_ActiveCandidate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + // Setup an environment with 2 chains, a source and a dest. // We want to have the active instance execute a few messages // and then setup a candidate instance. The candidate instance diff --git a/deployment/ccip/changeset/v1_6/cs_add_lane_test.go b/deployment/ccip/changeset/v1_6/cs_add_lane_test.go index 80beb5a4cc0..bc485040aa7 100644 --- a/deployment/ccip/changeset/v1_6/cs_add_lane_test.go +++ b/deployment/ccip/changeset/v1_6/cs_add_lane_test.go @@ -14,12 +14,14 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" ) func TestAddLanesWithTestRouter(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) // Here we have CR + nodes set up, but no CCIP contracts deployed. state, err := stateview.LoadOnchainState(e.Env) @@ -53,6 +55,7 @@ func TestAddLanesWithTestRouter(t *testing.T) { // this test is there to ensure addLane works between solana and evm chains func TestAddLanesWithSolana(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1)) // Here we have CR + nodes set up, but no CCIP contracts deployed. state, err := stateview.LoadOnchainState(e.Env) diff --git a/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go b/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go index a53b0badc16..479f14744a1 100644 --- a/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go +++ b/deployment/ccip/changeset/v1_6/cs_add_new_chain_e2e_test.go @@ -30,6 +30,7 @@ import ( ccipseq "github.com/smartcontractkit/chainlink/deployment/ccip/sequence/evm/v1_6" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" commoncs "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -69,6 +70,7 @@ func checkConnectivity( func TestConnectNewChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") mustHaveOwner := func(t *testing.T, ownable commonchangeset.Ownable, expectedOwner string) { owner, err := ownable.Owner(nil) require.NoError(t, err, "must get owner") @@ -237,6 +239,7 @@ func TestConnectNewChain(t *testing.T) { func TestAddAndPromoteCandidatesForNewChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") type test struct { Msg string MCMS *proposalutils.TimelockConfig @@ -545,6 +548,7 @@ func TestAddAndPromoteCandidatesForNewChain(t *testing.T) { func TestRemoveLinkTokenAddressIfExists(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("should remove LINK token successfully if already exists", func(t *testing.T) { deployedEnvironment, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2)) @@ -605,6 +609,7 @@ func TestRemoveLinkTokenAddressIfExists(t *testing.T) { func TestValidateTransmitterAddresses(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("should fail if the number of transmitter address is less than 3f+1", func(t *testing.T) { // Test the core validation logic from ValidateTransmitters method // fChain := uint8(1) diff --git a/deployment/ccip/changeset/v1_6/cs_ccip_home_test.go b/deployment/ccip/changeset/v1_6/cs_ccip_home_test.go index adc41800853..3555a45dcd1 100644 --- a/deployment/ccip/changeset/v1_6/cs_ccip_home_test.go +++ b/deployment/ccip/changeset/v1_6/cs_ccip_home_test.go @@ -33,11 +33,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" ) func TestInvalidOCR3Params(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithPrerequisiteDeploymentOnly(nil)) chain1 := e.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM))[0] @@ -99,6 +101,7 @@ func TestInvalidOCR3Params(t *testing.T) { } func Test_PromoteCandidate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -191,6 +194,7 @@ func Test_PromoteCandidate(t *testing.T) { } func Test_SetCandidate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -321,6 +325,7 @@ func Test_SetCandidate(t *testing.T) { } func Test_RevokeCandidate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -460,6 +465,7 @@ func Test_RevokeCandidate(t *testing.T) { } func Test_UpdateChainConfigs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool diff --git a/deployment/ccip/changeset/v1_6/cs_chain_contracts_test.go b/deployment/ccip/changeset/v1_6/cs_chain_contracts_test.go index 6d8af23e446..41afa2c41a4 100644 --- a/deployment/ccip/changeset/v1_6/cs_chain_contracts_test.go +++ b/deployment/ccip/changeset/v1_6/cs_chain_contracts_test.go @@ -43,11 +43,13 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) func TestUpdateOnRampsDests(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -124,6 +126,7 @@ func TestUpdateOnRampsDests(t *testing.T) { } func TestUpdateOnRampDynamicConfig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -192,6 +195,7 @@ func TestUpdateOnRampDynamicConfig(t *testing.T) { } func TestUpdateOnRampAllowList(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -268,6 +272,7 @@ func TestUpdateOnRampAllowList(t *testing.T) { } func TestWithdrawOnRampFeeTokens(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -384,6 +389,7 @@ func TestWithdrawOnRampFeeTokens(t *testing.T) { } func TestUpdateOffRampsSources(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -460,6 +466,7 @@ func TestUpdateOffRampsSources(t *testing.T) { } func TestUpdateFQDests(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -528,6 +535,7 @@ func TestUpdateFQDests(t *testing.T) { } func TestUpdateFeeQuoterDestsConfig_Validate_MultipleReportsEnabled(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tenv, _ := testhelpers.NewMemoryEnvironment(t) allChains := maps.Keys(tenv.Env.BlockChains.EVMChains()) source := allChains[0] @@ -618,6 +626,7 @@ func TestUpdateFeeQuoterDestsConfig_Validate_MultipleReportsEnabled(t *testing.T } func TestUpdateRouterRamps(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string transferHomeContracts bool @@ -723,6 +732,7 @@ func TestUpdateRouterRamps(t *testing.T) { } func TestUpdateDynamicConfigOffRampChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -783,6 +793,7 @@ func TestUpdateDynamicConfigOffRampChangeset(t *testing.T) { } func TestUpdateNonceManagersCS(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -841,6 +852,7 @@ func TestUpdateNonceManagersCS(t *testing.T) { } func TestUpdateNonceManagersCSApplyPreviousRampsUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, tenv := testhelpers.NewMemoryEnvironment( t, testhelpers.WithPrerequisiteDeploymentOnly(&changeset.V1_5DeploymentConfig{ @@ -944,6 +956,7 @@ func TestUpdateNonceManagersCSApplyPreviousRampsUpdates(t *testing.T) { } func TestSetOCR3ConfigValidations(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment( t, testhelpers.WithPrerequisiteDeploymentOnly(nil)) @@ -1062,6 +1075,7 @@ func TestSetOCR3ConfigValidations(t *testing.T) { } func TestApplyFeeTokensUpdatesFeeQuoterChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -1147,6 +1161,7 @@ func TestApplyFeeTokensUpdatesFeeQuoterChangeset(t *testing.T) { } func TestApplyPremiumMultiplierWeiPerEthUpdatesFeeQuoterChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -1259,6 +1274,7 @@ func TestApplyPremiumMultiplierWeiPerEthUpdatesFeeQuoterChangeset(t *testing.T) } func TestUpdateTokenPriceFeedsFeeQuoterChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -1376,6 +1392,7 @@ func TestUpdateTokenPriceFeedsFeeQuoterChangeset(t *testing.T) { } func TestApplyTokenTransferFeeConfigUpdatesFeeQuoterChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -1484,6 +1501,7 @@ func TestApplyTokenTransferFeeConfigUpdatesFeeQuoterChangeset(t *testing.T) { } func TestApplyTokenTransferFeeConfigUpdatesFeeQuoterChangesetV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -1618,6 +1636,7 @@ func TestApplyTokenTransferFeeConfigUpdatesFeeQuoterChangesetV2(t *testing.T) { } func TestUpdateWrappedNativeOnRouterChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool diff --git a/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go b/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go index 429a0744f61..c9d5d80654d 100644 --- a/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go +++ b/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go @@ -32,6 +32,7 @@ import ( func TestDeployChainContractsChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") homeChainSel := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), @@ -178,11 +179,13 @@ func testDeployChainContractsChangesetWithEnv(t *testing.T, e cldf.Environment, func TestDeployCCIPContracts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testhelpers.DeployCCIPContractsTest(t, 0, 0) } func TestDeployStaticLinkToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithStaticLink()) // load onchain state state, err := stateview.LoadOnchainState(e.Env) diff --git a/deployment/ccip/changeset/v1_6/cs_home_chain_test.go b/deployment/ccip/changeset/v1_6/cs_home_chain_test.go index f6363f65cf5..d4306c08b90 100644 --- a/deployment/ccip/changeset/v1_6/cs_home_chain_test.go +++ b/deployment/ccip/changeset/v1_6/cs_home_chain_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6" @@ -29,6 +30,7 @@ import ( func TestDeployHomeChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") homeChainSel := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), @@ -79,6 +81,7 @@ func TestDeployHomeChain(t *testing.T) { } func TestDeployHomeChainIdempotent(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) nodes, err := deployment.NodeInfo(e.Env.NodeIDs, e.Env.Offchain) require.NoError(t, err) @@ -100,6 +103,7 @@ func TestDeployHomeChainIdempotent(t *testing.T) { } func TestDeployDonIDClaimerAndOffSet(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testcontext.Get(t) deployedEnvironment, _ := testhelpers.NewMemoryEnvironment(t) e := deployedEnvironment.Env @@ -164,6 +168,7 @@ func TestDeployDonIDClaimerAndOffSet(t *testing.T) { } func TestRemoveDonsValidate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) s, err := stateview.LoadOnchainState(e.Env) require.NoError(t, err) @@ -219,6 +224,7 @@ func TestRemoveDonsValidate(t *testing.T) { } func TestRemoveDons(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) s, err := stateview.LoadOnchainState(e.Env) require.NoError(t, err) @@ -269,6 +275,7 @@ func TestRemoveDons(t *testing.T) { } func TestAddDonAfterRemoveDons(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) s, err := stateview.LoadOnchainState(e.Env) require.NoError(t, err) @@ -339,6 +346,7 @@ func TestAddDonAfterRemoveDons(t *testing.T) { } func TestAddUpdateAndRemoveNops(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool @@ -472,6 +480,7 @@ func TestAddUpdateAndRemoveNops(t *testing.T) { } func TestRemoveNodes(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range []struct { name string mcmsEnabled bool diff --git a/deployment/ccip/changeset/v1_6/cs_jobspec_test.go b/deployment/ccip/changeset/v1_6/cs_jobspec_test.go index 5c7e008903c..36e41e4c25e 100644 --- a/deployment/ccip/changeset/v1_6/cs_jobspec_test.go +++ b/deployment/ccip/changeset/v1_6/cs_jobspec_test.go @@ -7,6 +7,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6" @@ -16,6 +17,7 @@ import ( func TestJobSpecChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var err error tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNoJobsAndContracts()) e := tenv.Env @@ -55,6 +57,7 @@ func TestJobSpecChangeset(t *testing.T) { } func TestJobSpecChangesetIdempotent(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t) // we call the changeset again to ensure that it doesn't return any new job specs // as the job specs are already created in the first call diff --git a/deployment/ccip/changeset/v1_6/cs_migration_from_v1_5_test.go b/deployment/ccip/changeset/v1_6/cs_migration_from_v1_5_test.go index eb392ea9458..a15529a384c 100644 --- a/deployment/ccip/changeset/v1_6/cs_migration_from_v1_5_test.go +++ b/deployment/ccip/changeset/v1_6/cs_migration_from_v1_5_test.go @@ -32,6 +32,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" ccipocr3types "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" cciptypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" ) @@ -341,6 +342,7 @@ func initMigrationEnvironment(t *testing.T, numChains int, mcmsCfg proposalutils } func TestInitAndPromoteChainUpgrades(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") mcmsCfg := proposalutils.TimelockConfig{ MinDelay: 0 * time.Second, MCMSAction: mcmstypes.TimelockActionSchedule, diff --git a/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go b/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go index 331ced603b6..947781a37f7 100644 --- a/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go +++ b/deployment/ccip/changeset/v1_6/cs_translate_onramp_to_feequoter_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/token_admin_registry" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" @@ -38,6 +39,7 @@ import ( ) func TestTranslateEVM2EVMOnRampsToFeeQuoterChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testcontext.Get(t) // 1. Deploy 1.5 pre-requisites diff --git a/deployment/ccip/changeset/v1_6/cs_update_bidirectional_lanes_test.go b/deployment/ccip/changeset/v1_6/cs_update_bidirectional_lanes_test.go index 39db02547e2..ac0b3f9aa50 100644 --- a/deployment/ccip/changeset/v1_6/cs_update_bidirectional_lanes_test.go +++ b/deployment/ccip/changeset/v1_6/cs_update_bidirectional_lanes_test.go @@ -16,6 +16,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" @@ -153,6 +154,7 @@ func checkBidirectionalLaneConnectivity( } func TestBuildConfigs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selectors := []uint64{1, 2} chains := make([]v1_6.ChainDefinition, len(selectors)) @@ -268,6 +270,7 @@ func TestBuildConfigs(t *testing.T) { func TestUpdateBidirectionalLanesChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") type test struct { Msg string diff --git a/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go b/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go index 114a36be2f8..c3484731c74 100644 --- a/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go +++ b/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go @@ -25,6 +25,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/burn_mint_erc677" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -123,6 +124,7 @@ func setupCCTPMsgTransmitterProxyContractsForConfigure( func TestValidateConfigureCCTPMessageTransmitterProxyInput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupCCTPMsgTransmitterProxyEnvironmentForConfigure(t, true) chains := rt.Environment().BlockChains.EVMChains() @@ -187,6 +189,7 @@ func TestValidateConfigureCCTPMessageTransmitterProxyInput(t *testing.T) { } func TestConfigureCCTPMessageTransmitterProxy(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-2064") t.Parallel() diff --git a/deployment/ccip/changeset/v1_6_2/cs_configure_usdc_token_pool_test.go b/deployment/ccip/changeset/v1_6_2/cs_configure_usdc_token_pool_test.go index 5211517172b..206435c7f2d 100644 --- a/deployment/ccip/changeset/v1_6_2/cs_configure_usdc_token_pool_test.go +++ b/deployment/ccip/changeset/v1_6_2/cs_configure_usdc_token_pool_test.go @@ -25,6 +25,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/burn_mint_erc677" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -124,6 +125,7 @@ func setupUSDCTokenPoolsContractsForConfigure( func TestValidateConfigUSDCTokenPoolInput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupUSDCTokenPoolsEnvironmentForConfigure(t, true) @@ -282,6 +284,7 @@ func TestValidateConfigUSDCTokenPoolInput(t *testing.T) { func TestConfigureUSDCTokenPools(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupUSDCTokenPoolsEnvironmentForConfigure(t, true) diff --git a/deployment/ccip/changeset/v1_6_2/cs_deploy_cctp_message_transmitter_proxy_test.go b/deployment/ccip/changeset/v1_6_2/cs_deploy_cctp_message_transmitter_proxy_test.go index d07bee6fc29..d1d1982be0c 100644 --- a/deployment/ccip/changeset/v1_6_2/cs_deploy_cctp_message_transmitter_proxy_test.go +++ b/deployment/ccip/changeset/v1_6_2/cs_deploy_cctp_message_transmitter_proxy_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/burn_mint_erc677" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6_2" @@ -116,6 +117,7 @@ func setupCCTPMsgTransmitterProxyContractsForDeploy( func TestValidateDeployCCTPMessageTransmitterProxyInput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupCCTPMsgTransmitterProxyEnvironmentForDeploy(t, false) chains := rt.Environment().BlockChains.EVMChains() @@ -155,6 +157,7 @@ func TestValidateDeployCCTPMessageTransmitterProxyInput(t *testing.T) { func TestDeployCCTPMessageTransmitterProxy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupCCTPMsgTransmitterProxyEnvironmentForDeploy(t, true) chains := rt.Environment().BlockChains.EVMChains() diff --git a/deployment/ccip/changeset/v1_6_2/cs_deploy_usdc_token_pools_test.go b/deployment/ccip/changeset/v1_6_2/cs_deploy_usdc_token_pools_test.go index b9607976e7e..5fb343cf275 100644 --- a/deployment/ccip/changeset/v1_6_2/cs_deploy_usdc_token_pools_test.go +++ b/deployment/ccip/changeset/v1_6_2/cs_deploy_usdc_token_pools_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/burn_mint_erc677" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6_2" @@ -120,6 +121,7 @@ func setupUSDCTokenPoolsContractsForDeploy( func TestValidateDeployUSDCTokenPoolContractsConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupUSDCTokenPoolsEnvironmentForDeploy(t, true) @@ -176,6 +178,7 @@ func TestValidateDeployUSDCTokenPoolContractsConfig(t *testing.T) { func TestValidateDeployUSDCTokenPoolInput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupUSDCTokenPoolsEnvironmentForDeploy(t, true) blockchain := slices.Collect(maps.Values(rt.Environment().BlockChains.EVMChains()))[0] @@ -320,6 +323,7 @@ func TestValidateDeployUSDCTokenPoolInput(t *testing.T) { func TestDeployUSDCTokenPool(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupUSDCTokenPoolsEnvironmentForDeploy(t, true) addrBook := cldf.NewMemoryAddressBook() @@ -368,6 +372,7 @@ func TestDeployUSDCTokenPool(t *testing.T) { func TestDeployHybridLockReleaseUSDCTokenPool(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt := setupUSDCTokenPoolsEnvironmentForDeploy(t, true) addrBook := cldf.NewMemoryAddressBook() diff --git a/deployment/ccip/shared/deployergroup/deployer_group_test.go b/deployment/ccip/shared/deployergroup/deployer_group_test.go index b47a377c747..a7bcd5089bc 100644 --- a/deployment/ccip/shared/deployergroup/deployer_group_test.go +++ b/deployment/ccip/shared/deployergroup/deployer_group_test.go @@ -188,6 +188,7 @@ var deployerGroupTestCases = []deployerGroupTestCase{ } func TestDeployerGroup(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") for _, tc := range deployerGroupTestCases { t.Run(tc.name, func(t *testing.T) { e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2)) @@ -224,6 +225,7 @@ func TestDeployerGroup(t *testing.T) { } func TestDeployerGroupMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range deployerGroupTestCases { t.Run(tc.name, func(t *testing.T) { if tc.name == "happy path" { @@ -293,6 +295,7 @@ func TestDeployerGroupMCMS(t *testing.T) { } func TestDeployerGroupWithTimelockAddressQualifier(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var err error linktokenOwnerQualifier := "link-owner" selectorIndex := uint64(0) @@ -378,6 +381,7 @@ func TestDeployerGroupWithTimelockAddressQualifier(t *testing.T) { } func TestDeployerGroupGenerateMultipleProposals(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tc := dummyMultiChainDeployerGroupChangesetConfig{ address: common.HexToAddress("0x455E5AA18469bC6ccEF49594645666C587A3a71B"), mints: []mintConfig{ @@ -444,6 +448,7 @@ func TestDeployerGroupGenerateMultipleProposals(t *testing.T) { } func TestDeployerGroupMultipleProposalsMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") cfg := dummyMultiChainDeployerGroupChangesetConfig{ address: common.HexToAddress("0x455E5AA18469bC6ccEF49594645666C587A3a71B"), mints: []mintConfig{ @@ -517,6 +522,7 @@ func TestDeployerGroupMultipleProposalsMCMS(t *testing.T) { } func TestEmptyBatch(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") e, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2)) cfg := dummyEmptyBatchChangesetConfig{ diff --git a/deployment/ccip/shared/stateview/state_test.go b/deployment/ccip/shared/stateview/state_test.go index 121805eb7e9..7bba3c769e1 100644 --- a/deployment/ccip/shared/stateview/state_test.go +++ b/deployment/ccip/shared/stateview/state_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -31,6 +32,7 @@ import ( ) func TestLoadChainState_MultipleFeeQuoters(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(3)) fq1 := utils.RandomAddress().Hex() fq2 := utils.RandomAddress().Hex() @@ -45,6 +47,7 @@ func TestLoadChainState_MultipleFeeQuoters(t *testing.T) { } func TestSmokeState(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(3)) state, err := stateview.LoadOnchainState(tenv.Env) require.NoError(t, err) @@ -53,6 +56,7 @@ func TestSmokeState(t *testing.T) { } func TestMCMSState(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNoJobsAndContracts()) addressbook := cldf.NewMemoryAddressBook() newTv := cldf.NewTypeAndVersion(types.ManyChainMultisig, deployment.Version1_0_0) @@ -71,6 +75,7 @@ func TestMCMSState(t *testing.T) { func TestEnforceMCMSUsageIfProd(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { Msg string diff --git a/deployment/ccip/shared/stateview/view_test.go b/deployment/ccip/shared/stateview/view_test.go index c8980aa76cb..df5101b51d3 100644 --- a/deployment/ccip/shared/stateview/view_test.go +++ b/deployment/ccip/shared/stateview/view_test.go @@ -5,12 +5,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" ) func TestSmokeView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(3)) jsonData, err := stateview.ViewCCIP(tenv.Env) require.NoError(t, err) diff --git a/deployment/common/opsutils/evm_test.go b/deployment/common/opsutils/evm_test.go index 4e170841019..490a988a40b 100644 --- a/deployment/common/opsutils/evm_test.go +++ b/deployment/common/opsutils/evm_test.go @@ -18,6 +18,7 @@ import ( mcmslib "github.com/smartcontractkit/mcms" mcmstypes "github.com/smartcontractkit/mcms/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" cldf_evm_provider "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider" @@ -35,6 +36,7 @@ import ( func TestCloneTransactOptsWithGas(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") orig := &bind.TransactOpts{ GasLimit: 100, GasPrice: big.NewInt(123), @@ -54,6 +56,7 @@ func TestCloneTransactOptsWithGas(t *testing.T) { func TestGasBoostConfigsForChainMap(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") chainMap := map[uint64]string{1: "a", 2: "b"} gasBoostConfigs := map[uint64]commontypes.GasBoostConfig{ 1: {InitialGasLimit: 10}, @@ -69,6 +72,7 @@ func TestGasBoostConfigsForChainMap(t *testing.T) { func TestGetBoostedGasForAttempt_DefaultsAndOverrides(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cfg := commontypes.GasBoostConfig{} limit, price := opsutils.GetBoostedGasForAttempt(cfg, 0) assert.Equal(t, uint64(200_000), limit) @@ -90,6 +94,7 @@ func TestGetBoostedGasForAttempt_DefaultsAndOverrides(t *testing.T) { func TestRetryDeploymentWithGasBoost(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cfg := &commontypes.GasBoostConfig{ InitialGasLimit: 1000, GasLimitIncrement: 100, @@ -105,6 +110,7 @@ func TestRetryDeploymentWithGasBoost(t *testing.T) { func TestAddEVMCallSequenceToCSOutput_SequenceError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 1), @@ -133,6 +139,7 @@ func TestAddEVMCallSequenceToCSOutput_SequenceError(t *testing.T) { func TestAddEVMCallSequenceToCSOutput_NoMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 1), @@ -158,6 +165,7 @@ func TestAddEVMCallSequenceToCSOutput_NoMCMS(t *testing.T) { func TestAddEVMCallSequenceToCSOutput_AllConfirmed(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 1), @@ -185,6 +193,7 @@ func TestAddEVMCallSequenceToCSOutput_AllConfirmed(t *testing.T) { func TestAddEVMCallSequenceToCSOutput_ProposalCombination(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") deployedEnvironment, _ := testhelpers.NewMemoryEnvironment( t, ) @@ -292,6 +301,7 @@ func TestAddEVMCallSequenceToCSOutput_ProposalCombination(t *testing.T) { func TestNewEVMCallOperation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") version, _ := semver.NewVersion("1.0.0") t.Run("ChainSelectorMismatch", func(t *testing.T) { @@ -437,6 +447,7 @@ func TestNewEVMCallOperation(t *testing.T) { } func TestContractOpts_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { desc string opts *opsutils.ContractOpts @@ -496,6 +507,7 @@ func TestContractOpts_Validate(t *testing.T) { func TestNewEVMDeployOperation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") contractType := cldf.ContractType("TestContract") version, _ := semver.NewVersion("1.0.0") diff --git a/deployment/internal/jdtestutils/client_test.go b/deployment/internal/jdtestutils/client_test.go index 06f4da96d01..ace25e4ae5e 100644 --- a/deployment/internal/jdtestutils/client_test.go +++ b/deployment/internal/jdtestutils/client_test.go @@ -15,6 +15,7 @@ import ( jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/shared/ptypes" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/helpers/pointer" "github.com/smartcontractkit/chainlink/deployment/utils/nodetestutils" @@ -22,6 +23,7 @@ import ( func TestJobClientProposeJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() bc, err := onchain.NewEVMSimLoader().LoadN(t, 1) @@ -127,6 +129,7 @@ func TestJobClientProposeJob(t *testing.T) { func TestJobClientJobAPI(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() bc, err := onchain.NewEVMSimLoader().LoadN(t, 1) diff --git a/deployment/utils/nodetestutils/node_test.go b/deployment/utils/nodetestutils/node_test.go index 51d24744ddd..8d5f695e0a9 100644 --- a/deployment/utils/nodetestutils/node_test.go +++ b/deployment/utils/nodetestutils/node_test.go @@ -14,11 +14,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/relay" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/onchain" ) func TestNode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") evmchains, err := onchain.NewEVMSimLoaderWithConfig(onchain.EVMSimLoaderConfig{ NumAdditionalAccounts: 5, }).LoadN(t, 3) From 4c29bce80db2de02c25d6f6c4d1bf1fc80bfd9d1 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 12:04:19 -0800 Subject: [PATCH 06/30] test: enable new pipeline --- .github/workflows/ci-integration.yml | 36 +++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml index 45b468bf64f..30d52d69013 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-integration.yml @@ -17,8 +17,6 @@ on: jobs: integration-tests: - # TODO: Enable once tests are added - if: false name: "${{ matrix.type.module }} (${{matrix.type.test-suite}})" timeout-minutes: 20 runs-on: runs-on=${{ github.run_id }}-${{ strategy.job-index }}/${{ matrix.type.os }} @@ -35,25 +33,25 @@ jobs: fail-fast: false matrix: type: - - module: Core - test-suite: "with-db" - cmd: go_core_tests - os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - - - module: Deployment - cmd: go_core_ccip_deployment_tests - test-suite: "solana" - os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - go-mod-directory: "deployment/" - setup-solana: "true" + # - module: Core + # test-suite: "with-db" + # cmd: go_core_tests + # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + + # - module: Deployment + # cmd: go_core_ccip_deployment_tests + # test-suite: "solana" + # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + # go-mod-directory: "deployment/" + # setup-solana: "true" # setup-loopps: "true" - - module: Deployment - test-suite: "aptos" - cmd: go_core_ccip_deployment_tests - os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - go-mod-directory: "deployment/" - aptos-cli-version: "7.10.0" + # - module: Deployment + # test-suite: "aptos" + # cmd: go_core_ccip_deployment_tests + # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + # go-mod-directory: "deployment/" + # aptos-cli-version: "7.10.0" # setup-loopps: "true" - module: Deployment From 077774353c3fff444c42c60bd7fc0ff7c77cd940 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 13:13:30 -0800 Subject: [PATCH 07/30] test: tag more tests --- .../ccip/changeset/aptos/config/lane_test.go | 2 ++ .../changeset/aptos/cs_add_token_pool_test.go | 2 ++ .../aptos/cs_deploy_aptos_chain_test.go | 3 +++ .../changeset/aptos/cs_set_ocr3_offramp_test.go | 2 ++ .../aptos/cs_update_aptos_lanes_test.go | 2 ++ .../cs_configure_evm_signer_registry_test.go | 5 +++++ .../cs_deploy_evm_signer_registry_test.go | 4 ++++ .../cs_set_token_transfer_fee_config_test.go | 7 +++++++ .../v1_6/cs_add_evm_solana_lane_test.go | 2 ++ .../cs_grant_and_mint_link_token_test.go | 3 +++ .../changeset/cs_orchestrate_changesets_test.go | 4 ++++ .../ccip/changeset/cs_prerequisites_test.go | 2 ++ deployment/ccip/changeset/globals/ocr3_test.go | 3 +++ deployment/ccip/changeset/save_existing_test.go | 2 ++ .../solana_v0_1_1/cs_chain_contracts_test.go | 8 ++++++++ .../solana_v0_1_1/cs_deploy_chain_test.go | 2 ++ .../solana_v0_1_1/cs_solana_token_test.go | 3 +++ .../solana_v0_1_1/cs_token_pool_test.go | 3 +++ .../solana_v0_1_1/save_existing_test.go | 3 +++ .../changeset/solana_v0_1_1/self_serve_test.go | 2 ++ .../transfer_ccip_to_mcms_with_timelock_test.go | 3 +++ .../cciptesthelpertypes/types_test.go | 6 ++++++ .../changeset/v1_5_1/cs_add_token_e2e_test.go | 2 ++ .../v1_5_1/cs_configure_token_pools_test.go | 3 ++- ...igure_cctp_message_transmitter_proxy_test.go | 4 ++-- deployment/ccip/manualexechelpers/exec_test.go | 2 ++ deployment/ccip/shared/token_info_test.go | 3 +++ .../ccip/view/v1_2/price_registry_test.go | 2 ++ deployment/ccip/view/v1_5/offramp_test.go | 2 ++ deployment/ccip/view/v1_5/onramp_test.go | 2 ++ deployment/ccip/view/v1_5/rmn_test.go | 2 ++ deployment/ccip/view/v1_6/ccip_home_test.go | 2 ++ deployment/ccip/view/v1_6/rmnremote_test.go | 8 ++++++++ .../common/changeset/deploy_link_token_test.go | 1 + .../changeset/deploy_mcms_with_timelock_test.go | 3 +++ .../common/changeset/evm/mcms/mcms_test.go | 3 +++ .../example/add_mint_burners_link_test.go | 2 ++ .../exemplar_deploy_link_token_test.go | 2 ++ .../changeset/example/link_transfer_test.go | 3 +++ .../common/changeset/example/mint_link_test.go | 2 ++ .../operations/deploy_and_mint_example_test.go | 2 ++ .../operations/retry_config_example_test.go | 3 +++ .../operations/terminal_error_example_test.go | 2 ++ .../example/solana_transfer_mcm_test.go | 5 ++++- .../common/changeset/mcms_firedrill_test.go | 2 ++ .../common/changeset/save_existing_test.go | 4 ++++ .../common/changeset/set_config_mcms_test.go | 3 +++ .../changeset/solana/fund_mcm_pdas_test.go | 3 +++ .../changeset/solana/transfer_ownership_test.go | 4 +++- .../solana/update_delay_timelock_test.go | 2 ++ deployment/common/changeset/state/evm_test.go | 3 +++ deployment/common/changeset/state_test.go | 3 +++ .../common/changeset/test_helpers_test.go | 4 ++++ .../transfer_to_mcms_with_timelock_test.go | 3 +++ deployment/common/proposalutils/analyze_test.go | 2 ++ deployment/common/proposalutils/propose_test.go | 4 +++- deployment/common/view/nops_test.go | 2 ++ deployment/common/view/v1_0/capreg_test.go | 2 ++ deployment/common/view/v1_0/link_token_test.go | 2 ++ .../common/view/v1_0/static_link_token_test.go | 2 ++ deployment/common/view/v1_0/workflowreg_test.go | 4 ++++ deployment/common/view/v2_0/capreg_test.go | 2 ++ .../v2/changeset/add_capabilities_test.go | 4 ++++ .../configure_capabilities_registry_test.go | 4 ++++ .../v2/changeset/delete_don_test.go | 8 ++++++++ .../deploy_capabilities_registry_test.go | 2 ++ .../v2/changeset/multiple_mcms_test.go | 2 ++ .../v2/changeset/pkg/bytes_test.go | 3 +++ .../v2/changeset/pkg/capability_config_test.go | 3 +++ .../v2/changeset/set_dons_families_test.go | 3 +++ .../v2/changeset/update_don_test.go | 8 ++++++++ .../common/strategies/mcms_transaction_test.go | 2 ++ deployment/cre/contracts/contracts_test.go | 5 +++++ deployment/cre/forwarder/configure_test.go | 5 +++++ .../jobs/operations/propose_gateway_job_test.go | 2 ++ .../cre/jobs/pkg/cre_settings_job_test.go | 2 ++ deployment/cre/jobs/pkg/gateway_job_test.go | 6 ++++++ deployment/cre/jobs/pkg/std_cap_test.go | 3 +++ deployment/cre/jobs/propose_evm_cap_test.go | 7 +++++++ deployment/cre/jobs/propose_job_spec_test.go | 5 +++++ deployment/cre/jobs/propose_std_cap_test.go | 6 ++++++ .../cre/jobs/types/job_spec_template_test.go | 3 +++ deployment/cre/jobs/types/job_spec_test.go | 2 ++ deployment/cre/mcms/changeset/configure_test.go | 3 +++ deployment/cre/mcms/changeset/deploy_test.go | 3 +++ deployment/cre/ocr3/config_test.go | 2 ++ deployment/cre/ocr3/oracle_config_test.go | 3 +++ deployment/cre/ocr3/types_test.go | 2 ++ .../ocr3/v2/changeset/configure_ocr3_test.go | 2 ++ .../cre/ocr3/v2/changeset/deploy_ocr3_test.go | 2 ++ .../cre/ocr3/v2/changeset/deploy_vault_test.go | 2 ++ .../changeset/register_nodes_with_jd_test.go | 3 +++ deployment/cre/pkg/offchain/types_test.go | 4 ++++ deployment/cre/state/view_test.go | 2 ++ deployment/cre/test/env_setup_test.go | 2 ++ .../changeset/admin_workflow_registry_test.go | 6 ++++++ .../configure_workflow_registry_test.go | 8 ++++++++ .../changeset/deploy_workflow_registry_test.go | 2 ++ .../changeset/accept_ownership_test.go | 2 ++ .../changeset/aptos/deploy_data_feeds_test.go | 2 ++ .../changeset/aptos/set_feed_config_test.go | 2 ++ .../changeset/aptos/set_workflow_config_test.go | 2 ++ .../changeset/aptos/transfer_ownership_test.go | 2 ++ .../changeset/confirm_aggregator_test.go | 2 ++ .../changeset/deploy_aggregator_proxy_test.go | 2 ++ .../deploy_bundle_aggregator_proxy_test.go | 2 ++ .../data-feeds/changeset/deploy_cache_test.go | 2 ++ .../data-feeds/changeset/migrate_feeds_test.go | 2 ++ .../changeset/new_feed_with_proxy_test.go | 2 ++ .../changeset/propose_aggregator_test.go | 2 ++ .../remove_dataid_proxy_mapping_test.go | 2 ++ .../changeset/remove_feed_config_test.go | 2 ++ .../data-feeds/changeset/remove_feed_test.go | 2 ++ .../changeset/set_bundle_feed_config_test.go | 2 ++ .../data-feeds/changeset/set_feed_admin_test.go | 2 ++ .../changeset/set_feed_config_test.go | 2 ++ .../tron/deploy_aggregator_proxy_test.go | 2 ++ .../changeset/tron/deploy_cache_test.go | 2 ++ .../tron/remove_dataid_proxy_mapping_test.go | 2 ++ .../changeset/tron/set_feed_admin_test.go | 2 ++ .../changeset/tron/set_feed_config_test.go | 2 ++ .../changeset/tron/update_data_id_proxy_test.go | 2 ++ .../changeset/update_data_id_proxy_test.go | 2 ++ deployment/data-feeds/changeset/utils_test.go | 3 +++ deployment/data-feeds/shared/validation_test.go | 3 +++ deployment/environment/crib/helpers_test.go | 3 +++ deployment/environment/crib/lane_config_test.go | 6 ++++++ deployment/environment/devenv/don_test.go | 3 +++ deployment/environment/devenv/rmn_test.go | 3 +++ .../nodeclient/chainlink_models_test.go | 2 ++ deployment/environment/test/jd_test.go | 5 +++++ .../environment/test/job_service_client_test.go | 17 +++++++++++++++-- .../environment/web/sdk/client/types_test.go | 2 ++ deployment/helpers/maps_test.go | 2 ++ .../keystone/changeset/accept_ownership_test.go | 2 ++ .../keystone/changeset/add_capabilities_test.go | 3 +++ deployment/keystone/changeset/add_dons_test.go | 2 ++ deployment/keystone/changeset/add_nodes_test.go | 2 ++ deployment/keystone/changeset/add_nops_test.go | 2 ++ .../changeset/append_node_capabilities_test.go | 2 ++ .../changeset/deploy_balance_reader_test.go | 2 ++ .../keystone/changeset/deploy_consumer_test.go | 2 ++ .../keystone/changeset/deploy_forwarder_test.go | 3 +++ .../keystone/changeset/deploy_ocr3_test.go | 3 +++ .../keystone/changeset/deploy_registry_test.go | 2 ++ .../internal/append_node_capabilities_test.go | 2 ++ .../keystone/changeset/internal/deploy_test.go | 6 ++++++ .../changeset/internal/remove_dons_test.go | 3 +++ .../keystone/changeset/internal/state_test.go | 3 +++ .../changeset/internal/update_don_test.go | 11 +++++++++-- .../internal/update_node_capabilities_test.go | 2 ++ .../changeset/internal/update_nodes_test.go | 4 ++++ deployment/keystone/changeset/ocr3_job_test.go | 3 +++ .../contracts/add_capabilities_op_test.go | 5 +++++ .../deploy_capability_registry_op_test.go | 2 ++ .../deploy_configure_forwarders_seq_test.go | 3 +++ .../keystone/changeset/remove_dons_test.go | 3 +++ .../changeset/solana/deploy_forwarder_test.go | 3 ++- .../keystone/changeset/test/env_setup_test.go | 2 ++ .../changeset/tron/configure_forwarder_test.go | 2 ++ .../changeset/tron/deploy_forwarder_test.go | 2 ++ .../keystone/changeset/update_don_test.go | 4 +++- .../changeset/update_node_capabilities_test.go | 2 ++ .../keystone/changeset/update_nodes_test.go | 2 ++ deployment/keystone/changeset/view_test.go | 2 ++ .../changeset/workflowregistry/deploy_test.go | 3 +++ .../update_allowed_dons_test.go | 3 +++ .../update_authorized_addresses_test.go | 3 +++ .../test/changeset/capability_registry_test.go | 2 ++ .../changesets/deploy_evm_link_tokens_test.go | 3 +++ .../changesets/deploy_sol_link_tokens_test.go | 3 +++ deployment/tokens/changesets/validate_test.go | 4 ++++ deployment/tokens/internal/ops/ops_evm_test.go | 2 ++ deployment/tokens/internal/ops/ops_sol_test.go | 2 ++ .../tokens/internal/ops/ops_storage_test.go | 3 +++ .../internal/seqs/seq_deploy_evm_tokens_test.go | 2 ++ .../seqs/seq_deploy_solana_tokens_test.go | 2 ++ .../internal/seqs/seq_persist_address_test.go | 2 ++ deployment/utils/solutils/artifacts_test.go | 5 +++++ .../changeset/batch_native_transfer_test.go | 4 ++++ .../vault/changeset/fund_timelock_test.go | 5 +++++ .../vault/changeset/manage_whitelist_test.go | 7 +++++++ deployment/vault/view/view_test.go | 4 ++++ 183 files changed, 552 insertions(+), 12 deletions(-) diff --git a/deployment/ccip/changeset/aptos/config/lane_test.go b/deployment/ccip/changeset/aptos/config/lane_test.go index b2272795d50..38be5f694da 100644 --- a/deployment/ccip/changeset/aptos/config/lane_test.go +++ b/deployment/ccip/changeset/aptos/config/lane_test.go @@ -10,6 +10,7 @@ import ( aptos_fee_quoter "github.com/smartcontractkit/chainlink-aptos/bindings/ccip/fee_quoter" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_6" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" @@ -17,6 +18,7 @@ import ( func TestToEVMUpdateLanesConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input UpdateAptosLanesConfig diff --git a/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go b/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go index 69465d3c7be..fba99e71f46 100644 --- a/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go +++ b/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go @@ -18,6 +18,7 @@ import ( fee_quoter "github.com/smartcontractkit/chainlink-aptos/bindings/ccip/fee_quoter" "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_token_pools/managed_token_pool" mcmsbind "github.com/smartcontractkit/chainlink-aptos/bindings/mcms" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" aptoscs "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/config" @@ -38,6 +39,7 @@ var testTokenTransferFeeConfig = fee_quoter.TokenTransferFeeConfig{ } func TestAddTokenPool_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-2088") t.Parallel() // Setup environment and config with 1 Aptos chain diff --git a/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go b/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go index 61c78d4556f..a6a0b0920fe 100644 --- a/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go +++ b/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-aptos/bindings/ccip" "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_offramp" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/chain" aptoschain "github.com/smartcontractkit/chainlink-deployments-framework/chain/aptos" @@ -31,6 +32,7 @@ import ( func TestDeployAptosChainImp_VerifyPreconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string env cldf.Environment @@ -239,6 +241,7 @@ func TestDeployAptosChainImp_VerifyPreconditions(t *testing.T) { func TestDeployAptosChain_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // Setup environment with 1 Aptos chain selector := chain_selectors.APTOS_LOCALNET.Selector diff --git a/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go b/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go index 584a5d29fc9..ed12d33e8da 100644 --- a/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go +++ b/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_offramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" aptoscs "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/globals" @@ -22,6 +23,7 @@ import ( func TestSetOCR3Offramp_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // Setup environment and config deployedEnvironment, _ := testhelpers.NewMemoryEnvironment( t, diff --git a/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go b/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go index 51b18d37a7d..558546d40b5 100644 --- a/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go +++ b/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_offramp" "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_onramp" "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_router" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" aptoscs "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/aptos/config" @@ -32,6 +33,7 @@ import ( func TestAddAptosLanes_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // Setup environment and config deployedEnvironment, _ := testhelpers.NewMemoryEnvironment( t, diff --git a/deployment/ccip/changeset/ccip-attestation/cs_configure_evm_signer_registry_test.go b/deployment/ccip/changeset/ccip-attestation/cs_configure_evm_signer_registry_test.go index c90b15fd136..bca72af6d1c 100644 --- a/deployment/ccip/changeset/ccip-attestation/cs_configure_evm_signer_registry_test.go +++ b/deployment/ccip/changeset/ccip-attestation/cs_configure_evm_signer_registry_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" ccip_attestation "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/ccip-attestation" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -53,6 +54,7 @@ func deployTestSignerRegistry(t *testing.T, env cldf.Environment, selector uint6 func TestEVMSignerRegistryConfiguration_Preconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := uint64(ccip_attestation.BaseMainnetSelector) e, err := environment.New(t.Context(), @@ -137,6 +139,7 @@ func TestEVMSignerRegistryConfiguration_Preconditions(t *testing.T) { func TestEVMSignerRegistryConfiguration_StateValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := uint64(ccip_attestation.BaseMainnetSelector) rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -186,6 +189,7 @@ func TestEVMSignerRegistryConfiguration_StateValidation(t *testing.T) { func TestEVMSignerRegistryConfiguration_DirectExecution(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := uint64(ccip_attestation.BaseMainnetSelector) rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -235,6 +239,7 @@ func TestEVMSignerRegistryConfiguration_DirectExecution(t *testing.T) { func TestEVMSignerRegistryConfiguration_NoRegistries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := uint64(ccip_attestation.BaseMainnetSelector) rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/ccip/changeset/ccip-attestation/cs_deploy_evm_signer_registry_test.go b/deployment/ccip/changeset/ccip-attestation/cs_deploy_evm_signer_registry_test.go index 81e584f9966..8840c2bcad4 100644 --- a/deployment/ccip/changeset/ccip-attestation/cs_deploy_evm_signer_registry_test.go +++ b/deployment/ccip/changeset/ccip-attestation/cs_deploy_evm_signer_registry_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" ccip_attestation "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/ccip-attestation" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" @@ -54,6 +55,7 @@ func makeSigners(n int) []signer_registry.ISignerRegistrySigner { func TestEVMSignerRegistry_Preconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Create a minimal environment for precondition tests e, terr := environment.New(t.Context(), @@ -195,6 +197,7 @@ func TestEVMSignerRegistry_Preconditions(t *testing.T) { func TestEVMSignerRegistry_DeploysOnlyOnBaseChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Create environment with Base Mainnet and Base Sepolia chain IDs baseMainnetSelector := uint64(ccip_attestation.BaseMainnetSelector) @@ -255,6 +258,7 @@ func TestEVMSignerRegistry_DeploysOnlyOnBaseChains(t *testing.T) { func TestEVMSignerRegistry_SkipsNonBaseChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Create environment with non-Base chains rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/ccip/changeset/crossfamily/cs_set_token_transfer_fee_config_test.go b/deployment/ccip/changeset/crossfamily/cs_set_token_transfer_fee_config_test.go index a14ee8b2299..5d252f86752 100644 --- a/deployment/ccip/changeset/crossfamily/cs_set_token_transfer_fee_config_test.go +++ b/deployment/ccip/changeset/crossfamily/cs_set_token_transfer_fee_config_test.go @@ -32,6 +32,7 @@ import ( solstateview "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview/solana" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/crossfamily" ccip_cs_sol_v0_1_1 "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana_v0_1_1" ) @@ -89,6 +90,7 @@ func getSolanaTokenTransferFeeConfig(t *testing.T, tEnv cldf.Environment, srcSel } func TestSetTokenTransferFeeConfig_Validations(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Build a mixed env with EVM + non-EVM so we can validate both families in one table-driven test env, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithCCIPSolanaContractVersion(ccip_cs_sol_v0_1_1.SolanaContractV0_1_1), @@ -281,6 +283,7 @@ func TestSetTokenTransferFeeConfig_Validations(t *testing.T) { } func TestSetTokenTransferFeeConfig_EmptyConfigIsGracefullyHandled(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") env, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithCCIPSolanaContractVersion(ccip_cs_sol_v0_1_1.SolanaContractV0_1_1), testhelpers.WithNumOfChains(2), @@ -297,6 +300,7 @@ func TestSetTokenTransferFeeConfig_EmptyConfigIsGracefullyHandled(t *testing.T) } func TestSetTokenTransferFeeConfig_EVM_V1_6_0_Only(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Setup EVM environment env, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2)) @@ -360,6 +364,7 @@ func TestSetTokenTransferFeeConfig_EVM_V1_6_0_Only(t *testing.T) { } func TestSetTokenTransferFeeConfig_EVM_V1_5_1_Only(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Setup EVM environment env, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfChains(2), @@ -455,6 +460,7 @@ func TestSetTokenTransferFeeConfig_EVM_V1_5_1_Only(t *testing.T) { } func TestSetTokenTransferFeeConfig_Solana_V0_1_0_Only(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Setup Solana environment env, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithCCIPSolanaContractVersion(ccip_cs_sol_v0_1_1.SolanaContractV0_1_1), @@ -548,6 +554,7 @@ func TestSetTokenTransferFeeConfig_Solana_V0_1_0_Only(t *testing.T) { } func TestSetTokenTransferFeeConfig_MixedFamilies_SingleApply(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Build a mixed env with EVM + non-EVM env, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithCCIPSolanaContractVersion(ccip_cs_sol_v0_1_1.SolanaContractV0_1_1), diff --git a/deployment/ccip/changeset/crossfamily/v1_6/cs_add_evm_solana_lane_test.go b/deployment/ccip/changeset/crossfamily/v1_6/cs_add_evm_solana_lane_test.go index 60a250ac701..d3701d66647 100644 --- a/deployment/ccip/changeset/crossfamily/v1_6/cs_add_evm_solana_lane_test.go +++ b/deployment/ccip/changeset/crossfamily/v1_6/cs_add_evm_solana_lane_test.go @@ -21,6 +21,7 @@ import ( solState "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/state" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" crossfamily "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/crossfamily/v1_6" ccipChangesetSolana "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana_v0_1_0" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" @@ -30,6 +31,7 @@ import ( ) func TestAddEVMSolanaLaneBidirectional(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1741") for _, tc := range []struct { name string diff --git a/deployment/ccip/changeset/cs_grant_and_mint_link_token_test.go b/deployment/ccip/changeset/cs_grant_and_mint_link_token_test.go index 18a416d89cc..7e979b5a836 100644 --- a/deployment/ccip/changeset/cs_grant_and_mint_link_token_test.go +++ b/deployment/ccip/changeset/cs_grant_and_mint_link_token_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" tokencs "github.com/smartcontractkit/chainlink/deployment/tokens/changesets" @@ -21,6 +22,7 @@ import ( func TestDeployLinktokenAndTransferOwnershipCS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -83,6 +85,7 @@ func TestDeployLinktokenAndTransferOwnershipCS(t *testing.T) { func TestDeployLinktokenAndGrantMintRole(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/ccip/changeset/cs_orchestrate_changesets_test.go b/deployment/ccip/changeset/cs_orchestrate_changesets_test.go index f52b4526198..87fff2769c1 100644 --- a/deployment/ccip/changeset/cs_orchestrate_changesets_test.go +++ b/deployment/ccip/changeset/cs_orchestrate_changesets_test.go @@ -24,6 +24,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" ) @@ -110,6 +111,7 @@ func newRuntimeWithMCMS(t *testing.T) *runtime.Runtime { } func TestOrchestrateChangesets_VerifyPreconditions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("description failure", func(t *testing.T) { env, err := environment.New(t.Context(), environment.WithLogger(logger.Test(t)), @@ -180,6 +182,7 @@ func TestOrchestrateChangesets_VerifyPreconditions(t *testing.T) { } func TestOrchestrateChangesets_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("first fails", func(t *testing.T) { rt := newRuntimeWithMCMS(t) @@ -258,6 +261,7 @@ func TestOrchestrateChangesets_Apply(t *testing.T) { } func TestOrchestrateChangesetsConfig_MCMSGetsOverridden(t *testing.T) { + tests.BelongsToCISuite(t, "unit") rt := newRuntimeWithMCMS(t) env := rt.Environment() state, err := stateview.LoadOnchainState(env) diff --git a/deployment/ccip/changeset/cs_prerequisites_test.go b/deployment/ccip/changeset/cs_prerequisites_test.go index 1329b5dd842..13f7cc61bdc 100644 --- a/deployment/ccip/changeset/cs_prerequisites_test.go +++ b/deployment/ccip/changeset/cs_prerequisites_test.go @@ -20,6 +20,7 @@ import ( func TestDeployPrerequisites(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 2), @@ -35,6 +36,7 @@ func TestDeployPrerequisitesZk(t *testing.T) { tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-6427") t.Parallel() + tests.BelongsToCISuite(t, "with-db") // ? e, err := environment.New(t.Context(), environment.WithZKSyncContainerN(t, 2), diff --git a/deployment/ccip/changeset/globals/ocr3_test.go b/deployment/ccip/changeset/globals/ocr3_test.go index 8c45f748987..58f8116aa6b 100644 --- a/deployment/ccip/changeset/globals/ocr3_test.go +++ b/deployment/ccip/changeset/globals/ocr3_test.go @@ -5,9 +5,12 @@ import ( "time" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_MergeWithOverrides(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.Equal(t, ExecOCRParams.DeltaProgress, ExecOCRParamsForEthereum.DeltaProgress) assert.Equal(t, ExecOCRParams.DeltaResend, ExecOCRParamsForEthereum.DeltaResend) assert.Equal(t, ExecOCRParams.DeltaInitial, ExecOCRParamsForEthereum.DeltaInitial) diff --git a/deployment/ccip/changeset/save_existing_test.go b/deployment/ccip/changeset/save_existing_test.go index 1469326a6fd..ec5f017cc00 100644 --- a/deployment/ccip/changeset/save_existing_test.go +++ b/deployment/ccip/changeset/save_existing_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" @@ -24,6 +25,7 @@ import ( func TestSaveExistingCCIP(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithEVMSimulatedN(t, 2), diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go index 13b509ac698..22022292d4c 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go @@ -39,6 +39,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) @@ -81,6 +82,7 @@ func deployTokenAndMint(t *testing.T, tenv cldf.Environment, solChain uint64, wa // remote chain setup func TestAddRemoteChainWithMcms(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") doTestAddRemoteChain(t, true) } @@ -643,6 +645,7 @@ func doTestBilling(t *testing.T, mcms bool) { } func TestBillingWithMcms(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1723") t.Parallel() doTestBilling(t, true) @@ -655,6 +658,7 @@ func TestBillingWithoutMcms(t *testing.T) { } func TestSetTokenAuthority(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1778") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) @@ -877,6 +881,7 @@ func doTestTokenAdminRegistry(t *testing.T, mcms bool) { } func TestTokenAdminRegistryWithMcms(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1720") t.Parallel() doTestTokenAdminRegistry(t, true) @@ -988,6 +993,7 @@ func doTestPoolLookupTable(t *testing.T, e cldf.Environment, mcms bool, tokenMet } func TestPoolLookupTableWithMcms(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1753") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) @@ -1010,6 +1016,7 @@ func TestDeployCCIPContracts(t *testing.T) { // ocr3 test func TestSetOcr3Active(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1775") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, @@ -1040,6 +1047,7 @@ func TestSetOcr3Active(t *testing.T) { } func TestSetOcr3Candidate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1771") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go index db838bcccc5..eb4682023e8 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/globals" ccipChangesetSolana "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana_v0_1_1" @@ -104,6 +105,7 @@ func initialDeployCS(t *testing.T, e cldf.Environment, buildConfig *ccipChangese // use this for a quick deploy test func TestDeployChainContractsChangesetPreload(t *testing.T) { + tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-1729") t.Parallel() diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go index ea6d8239624..f30cb6025aa 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go @@ -23,10 +23,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared" solanastateview "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview/solana" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) func TestSolanaTokenOps(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1728") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(changeset_solana.SolanaContractV0_1_1)) @@ -177,6 +179,7 @@ func TestSolanaTokenOps(t *testing.T) { } func TestDeployLinkToken(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithSolanaContainer(t, []uint64{selector}, t.TempDir(), map[string]string{}), diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go index 9f0fa465a1e..e20b4eae22c 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go @@ -39,6 +39,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) @@ -58,6 +59,7 @@ func TestAddTokenPoolWithoutMcms(t *testing.T) { } func TestAddTokenPoolWithMcms(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1797") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) @@ -672,6 +674,7 @@ var zeroRateLimitConfig = ccipChangesetSolana.RateLimiterConfig{ } func TestAddTokenPoolE2EWithMcms(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1774") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) diff --git a/deployment/ccip/changeset/solana_v0_1_1/save_existing_test.go b/deployment/ccip/changeset/solana_v0_1_1/save_existing_test.go index 7719644964e..0020540d588 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/save_existing_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/save_existing_test.go @@ -12,6 +12,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/shared" "github.com/smartcontractkit/chainlink/deployment/ccip/shared/stateview" @@ -21,6 +22,7 @@ import ( func TestSaveExistingCCIP(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, err := environment.New(t.Context()) require.NoError(t, err) @@ -60,6 +62,7 @@ func TestSaveExistingCCIP(t *testing.T) { func TestSaveExisting(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e, err := environment.New(t.Context()) require.NoError(t, err) diff --git a/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go b/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go index 859d45fdbcd..29217da5309 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go @@ -32,6 +32,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) @@ -44,6 +45,7 @@ func TestOnboardTokenPoolForSelfServeWithMCMs(t *testing.T) { func TestOnboardTokenPoolForSelfServeWithoutMCMs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") doTestOnboardTokenPoolForSelfServe(t, false) } diff --git a/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go b/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go index ef1c7d8af0a..6a5d4927234 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go @@ -26,6 +26,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/globals" ccipChangesetSolana "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/solana_v0_1_1" @@ -41,6 +42,7 @@ import ( ) func TestValidateContracts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validPubkey := solana.NewWallet().PublicKey() zeroPubkey := solana.PublicKey{} // Zero public key @@ -103,6 +105,7 @@ func TestValidateContracts(t *testing.T) { } func TestValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_22222222222222222222222222222222222222222222.Selector tests := []struct { diff --git a/deployment/ccip/changeset/testhelpers/cciptesthelpertypes/types_test.go b/deployment/ccip/changeset/testhelpers/cciptesthelpertypes/types_test.go index b709adb9e2a..33b5d01cbb5 100644 --- a/deployment/ccip/changeset/testhelpers/cciptesthelpertypes/types_test.go +++ b/deployment/ccip/changeset/testhelpers/cciptesthelpertypes/types_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers/cciptesthelpertypes/mocks" ) @@ -23,6 +24,7 @@ func chainSelectorSlice(n int) []cciptypes.ChainSelector { } func TestRandomTopology_getChainToFChainMapping(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { chainSelectors []cciptypes.ChainSelector } @@ -156,6 +158,7 @@ func generateTestP2PIDs(count int) [][32]byte { } func TestRandomTopology_getNodesForChain(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { fChain int nonBootstrapP2pIDs [][32]byte @@ -278,6 +281,7 @@ func TestRandomTopology_getNodesForChain(t *testing.T) { } func TestRandomTopology_validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") const homeChainSelector = 1 type args struct { chainSelectors []cciptypes.ChainSelector @@ -402,6 +406,7 @@ func TestRandomTopology_validate(t *testing.T) { } func TestRandomTopology_ChainToNodeMapping(t *testing.T) { + tests.BelongsToCISuite(t, "unit") const homeChainSelector = 1 type args struct { nonBootstrapP2pIDs [][32]byte @@ -587,6 +592,7 @@ func TestRandomTopology_ChainToNodeMapping(t *testing.T) { } func TestTopology_ChainToNodeMapping(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { nonBootstrapP2pIDs [][32]byte nonHomeChainSelectors []cciptypes.ChainSelector diff --git a/deployment/ccip/changeset/v1_5_1/cs_add_token_e2e_test.go b/deployment/ccip/changeset/v1_5_1/cs_add_token_e2e_test.go index 125ebea433d..c24e733fc60 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_add_token_e2e_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_add_token_e2e_test.go @@ -21,6 +21,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/v1_5_1" @@ -33,6 +34,7 @@ import ( func TestAddTokenE2E(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go b/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go index eeab6728494..f99d270003a 100644 --- a/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go +++ b/deployment/ccip/changeset/v1_5_1/cs_configure_token_pools_test.go @@ -725,8 +725,9 @@ func TestValidateConfigureTokenPoolContracts(t *testing.T) { } func TestValidateConfigureTokenPoolContractsForSolana(t *testing.T) { - quarantine.Flaky(t, "DX-1726") t.Parallel() + quarantine.Flaky(t, "DX-1726") + tests.BelongsToCISuite(t, "with-db") var err error deployedEnvironment, _ := testhelpers.NewMemoryEnvironment(t, func(testCfg *testhelpers.TestConfigs) { diff --git a/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go b/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go index c3484731c74..c4868b05524 100644 --- a/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go +++ b/deployment/ccip/changeset/v1_6_2/cs_configure_cctp_message_transmitter_proxy_test.go @@ -189,9 +189,9 @@ func TestValidateConfigureCCTPMessageTransmitterProxyInput(t *testing.T) { } func TestConfigureCCTPMessageTransmitterProxy(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-2064") t.Parallel() + quarantine.Flaky(t, "DX-2064") + tests.BelongsToCISuite(t, "with-db") rt := setupCCTPMsgTransmitterProxyEnvironmentForConfigure(t, true) chains := rt.Environment().BlockChains.EVMChains() diff --git a/deployment/ccip/manualexechelpers/exec_test.go b/deployment/ccip/manualexechelpers/exec_test.go index 3b7b2a5ec20..f22525999f3 100644 --- a/deployment/ccip/manualexechelpers/exec_test.go +++ b/deployment/ccip/manualexechelpers/exec_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/manualexechelpers" ) func TestRootMap_AddAndGet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Mock data root1 := manualexechelpers.RootCacheEntry{Root: offramp.InternalMerkleRoot{MinSeqNr: 1, MaxSeqNr: 10}, BlockNumber: 1} root2 := manualexechelpers.RootCacheEntry{Root: offramp.InternalMerkleRoot{MinSeqNr: 11, MaxSeqNr: 20}, BlockNumber: 2} diff --git a/deployment/ccip/shared/token_info_test.go b/deployment/ccip/shared/token_info_test.go index 8c0d468be49..cf31e5e4f63 100644 --- a/deployment/ccip/shared/token_info_test.go +++ b/deployment/ccip/shared/token_info_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNewMergedRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string newTokens map[string][]TokenSymbol diff --git a/deployment/ccip/view/v1_2/price_registry_test.go b/deployment/ccip/view/v1_2/price_registry_test.go index 4b5701f9cbd..2463e589427 100644 --- a/deployment/ccip/view/v1_2/price_registry_test.go +++ b/deployment/ccip/view/v1_2/price_registry_test.go @@ -12,12 +12,14 @@ import ( price_registry_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/price_registry" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func TestGeneratePriceRegistryView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector e, err := environment.New(t.Context(), diff --git a/deployment/ccip/view/v1_5/offramp_test.go b/deployment/ccip/view/v1_5/offramp_test.go index 31826ed6b91..38c31eccac3 100644 --- a/deployment/ccip/view/v1_5/offramp_test.go +++ b/deployment/ccip/view/v1_5/offramp_test.go @@ -19,10 +19,12 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOffRampView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") srcSelector := chainsel.TEST_90000001.Selector dstSelector := chainsel.TEST_90000002.Selector diff --git a/deployment/ccip/view/v1_5/onramp_test.go b/deployment/ccip/view/v1_5/onramp_test.go index a69f7179c26..ed8ddbcf681 100644 --- a/deployment/ccip/view/v1_5/onramp_test.go +++ b/deployment/ccip/view/v1_5/onramp_test.go @@ -13,12 +13,14 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func TestOnRampView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainsel.TEST_90000001.Selector e, err := environment.New(t.Context(), diff --git a/deployment/ccip/view/v1_5/rmn_test.go b/deployment/ccip/view/v1_5/rmn_test.go index a87ef1c56d3..e9aaa7dacdc 100644 --- a/deployment/ccip/view/v1_5/rmn_test.go +++ b/deployment/ccip/view/v1_5/rmn_test.go @@ -12,11 +12,13 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/rmn_contract" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func TestGenerateRMNView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainsel.TEST_90000001.Selector e, err := environment.New(t.Context(), diff --git a/deployment/ccip/view/v1_6/ccip_home_test.go b/deployment/ccip/view/v1_6/ccip_home_test.go index d8aad15b836..6278480a607 100644 --- a/deployment/ccip/view/v1_6/ccip_home_test.go +++ b/deployment/ccip/view/v1_6/ccip_home_test.go @@ -12,12 +12,14 @@ import ( capabilities_registry "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/ccip_home" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func TestCCIPHomeView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector e, err := environment.New(t.Context(), diff --git a/deployment/ccip/view/v1_6/rmnremote_test.go b/deployment/ccip/view/v1_6/rmnremote_test.go index 1fca5d52a85..9a7c601dde6 100644 --- a/deployment/ccip/view/v1_6/rmnremote_test.go +++ b/deployment/ccip/view/v1_6/rmnremote_test.go @@ -13,11 +13,13 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/globals" ) func Test_RMNRemote_Curse_View(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector e, err := environment.New(t.Context(), @@ -51,31 +53,37 @@ func Test_RMNRemote_Curse_View(t *testing.T) { } func Test_RMN_Selector_To_Solana_Subject(t *testing.T) { + tests.BelongsToCISuite(t, "unit") subject := globals.FamilyAwareSelectorToSubject(chainselectors.BINANCE_SMART_CHAIN_TESTNET.Selector, chainselectors.FamilySolana) require.Equal(t, []byte{251, 150, 143, 3, 112, 145, 21, 184, 0, 0, 0, 0, 0, 0, 0, 0}, subject[:]) } func Test_RMN_Subject_To_Solana_Selector(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := globals.FamilyAwareSubjectToSelector([16]byte{251, 150, 143, 3, 112, 145, 21, 184, 0, 0, 0, 0, 0, 0, 0, 0}, chainselectors.FamilySolana) require.Equal(t, chainselectors.BINANCE_SMART_CHAIN_TESTNET.Selector, selector) } func Test_RMN_Selector_To_Subject(t *testing.T) { + tests.BelongsToCISuite(t, "unit") subject := globals.FamilyAwareSelectorToSubject(chainselectors.BINANCE_SMART_CHAIN_TESTNET.Selector, chainselectors.FamilyEVM) require.Equal(t, []byte{0, 0, 0, 0, 0, 0, 0, 0, 184, 21, 145, 112, 3, 143, 150, 251}, subject[:]) } func Test_RMN_Subject_To_Selector(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := globals.FamilyAwareSubjectToSelector([16]byte{0, 0, 0, 0, 0, 0, 0, 0, 184, 21, 145, 112, 3, 143, 150, 251}, chainselectors.FamilyEVM) require.Equal(t, chainselectors.BINANCE_SMART_CHAIN_TESTNET.Selector, selector) } func Test_GlobalSubject_To_Selector(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := globals.FamilyAwareSubjectToSelector(globals.GlobalCurseSubject(), chainselectors.FamilyEVM) require.Equal(t, uint64(0), selector) } func Test_GlobalSubject_To_Selector_Solana(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := globals.FamilyAwareSubjectToSelector(globals.GlobalCurseSubject(), chainselectors.FamilySolana) require.Equal(t, uint64(0), selector) } diff --git a/deployment/common/changeset/deploy_link_token_test.go b/deployment/common/changeset/deploy_link_token_test.go index 95b5fb80d50..3f8c4940c80 100644 --- a/deployment/common/changeset/deploy_link_token_test.go +++ b/deployment/common/changeset/deploy_link_token_test.go @@ -18,6 +18,7 @@ import ( func TestDeployLinkToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/common/changeset/deploy_mcms_with_timelock_test.go b/deployment/common/changeset/deploy_mcms_with_timelock_test.go index 82d715a95ca..23574f329ef 100644 --- a/deployment/common/changeset/deploy_mcms_with_timelock_test.go +++ b/deployment/common/changeset/deploy_mcms_with_timelock_test.go @@ -37,6 +37,7 @@ import ( ) func TestGrantRoleInTimeLock(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulatedWithConfig(t, []uint64{selector}, onchain.EVMSimLoaderConfig{ @@ -122,6 +123,7 @@ func TestGrantRoleInTimeLock(t *testing.T) { } func TestDeployMCMSWithTimelockV2WithFewExistingContracts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() selector1 := chain_selectors.TEST_90000001.Selector @@ -254,6 +256,7 @@ func TestDeployMCMSWithTimelockV2WithFewExistingContracts(t *testing.T) { } func TestDeployMCMSWithTimelockV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-1719") t.Parallel() diff --git a/deployment/common/changeset/evm/mcms/mcms_test.go b/deployment/common/changeset/evm/mcms/mcms_test.go index 41a9dc59455..76a61de1423 100644 --- a/deployment/common/changeset/evm/mcms/mcms_test.go +++ b/deployment/common/changeset/evm/mcms/mcms_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/onchain" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evminternal "github.com/smartcontractkit/chainlink/deployment/common/changeset/evm/mcms" "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -20,6 +21,7 @@ import ( ) func TestDeployMCMSWithConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) selector := chainsel.TEST_90000001.Selector @@ -60,6 +62,7 @@ func TestDeployMCMSWithConfig(t *testing.T) { } func TestDeployMCMSWithTimelockContracts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chainsel.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulated(t, []uint64{selector}), diff --git a/deployment/common/changeset/example/add_mint_burners_link_test.go b/deployment/common/changeset/example/add_mint_burners_link_test.go index 9acc72a4b20..8aaf19ba678 100644 --- a/deployment/common/changeset/example/add_mint_burners_link_test.go +++ b/deployment/common/changeset/example/add_mint_burners_link_test.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/changeset/example" ) @@ -14,6 +15,7 @@ import ( // TestAddMintersBurnersLink tests the AddMintersBurnersLink changeset func TestAddMintersBurnersLink(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( ctx = t.Context() diff --git a/deployment/common/changeset/example/datastore/exemplar_deploy_link_token_test.go b/deployment/common/changeset/example/datastore/exemplar_deploy_link_token_test.go index 21ebc5bed96..21259a1d96a 100644 --- a/deployment/common/changeset/example/datastore/exemplar_deploy_link_token_test.go +++ b/deployment/common/changeset/example/datastore/exemplar_deploy_link_token_test.go @@ -6,11 +6,13 @@ import ( chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func Test_ExemplarDeployLinkToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulated(t, []uint64{selector})) diff --git a/deployment/common/changeset/example/link_transfer_test.go b/deployment/common/changeset/example/link_transfer_test.go index 8ce4cd50626..1845453c6b6 100644 --- a/deployment/common/changeset/example/link_transfer_test.go +++ b/deployment/common/changeset/example/link_transfer_test.go @@ -19,6 +19,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/types" ) @@ -55,6 +56,7 @@ func setupLinkTransferRuntime(t *testing.T) (*runtime.Runtime, uint64) { } func TestValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") rt, selector := setupLinkTransferRuntime(t) chain := rt.Environment().BlockChains.EVMChains()[selector] @@ -227,6 +229,7 @@ func TestValidate(t *testing.T) { func TestLinkTransferMCMSV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( ctx = t.Context() diff --git a/deployment/common/changeset/example/mint_link_test.go b/deployment/common/changeset/example/mint_link_test.go index 6796db0d0ea..374f074c721 100644 --- a/deployment/common/changeset/example/mint_link_test.go +++ b/deployment/common/changeset/example/mint_link_test.go @@ -11,6 +11,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/changeset/example" ) @@ -18,6 +19,7 @@ import ( // TestMintLink tests the MintLink changeset func TestMintLink(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( ctx = t.Context() diff --git a/deployment/common/changeset/example/operations/deploy_and_mint_example_test.go b/deployment/common/changeset/example/operations/deploy_and_mint_example_test.go index aa9d83a726f..89c9dab777a 100644 --- a/deployment/common/changeset/example/operations/deploy_and_mint_example_test.go +++ b/deployment/common/changeset/example/operations/deploy_and_mint_example_test.go @@ -8,10 +8,12 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func TestDeployAndMintExampleChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulated(t, []uint64{selector})) require.NoError(t, err) diff --git a/deployment/common/changeset/example/operations/retry_config_example_test.go b/deployment/common/changeset/example/operations/retry_config_example_test.go index dee3e2c0309..e60fb256730 100644 --- a/deployment/common/changeset/example/operations/retry_config_example_test.go +++ b/deployment/common/changeset/example/operations/retry_config_example_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) func TestDisableRetryExampleChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context()) require.NoError(t, err) @@ -19,6 +21,7 @@ func TestDisableRetryExampleChangeset(t *testing.T) { } func TestUpdateInputExampleChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context()) require.NoError(t, err) diff --git a/deployment/common/changeset/example/operations/terminal_error_example_test.go b/deployment/common/changeset/example/operations/terminal_error_example_test.go index dcc60ac7538..bf89393c1ba 100644 --- a/deployment/common/changeset/example/operations/terminal_error_example_test.go +++ b/deployment/common/changeset/example/operations/terminal_error_example_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" ) func TestTerminalErrorExampleChangeset(t *testing.T) { + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context()) require.NoError(t, err) diff --git a/deployment/common/changeset/example/solana_transfer_mcm_test.go b/deployment/common/changeset/example/solana_transfer_mcm_test.go index ad353fcc8e4..3d73d453221 100644 --- a/deployment/common/changeset/example/solana_transfer_mcm_test.go +++ b/deployment/common/changeset/example/solana_transfer_mcm_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/changeset/example" @@ -33,6 +34,7 @@ import ( func TestTransferFromTimelockConfig_VerifyPreconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") receiverKey := solana.NewWallet().PublicKey() selector := chainselectors.TEST_22222222222222222222222222222222222222222222.Selector @@ -188,8 +190,9 @@ func TestTransferFromTimelockConfig_VerifyPreconditions(t *testing.T) { } func TestTransferFromTimelockConfig_Apply(t *testing.T) { - quarantine.Flaky(t, "DX-1754") t.Parallel() + quarantine.Flaky(t, "DX-1754") + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_22222222222222222222222222222222222222222222.Selector programsPath, programIDs, ab := soltestutils.PreloadMCMS(t, selector) diff --git a/deployment/common/changeset/mcms_firedrill_test.go b/deployment/common/changeset/mcms_firedrill_test.go index 1fb65662a6c..8286f655dc4 100644 --- a/deployment/common/changeset/mcms_firedrill_test.go +++ b/deployment/common/changeset/mcms_firedrill_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -25,6 +26,7 @@ import ( func TestMCMSSignFireDrillChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") evmSelector1 := chain_selectors.TEST_90000001.Selector evmSelector2 := chain_selectors.TEST_90000002.Selector diff --git a/deployment/common/changeset/save_existing_test.go b/deployment/common/changeset/save_existing_test.go index 97bd88987cb..12062f0c7ea 100644 --- a/deployment/common/changeset/save_existing_test.go +++ b/deployment/common/changeset/save_existing_test.go @@ -12,12 +12,14 @@ import ( cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestSaveExisting(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dummyEnv := cldf.Environment{ Name: "dummy", Logger: logger.TestLogger(t), @@ -61,6 +63,7 @@ func TestSaveExisting(t *testing.T) { } func TestSaveExistingAddressWithLabels(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dummyEnv := cldf.Environment{ Name: "dummy", Logger: logger.TestLogger(t), @@ -100,6 +103,7 @@ func TestSaveExistingAddressWithLabels(t *testing.T) { } func TestSaveExistingMCMSAddressWithLabels(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dummyEnv := cldf.Environment{ Name: "dummy", Logger: logger.TestLogger(t), diff --git a/deployment/common/changeset/set_config_mcms_test.go b/deployment/common/changeset/set_config_mcms_test.go index 2e392ae3dee..9c1a133bb62 100644 --- a/deployment/common/changeset/set_config_mcms_test.go +++ b/deployment/common/changeset/set_config_mcms_test.go @@ -32,6 +32,7 @@ import ( func TestSetConfigMCMSV2EVM(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector1 := chain_selectors.TEST_90000001.Selector selector2 := chain_selectors.TEST_90000002.Selector @@ -167,6 +168,7 @@ func TestSetConfigMCMSV2EVM(t *testing.T) { func TestSetConfigMCMSV2Solana(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector @@ -516,6 +518,7 @@ func createSolSigner(t *testing.T) (*ecdsa.PrivateKey, common.Address) { func TestSetConfigMCMSV2Partial(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector diff --git a/deployment/common/changeset/solana/fund_mcm_pdas_test.go b/deployment/common/changeset/solana/fund_mcm_pdas_test.go index 9ba8f1ec560..a8d23cec075 100644 --- a/deployment/common/changeset/solana/fund_mcm_pdas_test.go +++ b/deployment/common/changeset/solana/fund_mcm_pdas_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( func TestFundMCMSignersChangeset_VerifyPreconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector1 := chainselectors.TEST_22222222222222222222222222222222222222222222.Selector selector2 := chainselectors.TEST_33333333333333333333333333333333333333333333.Selector @@ -205,6 +207,7 @@ func TestFundMCMSignersChangeset_VerifyPreconditions(t *testing.T) { } func TestFundMCMSignersChangeset_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-1776") t.Parallel() diff --git a/deployment/common/changeset/solana/transfer_ownership_test.go b/deployment/common/changeset/solana/transfer_ownership_test.go index 9e6714737f0..97b934e90ba 100644 --- a/deployment/common/changeset/solana/transfer_ownership_test.go +++ b/deployment/common/changeset/solana/transfer_ownership_test.go @@ -16,14 +16,16 @@ import ( cldf_solana "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/deployment/internal/soltestutils" ) func TestTransferToMCMSToTimelockSolana(t *testing.T) { - quarantine.Flaky(t, "DX-1773") t.Parallel() + quarantine.Flaky(t, "DX-1773") + tests.BelongsToCISuite(t, "unit") // --- arrange --- rt, selector := setupTest(t) diff --git a/deployment/common/changeset/solana/update_delay_timelock_test.go b/deployment/common/changeset/solana/update_delay_timelock_test.go index 4981e484f5c..50ea1d7824a 100644 --- a/deployment/common/changeset/solana/update_delay_timelock_test.go +++ b/deployment/common/changeset/solana/update_delay_timelock_test.go @@ -24,6 +24,7 @@ import ( func TestUpdateTimelockDelaySolana_VerifyPreconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector1 := chainselectors.TEST_22222222222222222222222222222222222222222222.Selector selector2 := chainselectors.TEST_33333333333333333333333333333333333333333333.Selector @@ -127,6 +128,7 @@ func TestUpdateTimelockDelaySolana_VerifyPreconditions(t *testing.T) { func TestUpdateTimelockDelaySolana_Apply(t *testing.T) { tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-762") t.Parallel() + tests.BelongsToCISuite(t, "unit") // ? rt, selector := setupTest(t) require.Len(t, rt.Environment().BlockChains.SolanaChains(), 1) diff --git a/deployment/common/changeset/state/evm_test.go b/deployment/common/changeset/state/evm_test.go index d0f4b9f73f2..09284882902 100644 --- a/deployment/common/changeset/state/evm_test.go +++ b/deployment/common/changeset/state/evm_test.go @@ -17,6 +17,7 @@ import ( cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink/deployment" @@ -24,6 +25,7 @@ import ( ) func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulated(t, []uint64{selector}), @@ -132,6 +134,7 @@ func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewV2(t *testing.T) { } func TestAddressesForChain(t *testing.T) { + tests.BelongsToCISuite(t, "unit") chainSelector := chain_selectors.ETHEREUM_MAINNET.Selector t.Run("environment with AddressBook only", func(t *testing.T) { diff --git a/deployment/common/changeset/state_test.go b/deployment/common/changeset/state_test.go index 97c90c7d426..4b596d873d9 100644 --- a/deployment/common/changeset/state_test.go +++ b/deployment/common/changeset/state_test.go @@ -16,9 +16,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestMaybeLoadMCMSWithTimelockChainState(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type testCase struct { name string chain cldf_evm.Chain diff --git a/deployment/common/changeset/test_helpers_test.go b/deployment/common/changeset/test_helpers_test.go index 5a36599c2e0..12371510b13 100644 --- a/deployment/common/changeset/test_helpers_test.go +++ b/deployment/common/changeset/test_helpers_test.go @@ -12,11 +12,13 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" focr "github.com/smartcontractkit/chainlink-deployments-framework/offchain/ocr" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestChangeSetLegacyFunction_PassingCase(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e := NewNoopEnvironment(t) executedCs := false @@ -42,6 +44,7 @@ func TestChangeSetLegacyFunction_PassingCase(t *testing.T) { func TestChangeSetLegacyFunction_ErrorCase(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") e := NewNoopEnvironment(t) executedCs := false @@ -81,6 +84,7 @@ func NewNoopEnvironment(t *testing.T) cldf.Environment { func TestApplyChangesetsHelpers(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") changesets := []ConfiguredChangeSet{ Configure(cldf.CreateChangeSet( diff --git a/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go b/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go index 43ca6cacaaa..9dac5353842 100644 --- a/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go +++ b/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go @@ -27,6 +27,7 @@ import ( ) func TestTransferToMCMSWithTimelockV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithEVMSimulated(t, []uint64{selector}), @@ -91,6 +92,7 @@ func TestTransferToMCMSWithTimelockV2(t *testing.T) { } func TestTransferToMCMSWithTimelockV2DataStore(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithEVMSimulated(t, []uint64{selector}), @@ -256,6 +258,7 @@ func TestRenounceTimelockDeployerConfigValidate(t *testing.T) { } func TestRenounceTimelockDeployer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithEVMSimulated(t, []uint64{selector}), diff --git a/deployment/common/proposalutils/analyze_test.go b/deployment/common/proposalutils/analyze_test.go index 5096877ad7c..162b577ffff 100644 --- a/deployment/common/proposalutils/analyze_test.go +++ b/deployment/common/proposalutils/analyze_test.go @@ -12,9 +12,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_home" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_AnalyzeRmnHomeSetConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dataEncoded := "EY26xQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+mHAtKPceHWHsUU/gZ3gbQUSqxoUZSI6A1wsufMtT1Ds0lEhXpCRE0bKF15QNbgZoIwngeB5DppZ27p+FxzwtFJl4urMXKidA5eY8JSHVPtI1h4ZiTOwbcUx4ju2t4QG2jZ8/J045hVKKkjqbrOPTnFXdd4sYe0Egs4TMSMiShZgAHkr6j6Bhgz3+4p0ob33+C3inZ/H6HxUrzaTVNBUGFa+O4yMWpkJ/FppF/cGzqRqFrEWePBy5HGnhxR8MH8IQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3kG6T8nZGtkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzPCjGiIfPJsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMEYRtq/7p2oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" data := make([]byte, base64.StdEncoding.DecodedLen(len(dataEncoded))) _, err := base64.StdEncoding.Decode(data, []byte(dataEncoded)) diff --git a/deployment/common/proposalutils/propose_test.go b/deployment/common/proposalutils/propose_test.go index 77bad4caa17..8e2806ef421 100644 --- a/deployment/common/proposalutils/propose_test.go +++ b/deployment/common/proposalutils/propose_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -28,8 +29,9 @@ import ( ) func TestBuildProposalFromBatchesV2(t *testing.T) { - quarantine.Flaky(t, "DX-1824") t.Parallel() + quarantine.Flaky(t, "DX-1824") + tests.BelongsToCISuite(t, "unit") evmSelector := chain_selectors.TEST_90000001.Selector solSelector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector diff --git a/deployment/common/view/nops_test.go b/deployment/common/view/nops_test.go index e891335a075..246372eb475 100644 --- a/deployment/common/view/nops_test.go +++ b/deployment/common/view/nops_test.go @@ -11,6 +11,7 @@ import ( "google.golang.org/grpc" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/shared/ptypes" "github.com/smartcontractkit/chainlink/deployment" @@ -20,6 +21,7 @@ import ( func TestGenerateNopsView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) // Create 3 node IDs nodeIDs := []string{"node_1", "node_2", "node_3"} diff --git a/deployment/common/view/v1_0/capreg_test.go b/deployment/common/view/v1_0/capreg_test.go index 4321f83d488..1984fc1ccfc 100644 --- a/deployment/common/view/v1_0/capreg_test.go +++ b/deployment/common/view/v1_0/capreg_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" "github.com/smartcontractkit/chainlink/deployment/common/view/types" ) func TestCapRegView_Denormalize(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { ContractMetaData types.ContractMetaData Capabilities []CapabilityView diff --git a/deployment/common/view/v1_0/link_token_test.go b/deployment/common/view/v1_0/link_token_test.go index 062388966b1..507e5ae28eb 100644 --- a/deployment/common/view/v1_0/link_token_test.go +++ b/deployment/common/view/v1_0/link_token_test.go @@ -17,6 +17,7 @@ import ( ) func TestLinkTokenView(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulated(t, []uint64{selector}), @@ -35,6 +36,7 @@ func TestLinkTokenView(t *testing.T) { func TestLinkTokenViewZk(t *testing.T) { // Timeouts in CI tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-6427") + tests.BelongsToCISuite(t, "unit") // ? selector := chainselectors.TEST_90000050.Selector env, err := environment.New(t.Context(), diff --git a/deployment/common/view/v1_0/static_link_token_test.go b/deployment/common/view/v1_0/static_link_token_test.go index 350698d72c5..237e3320f6a 100644 --- a/deployment/common/view/v1_0/static_link_token_test.go +++ b/deployment/common/view/v1_0/static_link_token_test.go @@ -12,10 +12,12 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/link_token_interface" ) func TestStaticLinkTokenView(t *testing.T) { + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), environment.WithEVMSimulated(t, []uint64{selector}), diff --git a/deployment/common/view/v1_0/workflowreg_test.go b/deployment/common/view/v1_0/workflowreg_test.go index 35e6b92da40..20a47fe695c 100644 --- a/deployment/common/view/v1_0/workflowreg_test.go +++ b/deployment/common/view/v1_0/workflowreg_test.go @@ -10,12 +10,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" workflow_registry "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/workflow_registry_wrapper_v1" "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0/mocks" ) // TestNewWorkflowView tests the helper function that converts on-chain WorkflowMetadata -> WorkflowView. func TestNewWorkflowView(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("nil input => error", func(t *testing.T) { // Updated: nil input now returns an error. wv, err := NewWorkflowView(nil) @@ -54,6 +56,7 @@ func TestNewWorkflowView(t *testing.T) { // TestGenerateWorkflowRegistryView uses a mock workflow registry to test the main view generation function. func TestGenerateWorkflowRegistryView(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string mockSetup func(*mocks.WorkflowRegistryInterface) @@ -171,6 +174,7 @@ func TestGenerateWorkflowRegistryView(t *testing.T) { } func TestWorkflowStatus_MarshalUnmarshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string ws WorkflowStatus diff --git a/deployment/common/view/v2_0/capreg_test.go b/deployment/common/view/v2_0/capreg_test.go index 9f636239e6e..00467582e73 100644 --- a/deployment/common/view/v2_0/capreg_test.go +++ b/deployment/common/view/v2_0/capreg_test.go @@ -10,6 +10,7 @@ import ( cr "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/capabilities_registry_wrapper_v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/view/types" "github.com/smartcontractkit/chainlink/deployment/common/view/v2_0" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/pkg" @@ -24,6 +25,7 @@ type fields struct { } func TestCapRegView_Denormalize(t *testing.T) { + tests.BelongsToCISuite(t, "unit") donConfig := map[string]any{ "defaultConfig": map[string]any{}, } diff --git a/deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go b/deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go index b00fff83995..036b4066483 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/add_capabilities_test.go @@ -13,6 +13,7 @@ import ( capabilities_registry_v2 "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/capabilities_registry_wrapper_v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/operations/contracts" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/pkg" @@ -69,6 +70,7 @@ var ( ) func TestAddCapabilities_VerifyPreconditions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cs := changeset.AddCapabilities{} env := test.SetupEnvV2(t, false) @@ -188,6 +190,7 @@ func requireCapability(t *testing.T, fixture *test.EnvWrapperV2, capID string) { } func TestAddCapabilities_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // SetupEnvV2 deploys a cap reg v2 and configures it. So no need to do that here, just leverage the existing one. fixture := test.SetupEnvV2(t, false) @@ -201,6 +204,7 @@ func TestAddCapabilities_Apply(t *testing.T) { } func TestAddCapabilities_Apply_MCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // SetupEnvV2 deploys a cap reg v2 and configures it. So no need to do that here, just leverage the existing one. fixture := test.SetupEnvV2(t, true) diff --git a/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go b/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go index 6c340e1712a..2eac34efde3 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/configure_capabilities_registry_test.go @@ -22,6 +22,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/operations" capabilities_registry_v2 "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/capabilities_registry_wrapper_v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -50,6 +51,7 @@ const ( func TestConfigureCapabilitiesRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("select by address", func(t *testing.T) { t.Parallel() @@ -129,6 +131,7 @@ func suite(t *testing.T, fixture *testFixture) { } func TestConfigureCapabilitiesRegistryInput_YAMLSerialization(t *testing.T) { + tests.BelongsToCISuite(t, "unit") originalInput := changeset.ConfigureCapabilitiesRegistryInput{ ChainSelector: 123456789, CapabilitiesRegistryAddress: "0x1234567890123456789012345678901234567890", @@ -279,6 +282,7 @@ func TestConfigureCapabilitiesRegistryInput_YAMLSerialization(t *testing.T) { } func TestConfigureCapabilitiesRegistryInput_YAMLFromFile(t *testing.T) { + tests.BelongsToCISuite(t, "unit") yamlConfig := ` chainSelector: 421614 capabilitiesRegistryAddress: "0x1234567890123456789012345678901234567890" diff --git a/deployment/cre/capabilities_registry/v2/changeset/delete_don_test.go b/deployment/cre/capabilities_registry/v2/changeset/delete_don_test.go index 5009d3a6fc9..25d7344cddc 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/delete_don_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/delete_don_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" @@ -163,6 +164,7 @@ func setupRegistryForDeleteDON(t *testing.T, secondDON bool) *delFixture { func TestDeleteDONChangeset_ByName_Direct_Succeeds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForDeleteDON(t, false) _, err := fx.registry.GetDONByName(nil, fx.donNames[0]) @@ -185,6 +187,7 @@ func TestDeleteDONChangeset_ByName_Direct_Succeeds(t *testing.T) { func TestDeleteDONChangeset_ByNames_Multi_Succeeds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForDeleteDON(t, true) // Both exist @@ -210,6 +213,7 @@ func TestDeleteDONChangeset_ByNames_Multi_Succeeds(t *testing.T) { func TestDeleteDONChangeset_VerifyPreconditions_EmptyList(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var cs changeset.DeleteDONs err := cs.VerifyPreconditions(cldf.Environment{}, changeset.DeleteDONsInput{ RegistryQualifier: "q", @@ -222,6 +226,7 @@ func TestDeleteDONChangeset_VerifyPreconditions_EmptyList(t *testing.T) { func TestDeleteDONChangeset_Apply_MissingDON_Fails(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -250,6 +255,7 @@ func TestDeleteDONChangeset_Apply_MissingDON_Fails(t *testing.T) { func TestDeleteDONChangeset_ChainNotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithLogger(logger.Test(t)), @@ -267,6 +273,7 @@ func TestDeleteDONChangeset_ChainNotFound(t *testing.T) { func TestDeleteDONChangeset_QualifierNotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -286,6 +293,7 @@ func TestDeleteDONChangeset_QualifierNotFound(t *testing.T) { func TestDeleteDON_MCMS_Configuration(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForDeleteDON(t, false) _, err := fx.registry.GetDONByName(nil, fx.donNames[0]) diff --git a/deployment/cre/capabilities_registry/v2/changeset/deploy_capabilities_registry_test.go b/deployment/cre/capabilities_registry/v2/changeset/deploy_capabilities_registry_test.go index 097ef66b2d8..8d58e8ca816 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/deploy_capabilities_registry_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/deploy_capabilities_registry_test.go @@ -8,12 +8,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" ) func TestDeployCapabilitiesRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector env, err := environment.New(t.Context(), diff --git a/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go b/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go index a9ad5313a30..4cb93d6a774 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/multiple_mcms_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( // cannot distinguish between multiple MCMS deployments on the same chain func TestMultipleMCMSDeploymentsConflict(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/cre/capabilities_registry/v2/changeset/pkg/bytes_test.go b/deployment/cre/capabilities_registry/v2/changeset/pkg/bytes_test.go index 50c09955ca8..8f2b93abbbe 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/pkg/bytes_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/pkg/bytes_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestHexStringTo32Bytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("valid hex string with 0x prefix", func(t *testing.T) { hexStr := "0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" expected := [32]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20} diff --git a/deployment/cre/capabilities_registry/v2/changeset/pkg/capability_config_test.go b/deployment/cre/capabilities_registry/v2/changeset/pkg/capability_config_test.go index 60b8ce5549c..e2170bd25e9 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/pkg/capability_config_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/pkg/capability_config_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/pkg" ) func TestCapabilityConfig_MarshalUnmarshal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("matching keys to proto", func(t *testing.T) { t.Parallel() @@ -56,6 +58,7 @@ func TestCapabilityConfig_MarshalUnmarshal(t *testing.T) { func TestCapabilityConfig_UnmarshalWithValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("unknown fields are detected and reported", func(t *testing.T) { t.Parallel() diff --git a/deployment/cre/capabilities_registry/v2/changeset/set_dons_families_test.go b/deployment/cre/capabilities_registry/v2/changeset/set_dons_families_test.go index 9a43b9283f9..232e2ff4d09 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/set_dons_families_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/set_dons_families_test.go @@ -10,6 +10,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" capabilities_registry_v2 "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/capabilities_registry_wrapper_v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/view/v2_0" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/capabilities_registry/v2/changeset/sequences" @@ -19,6 +20,7 @@ import ( ) func TestSetDONsFamilies_VerifyPreconditions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cs := changeset.SetDONsFamilies{} env := test.SetupEnvV2(t, false) @@ -55,6 +57,7 @@ func TestSetDONsFamilies_VerifyPreconditions(t *testing.T) { } func TestSetDONsFamilies_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cs := changeset.SetDONsFamilies{} env := test.SetupEnvV2(t, false) diff --git a/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go b/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go index 3e4637d543a..239dfaddcf5 100644 --- a/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go +++ b/deployment/cre/capabilities_registry/v2/changeset/update_don_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -207,6 +208,7 @@ func setupRegistryForUpdateDON(t *testing.T, isWorkflow, useMCMS bool) *updFixtu // Happy path: non-workflow DON; also renames the DON; capability config updated; visibility/F preserved. func TestUpdateDONChangeset_ByName_Direct_Succeeds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForUpdateDON(t /*isWorkflow=*/, false, false) // New config to apply @@ -256,6 +258,7 @@ func TestUpdateDONChangeset_ByName_Direct_Succeeds(t *testing.T) { func TestUpdateDONChangeset_ByName_Direct_Succeeds_MCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForUpdateDON(t /*isWorkflow=*/, false, true) // New config to apply @@ -297,6 +300,7 @@ func TestUpdateDONChangeset_ByName_Direct_Succeeds_MCMS(t *testing.T) { // Safety gate: workflow DON should refuse without Force=true (changeset passes Force through to operation). func TestUpdateDONChangeset_ByName_Workflow_RefusesWithoutForce(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForUpdateDON(t /*isWorkflow=*/, true, false) _, err := changeset.UpdateDON{}.Apply(fx.env, changeset.UpdateDONInput{ @@ -315,6 +319,7 @@ func TestUpdateDONChangeset_ByName_Workflow_RefusesWithoutForce(t *testing.T) { // Force override: workflow DON update succeeds when Force=true. func TestUpdateDONChangeset_ByName_Workflow_Force_Succeeds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fx := setupRegistryForUpdateDON(t /*isWorkflow=*/, true, false) // Use a valid protobuf structure with proper fields format @@ -354,6 +359,7 @@ func TestUpdateDONChangeset_ByName_Workflow_Force_Succeeds(t *testing.T) { // NOTE: current implementation returns "must provide a non-empty DONName" func TestUpdateDONChangeset_VerifyPreconditions_EmptyName(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var cs changeset.UpdateDON err := cs.VerifyPreconditions(cldf.Environment{}, changeset.UpdateDONInput{ RegistryQualifier: "q", @@ -367,6 +373,7 @@ func TestUpdateDONChangeset_VerifyPreconditions_EmptyName(t *testing.T) { // Chain not found: Apply should fail early with a clear message. func TestUpdateDONChangeset_ByName_ChainNotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Env with no chains (or use a selector not present in env) rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -387,6 +394,7 @@ func TestUpdateDONChangeset_ByName_ChainNotFound(t *testing.T) { // Qualifier not found in DataStore: Apply should fail when it cannot look up the registry address. func TestUpdateDONChangeset_ByName_QualifierNotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/cre/common/strategies/mcms_transaction_test.go b/deployment/cre/common/strategies/mcms_transaction_test.go index d23beded543..4c58b70a7b9 100644 --- a/deployment/cre/common/strategies/mcms_transaction_test.go +++ b/deployment/cre/common/strategies/mcms_transaction_test.go @@ -13,6 +13,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset/state" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/deployment/cre/common/strategies" @@ -35,6 +36,7 @@ func getMCMSTransaction(t *testing.T, env deployment.Environment) *strategies.MC func TestMCMSTransaction_BuildProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fixture := test.SetupEnvV2(t, true) diff --git a/deployment/cre/contracts/contracts_test.go b/deployment/cre/contracts/contracts_test.go index a273f3e43d6..83a6e4a6c25 100644 --- a/deployment/cre/contracts/contracts_test.go +++ b/deployment/cre/contracts/contracts_test.go @@ -28,11 +28,13 @@ import ( "github.com/smartcontractkit/chainlink/deployment/cre/contracts" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" capabilities_registry "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" ) func TestGetOwnableContractV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") v1 := semver.MustParse("1.1.0") selector := chainsel.TEST_90000001.Selector @@ -99,6 +101,7 @@ func TestGetOwnableContractV2(t *testing.T) { func TestGetOwnerTypeAndVersionV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainsel.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -188,6 +191,7 @@ func TestGetOwnerTypeAndVersionV2(t *testing.T) { func TestNewOwnableV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainsel.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -296,6 +300,7 @@ func TestNewOwnableV2(t *testing.T) { func TestGetOwnedContractV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainsel.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/cre/forwarder/configure_test.go b/deployment/cre/forwarder/configure_test.go index e9bc1bed568..fb96df88333 100644 --- a/deployment/cre/forwarder/configure_test.go +++ b/deployment/cre/forwarder/configure_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-deployments-framework/operations/optest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/contracts" "github.com/smartcontractkit/chainlink/deployment/cre/forwarder" @@ -19,6 +20,7 @@ import ( ) func TestConfigureForwardersSeq(t *testing.T) { + tests.BelongsToCISuite(t, "unit") envWrapper, donConfig := setupForwarderTest(t, false) env := envWrapper.Env @@ -40,6 +42,7 @@ func TestConfigureForwardersSeq(t *testing.T) { } func TestConfigureForwarders(t *testing.T) { + tests.BelongsToCISuite(t, "unit") envWrapper, donConfig := setupForwarderTest(t, false) env := envWrapper.Env registryChainSel := envWrapper.RegistrySelector @@ -61,6 +64,7 @@ func TestConfigureForwarders(t *testing.T) { } func TestConfigureForwarders_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") envWrapper, donConfig := setupForwarderTest(t, true) env := envWrapper.Env registryChainSel := envWrapper.RegistrySelector @@ -87,6 +91,7 @@ func TestConfigureForwarders_WithMCMS(t *testing.T) { } func TestConfigureForwarders_SpecificChains(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // This test needs a custom setup to deploy to multiple chains first envWrapper := test.SetupEnvV2(t, false) env := envWrapper.Env diff --git a/deployment/cre/jobs/operations/propose_gateway_job_test.go b/deployment/cre/jobs/operations/propose_gateway_job_test.go index 08a478ac4ea..0eba7a99aae 100644 --- a/deployment/cre/jobs/operations/propose_gateway_job_test.go +++ b/deployment/cre/jobs/operations/propose_gateway_job_test.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" csav1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/csa" @@ -129,6 +130,7 @@ var commonInput = ProposeGatewayJobInput{ func TestProposeGatewayJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string diff --git a/deployment/cre/jobs/pkg/cre_settings_job_test.go b/deployment/cre/jobs/pkg/cre_settings_job_test.go index 5782de7201a..0416e2b7a03 100644 --- a/deployment/cre/jobs/pkg/cre_settings_job_test.go +++ b/deployment/cre/jobs/pkg/cre_settings_job_test.go @@ -5,10 +5,12 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/cresettings" ) func TestCRESettingsJob_ResolveJob(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string settings string diff --git a/deployment/cre/jobs/pkg/gateway_job_test.go b/deployment/cre/jobs/pkg/gateway_job_test.go index e30e81ddf66..7fe9242fa76 100644 --- a/deployment/cre/jobs/pkg/gateway_job_test.go +++ b/deployment/cre/jobs/pkg/gateway_job_test.go @@ -6,10 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestGateway_Validate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") g := GatewayJob{} require.ErrorContains(t, g.Validate(), "must provide job name") @@ -327,6 +330,7 @@ WriteTimeoutMillis = 16000 func TestGateway_Resolve(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") g := GatewayJob{ JobName: "Gateway1", @@ -387,6 +391,7 @@ func TestGateway_Resolve(t *testing.T) { func TestGateway_Resolve_WithVaultHandler(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") g := GatewayJob{ JobName: "Gateway1", @@ -449,6 +454,7 @@ func TestGateway_Resolve_WithVaultHandler(t *testing.T) { func TestGateway_Resolve_WithHTTPCapabilitiesHandler(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") g := GatewayJob{ JobName: "Gateway1", diff --git a/deployment/cre/jobs/pkg/std_cap_test.go b/deployment/cre/jobs/pkg/std_cap_test.go index 4b37852dba7..043073b2bad 100644 --- a/deployment/cre/jobs/pkg/std_cap_test.go +++ b/deployment/cre/jobs/pkg/std_cap_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/jobs/pkg" ) func TestStdCap_Validate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -75,6 +77,7 @@ config = """{"proxyMode": "direct"}""" func TestStdCap_Resolve(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/deployment/cre/jobs/propose_evm_cap_test.go b/deployment/cre/jobs/propose_evm_cap_test.go index bfde51c9b0c..342527df0b5 100644 --- a/deployment/cre/jobs/propose_evm_cap_test.go +++ b/deployment/cre/jobs/propose_evm_cap_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment/cre/test" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3" ) @@ -78,6 +79,7 @@ func seedAddressesForSelector(t *testing.T, ds *datastore.MemoryDataStore, sel u } func TestProposeEVMCapJobSpec_VerifyPreconditions_success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var env cldf.Environment ds := datastore.NewMemoryDataStore() @@ -108,6 +110,7 @@ func TestProposeEVMCapJobSpec_VerifyPreconditions_success(t *testing.T) { } func TestProposeEVMCapJobSpec_VerifyPreconditions_requiredFields(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var env cldf.Environment ds := datastore.NewMemoryDataStore() selector := chainsel.ETHEREUM_TESTNET_SEPOLIA.Selector @@ -147,6 +150,7 @@ func TestProposeEVMCapJobSpec_VerifyPreconditions_requiredFields(t *testing.T) { } func TestProposeEVMCapJobSpec_VerifyPreconditions_missingAddresses(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var env cldf.Environment ds := datastore.NewMemoryDataStore() selector := chainsel.ETHEREUM_TESTNET_SEPOLIA.Selector @@ -184,6 +188,7 @@ func TestProposeEVMCapJobSpec_VerifyPreconditions_missingAddresses(t *testing.T) } func TestProposeEVMCapJobSpec_VerifyPreconditions_mismatchAndMinimums(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var env cldf.Environment ds := datastore.NewMemoryDataStore() chain := chainsel.ETHEREUM_TESTNET_SEPOLIA @@ -258,6 +263,7 @@ func TestProposeEVMCapJobSpec_VerifyPreconditions_mismatchAndMinimums(t *testing } func TestProposeEVMCapJobSpec_Apply_success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testEnv := test.SetupEnvV2(t, false) env := testEnv.Env @@ -329,6 +335,7 @@ func TestProposeEVMCapJobSpec_Apply_success(t *testing.T) { } func TestProposeEVMCapJobSpec_Apply_duplicateNodeIDs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testEnv := test.SetupEnvV2(t, false) env := testEnv.Env diff --git a/deployment/cre/jobs/propose_job_spec_test.go b/deployment/cre/jobs/propose_job_spec_test.go index 7670c01e8de..c4084f2bc22 100644 --- a/deployment/cre/jobs/propose_job_spec_test.go +++ b/deployment/cre/jobs/propose_job_spec_test.go @@ -15,6 +15,7 @@ import ( chainsel "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" @@ -30,6 +31,7 @@ import ( ) func TestProposeJobSpec_VerifyPreconditions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := jobs.ProposeJobSpec{} var env cldf.Environment @@ -263,6 +265,7 @@ func TestProposeJobSpec_VerifyPreconditions(t *testing.T) { } func TestProposeJobSpec_VerifyPreconditions_EVM(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := jobs.ProposeJobSpec{} var env cldf.Environment @@ -439,6 +442,7 @@ func TestProposeJobSpec_VerifyPreconditions_EVM(t *testing.T) { } func TestProposeJobSpec_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testEnv := test.SetupEnvV2(t, false) env := testEnv.Env @@ -1688,6 +1692,7 @@ PerSenderBurst = 100 } func TestProposeJobSpec_VerifyPreconditions_CRESettings(t *testing.T) { + tests.BelongsToCISuite(t, "unit") allDefault, err := toml.Marshal(map[string]any{ "global": cresettings.Default, "org": map[string]any{"org_foo": cresettings.Default}, diff --git a/deployment/cre/jobs/propose_std_cap_test.go b/deployment/cre/jobs/propose_std_cap_test.go index 1c147cd27fb..30f646c1203 100644 --- a/deployment/cre/jobs/propose_std_cap_test.go +++ b/deployment/cre/jobs/propose_std_cap_test.go @@ -9,12 +9,14 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/jobs" "github.com/smartcontractkit/chainlink/deployment/cre/pkg/offchain" "github.com/smartcontractkit/chainlink/deployment/cre/test" ) func TestProposeStandardCapabilityJob_VerifyPreconditions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := jobs.ProposeStandardCapabilityJob{} var env cldf.Environment @@ -52,6 +54,7 @@ func TestProposeStandardCapabilityJob_VerifyPreconditions(t *testing.T) { } func TestProposeStandardCapabilityJob_Apply(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testEnv := test.SetupEnvV2(t, false) // Build minimal environment @@ -79,6 +82,7 @@ func TestProposeStandardCapabilityJob_Apply(t *testing.T) { } func TestProposeStandardCapabilityJob_Apply_HTTPTrigger(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testEnv := test.SetupEnvV2(t, false) env := testEnv.Env @@ -116,6 +120,7 @@ func TestProposeStandardCapabilityJob_Apply_HTTPTrigger(t *testing.T) { } func TestProposeStandardCapabilityJob_Apply_HTTPAction(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testEnv := test.SetupEnvV2(t, false) env := testEnv.Env @@ -153,6 +158,7 @@ func TestProposeStandardCapabilityJob_Apply_HTTPAction(t *testing.T) { } func TestProposeStandardCapabilityJob_VerifyPreconditions_HTTPJobs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := jobs.ProposeStandardCapabilityJob{} var env cldf.Environment diff --git a/deployment/cre/jobs/types/job_spec_template_test.go b/deployment/cre/jobs/types/job_spec_template_test.go index 3d9c8219e4e..69f902a055b 100644 --- a/deployment/cre/jobs/types/job_spec_template_test.go +++ b/deployment/cre/jobs/types/job_spec_template_test.go @@ -7,11 +7,13 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/jobs" job_types "github.com/smartcontractkit/chainlink/deployment/cre/jobs/types" ) func TestJobSpecTemplate_UnmarshalJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("cron string", func(t *testing.T) { var in jobs.ProposeJobSpecInput js := `{"environment":"e","domain":"d","don_name":"don","don_filters":[],"job_name":"j","template":"cron","inputs":{}}` @@ -35,6 +37,7 @@ func TestJobSpecTemplate_UnmarshalJSON(t *testing.T) { } func TestJobSpecTemplate_UnmarshalYAML(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("cron string", func(t *testing.T) { var in jobs.ProposeJobSpecInput yml := "environment: e\ndomain: d\ndon_name: don\ndon_filters: []\njob_name: j\ntemplate: cron\ninputs: {}\n" diff --git a/deployment/cre/jobs/types/job_spec_test.go b/deployment/cre/jobs/types/job_spec_test.go index 1cacb68e02f..f2bb0845a8b 100644 --- a/deployment/cre/jobs/types/job_spec_test.go +++ b/deployment/cre/jobs/types/job_spec_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/jobs/pkg" job_types "github.com/smartcontractkit/chainlink/deployment/cre/jobs/types" ) func TestJobSpecInput_ToStandardCapabilityJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") jobName := "test-job" diff --git a/deployment/cre/mcms/changeset/configure_test.go b/deployment/cre/mcms/changeset/configure_test.go index 593089b03cd..a8ec3bcb614 100644 --- a/deployment/cre/mcms/changeset/configure_test.go +++ b/deployment/cre/mcms/changeset/configure_test.go @@ -15,6 +15,7 @@ import ( testenv "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/cre/mcms/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/mcms/pkg" @@ -22,7 +23,9 @@ import ( func TestMCMSConfiguration(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Test environment with a simulated EVM blockchain + loader := testenv.NewLoader() env, err := loader.Load(t.Context(), testenv.WithEVMSimulatedN(t, 2)) require.NoError(t, err) diff --git a/deployment/cre/mcms/changeset/deploy_test.go b/deployment/cre/mcms/changeset/deploy_test.go index a3225cd72c1..ae539829d01 100644 --- a/deployment/cre/mcms/changeset/deploy_test.go +++ b/deployment/cre/mcms/changeset/deploy_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" testenv "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" @@ -19,7 +20,9 @@ import ( func TestMCMSDeployment(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Test environment with a simulated EVM blockchain + loader := testenv.NewLoader() env, err := loader.Load(t.Context(), testenv.WithEVMSimulatedN(t, 2)) require.NoError(t, err) diff --git a/deployment/cre/ocr3/config_test.go b/deployment/cre/ocr3/config_test.go index 2e4419a673b..92001780369 100644 --- a/deployment/cre/ocr3/config_test.go +++ b/deployment/cre/ocr3/config_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/offchain/ocr" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/view" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" @@ -85,6 +86,7 @@ var ocr3Cfg = ` }` func Test_configureOCR3Request_generateOCR3Config(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nodes := loadTestData(t, "testdata/testnet_wf_view.json") var cfg OracleConfig diff --git a/deployment/cre/ocr3/oracle_config_test.go b/deployment/cre/ocr3/oracle_config_test.go index 032c1a4d0fc..8530500fcbf 100644 --- a/deployment/cre/ocr3/oracle_config_test.go +++ b/deployment/cre/ocr3/oracle_config_test.go @@ -7,9 +7,12 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOracleConfig_JSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Legacy config returns an error", func(t *testing.T) { var cfg OracleConfig err := json.Unmarshal([]byte(legacyOcr3Cfg), &cfg) diff --git a/deployment/cre/ocr3/types_test.go b/deployment/cre/ocr3/types_test.go index 0f3a0e1908c..ef54db030ff 100644 --- a/deployment/cre/ocr3/types_test.go +++ b/deployment/cre/ocr3/types_test.go @@ -13,11 +13,13 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func Test_toNodeKeys(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registryChainSel := chainsel.TEST_90000001 registryChainID, err := chainsel.ChainIdFromSelector(registryChainSel.Selector) if err != nil { diff --git a/deployment/cre/ocr3/v2/changeset/configure_ocr3_test.go b/deployment/cre/ocr3/v2/changeset/configure_ocr3_test.go index d5fa3ded533..b4ce91343e3 100644 --- a/deployment/cre/ocr3/v2/changeset/configure_ocr3_test.go +++ b/deployment/cre/ocr3/v2/changeset/configure_ocr3_test.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ocr3_capability "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/ocr3_capability_1_0_0" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3/v2/changeset" @@ -15,6 +16,7 @@ import ( ) func TestConfigureOCR3(t *testing.T) { + tests.BelongsToCISuite(t, "unit") env := test.SetupEnvV2(t, false) testCases := []struct { diff --git a/deployment/cre/ocr3/v2/changeset/deploy_ocr3_test.go b/deployment/cre/ocr3/v2/changeset/deploy_ocr3_test.go index ba8eab6dc92..fe84d0c687f 100644 --- a/deployment/cre/ocr3/v2/changeset/deploy_ocr3_test.go +++ b/deployment/cre/ocr3/v2/changeset/deploy_ocr3_test.go @@ -9,11 +9,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/datastore" ocr3_capability "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/ocr3_capability_1_0_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3/v2/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/test" ) func TestDeployOCR3(t *testing.T) { + tests.BelongsToCISuite(t, "unit") env := test.SetupEnvV2(t, false) // Apply the changeset to deploy the V2 capabilities registry diff --git a/deployment/cre/ocr3/v2/changeset/deploy_vault_test.go b/deployment/cre/ocr3/v2/changeset/deploy_vault_test.go index 0841eece266..36675780c88 100644 --- a/deployment/cre/ocr3/v2/changeset/deploy_vault_test.go +++ b/deployment/cre/ocr3/v2/changeset/deploy_vault_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink/deployment/cre/test" ) func TestDeployVault(t *testing.T) { + tests.BelongsToCISuite(t, "unit") env := test.SetupEnvV2(t, false) changesetOutput, err := DeployVault{}.Apply(*env.Env, DeployVaultInput{ diff --git a/deployment/cre/pkg/offchain/changeset/register_nodes_with_jd_test.go b/deployment/cre/pkg/offchain/changeset/register_nodes_with_jd_test.go index 6165bcff408..bb2f224a7e5 100644 --- a/deployment/cre/pkg/offchain/changeset/register_nodes_with_jd_test.go +++ b/deployment/cre/pkg/offchain/changeset/register_nodes_with_jd_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/offchain/node" nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/pkg/offchain" "github.com/smartcontractkit/chainlink/deployment/cre/pkg/offchain/changeset" operations2 "github.com/smartcontractkit/chainlink/deployment/cre/pkg/offchain/changeset/operations" @@ -21,6 +22,7 @@ import ( func TestCsRegisterNodesWithJD_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") zone := test.Zone @@ -375,6 +377,7 @@ func TestCsRegisterNodesWithJD_Apply(t *testing.T) { func TestCsRegisterNodesWithJDV2_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("registers nodes for a DON", func(t *testing.T) { input := changeset.CsRegisterNodesWithJDInputV2{ diff --git a/deployment/cre/pkg/offchain/types_test.go b/deployment/cre/pkg/offchain/types_test.go index aa8b7ab05fb..c18d11e94dc 100644 --- a/deployment/cre/pkg/offchain/types_test.go +++ b/deployment/cre/pkg/offchain/types_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/shared/ptypes" ) func TestAddToFilter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("CSA public key appends", func(t *testing.T) { req := require.New(t) @@ -61,6 +63,7 @@ func TestAddToFilter(t *testing.T) { } func TestAddToFilterIfNotPresent(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("CSA key dedupes", func(t *testing.T) { req := require.New(t) @@ -158,6 +161,7 @@ func TestAddToFilterIfNotPresent(t *testing.T) { } func TestMultipleFilters(t *testing.T) { + tests.BelongsToCISuite(t, "unit") req := require.New(t) filter := &nodev1.ListNodesRequest_Filter{} diff --git a/deployment/cre/state/view_test.go b/deployment/cre/state/view_test.go index 0a1bb439c85..099d99a7ea8 100644 --- a/deployment/cre/state/view_test.go +++ b/deployment/cre/state/view_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/datastore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/contracts" "github.com/smartcontractkit/chainlink/deployment/cre/state" test2 "github.com/smartcontractkit/chainlink/deployment/cre/test" @@ -17,6 +18,7 @@ import ( func TestCREView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env := test2.SetupEnvV2(t, false) addrs := env.Env.DataStore.Addresses().Filter( diff --git a/deployment/cre/test/env_setup_test.go b/deployment/cre/test/env_setup_test.go index 75ce3967785..08fa71d98f3 100644 --- a/deployment/cre/test/env_setup_test.go +++ b/deployment/cre/test/env_setup_test.go @@ -5,10 +5,12 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" ) func TestSetupEnvV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") envV2 := SetupEnvV2(t, false) env := envV2.Env diff --git a/deployment/cre/workflow_registry/v2/changeset/admin_workflow_registry_test.go b/deployment/cre/workflow_registry/v2/changeset/admin_workflow_registry_test.go index 087e99f4b20..daf0257a498 100644 --- a/deployment/cre/workflow_registry/v2/changeset/admin_workflow_registry_test.go +++ b/deployment/cre/workflow_registry/v2/changeset/admin_workflow_registry_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/contracts" ) func TestAdminBatchPauseWorkflows(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testWorkflowID1 := [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32} testWorkflowID2 := [32]byte{32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1} @@ -71,6 +73,7 @@ func TestAdminBatchPauseWorkflows(t *testing.T) { func TestAdminPauseWorkflow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testWorkflowID := [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32} @@ -127,6 +130,7 @@ func TestAdminPauseWorkflow(t *testing.T) { func TestAdminPauseAllByOwner(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testOwner := common.HexToAddress("0x1234567890123456789012345678901234567890") @@ -195,6 +199,7 @@ func TestAdminPauseAllByOwner(t *testing.T) { func TestAdminPauseAllByDON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testDONFamily := "test-don-family" @@ -263,6 +268,7 @@ func TestAdminPauseAllByDON(t *testing.T) { func TestAdminBatchPauseWorkflowsValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fixture := setupTest(t) diff --git a/deployment/cre/workflow_registry/v2/changeset/configure_workflow_registry_test.go b/deployment/cre/workflow_registry/v2/changeset/configure_workflow_registry_test.go index 48a086f2e06..03651274e9f 100644 --- a/deployment/cre/workflow_registry/v2/changeset/configure_workflow_registry_test.go +++ b/deployment/cre/workflow_registry/v2/changeset/configure_workflow_registry_test.go @@ -7,11 +7,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" crecontracts "github.com/smartcontractkit/chainlink/deployment/cre/contracts" ) func TestSetConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("basic metadata config", func(t *testing.T) { fixture := setupTest(t) @@ -61,6 +63,7 @@ func TestSetConfig(t *testing.T) { func TestUpdateAllowedSigners(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("update allowed signers", func(t *testing.T) { fixture := setupTest(t) @@ -110,6 +113,7 @@ func TestUpdateAllowedSigners(t *testing.T) { func TestSetWorkflowOwnerConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("set workflow owner config", func(t *testing.T) { fixture := setupTest(t) @@ -154,6 +158,7 @@ func TestSetWorkflowOwnerConfig(t *testing.T) { func TestSetDONLimit(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("set DON limit", func(t *testing.T) { fixture := setupTest(t) @@ -200,6 +205,7 @@ func TestSetDONLimit(t *testing.T) { func TestSetUserDONOverride(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("set user DON override", func(t *testing.T) { fixture := setupTest(t) @@ -270,6 +276,7 @@ func TestSetUserDONOverride(t *testing.T) { func TestSetCapabilitiesRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Test data for DON registry configuration donRegistryAddress := common.HexToAddress("0x1234567890123456789012345678901234567890") @@ -369,6 +376,7 @@ func TestSetCapabilitiesRegistry(t *testing.T) { func TestConfigureWorkflowRegistryValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fixture := setupTest(t) diff --git a/deployment/cre/workflow_registry/v2/changeset/deploy_workflow_registry_test.go b/deployment/cre/workflow_registry/v2/changeset/deploy_workflow_registry_test.go index 61b40b85ec0..48b518b00e1 100644 --- a/deployment/cre/workflow_registry/v2/changeset/deploy_workflow_registry_test.go +++ b/deployment/cre/workflow_registry/v2/changeset/deploy_workflow_registry_test.go @@ -8,12 +8,14 @@ import ( chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" ) func TestDeployWorkflowRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Create a minimal environment with one EVM chain selector := chainselectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/accept_ownership_test.go b/deployment/data-feeds/changeset/accept_ownership_test.go index 5be4dd4c9a2..ac3d62e78c8 100644 --- a/deployment/data-feeds/changeset/accept_ownership_test.go +++ b/deployment/data-feeds/changeset/accept_ownership_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -23,6 +24,7 @@ import ( func TestAcceptOwnership(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go b/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go index 474bfa5131f..2ba2afda0d6 100644 --- a/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go +++ b/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go @@ -16,10 +16,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDeployAptosCache(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/set_feed_config_test.go b/deployment/data-feeds/changeset/aptos/set_feed_config_test.go index 936b9cfb826..b93574748c1 100644 --- a/deployment/data-feeds/changeset/aptos/set_feed_config_test.go +++ b/deployment/data-feeds/changeset/aptos/set_feed_config_test.go @@ -14,12 +14,14 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" aptosCS "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/aptos" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestSetFeedConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go b/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go index 58142f1ca9e..b1602658a16 100644 --- a/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go +++ b/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go @@ -16,10 +16,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestSetWorkflowConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go b/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go index 39e58693fc8..da9a8ea5ce7 100644 --- a/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go +++ b/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go @@ -16,10 +16,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTransferOwnership(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithAptosContainer(t, []uint64{selector}), diff --git a/deployment/data-feeds/changeset/confirm_aggregator_test.go b/deployment/data-feeds/changeset/confirm_aggregator_test.go index 98c4fcb3540..0c5e03dcf80 100644 --- a/deployment/data-feeds/changeset/confirm_aggregator_test.go +++ b/deployment/data-feeds/changeset/confirm_aggregator_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( func TestConfirmAggregator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/deploy_aggregator_proxy_test.go b/deployment/data-feeds/changeset/deploy_aggregator_proxy_test.go index 90862dbcd71..acac2928c71 100644 --- a/deployment/data-feeds/changeset/deploy_aggregator_proxy_test.go +++ b/deployment/data-feeds/changeset/deploy_aggregator_proxy_test.go @@ -12,11 +12,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestAggregatorProxy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/deploy_bundle_aggregator_proxy_test.go b/deployment/data-feeds/changeset/deploy_bundle_aggregator_proxy_test.go index 5788587ff5f..ea674a1ce2a 100644 --- a/deployment/data-feeds/changeset/deploy_bundle_aggregator_proxy_test.go +++ b/deployment/data-feeds/changeset/deploy_bundle_aggregator_proxy_test.go @@ -12,11 +12,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestBundleAggregatorProxy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/deploy_cache_test.go b/deployment/data-feeds/changeset/deploy_cache_test.go index 64c2d63d4c4..cb167538617 100644 --- a/deployment/data-feeds/changeset/deploy_cache_test.go +++ b/deployment/data-feeds/changeset/deploy_cache_test.go @@ -11,12 +11,14 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestDeployCache(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/migrate_feeds_test.go b/deployment/data-feeds/changeset/migrate_feeds_test.go index 1770ddd2672..20fc5e24c02 100644 --- a/deployment/data-feeds/changeset/migrate_feeds_test.go +++ b/deployment/data-feeds/changeset/migrate_feeds_test.go @@ -17,12 +17,14 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestMigrateFeeds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/new_feed_with_proxy_test.go b/deployment/data-feeds/changeset/new_feed_with_proxy_test.go index 167244586b6..c59f9f10aa0 100644 --- a/deployment/data-feeds/changeset/new_feed_with_proxy_test.go +++ b/deployment/data-feeds/changeset/new_feed_with_proxy_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -26,6 +27,7 @@ import ( func TestNewFeedWithProxy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/propose_aggregator_test.go b/deployment/data-feeds/changeset/propose_aggregator_test.go index 697c2bdb2de..6677ac3263d 100644 --- a/deployment/data-feeds/changeset/propose_aggregator_test.go +++ b/deployment/data-feeds/changeset/propose_aggregator_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( func TestProposeAggregator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go b/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go index d840dd1226d..3edb586a77e 100644 --- a/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go +++ b/deployment/data-feeds/changeset/remove_dataid_proxy_mapping_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( func TestRemoveFeedProxyMapping(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/remove_feed_config_test.go b/deployment/data-feeds/changeset/remove_feed_config_test.go index 07733c6c3e8..373a4e9fe09 100644 --- a/deployment/data-feeds/changeset/remove_feed_config_test.go +++ b/deployment/data-feeds/changeset/remove_feed_config_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -26,6 +27,7 @@ import ( func TestRemoveFeedConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/remove_feed_test.go b/deployment/data-feeds/changeset/remove_feed_test.go index a907465552e..41dd3ee6427 100644 --- a/deployment/data-feeds/changeset/remove_feed_test.go +++ b/deployment/data-feeds/changeset/remove_feed_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -26,6 +27,7 @@ import ( func TestRemoveFeed(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/set_bundle_feed_config_test.go b/deployment/data-feeds/changeset/set_bundle_feed_config_test.go index 6db869f5e1e..54a3a9c0794 100644 --- a/deployment/data-feeds/changeset/set_bundle_feed_config_test.go +++ b/deployment/data-feeds/changeset/set_bundle_feed_config_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -26,6 +27,7 @@ import ( func TestSetBundleFeedConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/set_feed_admin_test.go b/deployment/data-feeds/changeset/set_feed_admin_test.go index 6ee84a63a16..68d9821dfbf 100644 --- a/deployment/data-feeds/changeset/set_feed_admin_test.go +++ b/deployment/data-feeds/changeset/set_feed_admin_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( func TestSetCacheAdmin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/set_feed_config_test.go b/deployment/data-feeds/changeset/set_feed_config_test.go index 3fa67ee1c4a..8194694cfdf 100644 --- a/deployment/data-feeds/changeset/set_feed_config_test.go +++ b/deployment/data-feeds/changeset/set_feed_config_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -26,6 +27,7 @@ import ( func TestSetFeedConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/tron/deploy_aggregator_proxy_test.go b/deployment/data-feeds/changeset/tron/deploy_aggregator_proxy_test.go index 239e33c8cd9..10a7f097141 100644 --- a/deployment/data-feeds/changeset/tron/deploy_aggregator_proxy_test.go +++ b/deployment/data-feeds/changeset/tron/deploy_aggregator_proxy_test.go @@ -14,11 +14,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/tron" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestDeployAggregatorProxy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/tron/deploy_cache_test.go b/deployment/data-feeds/changeset/tron/deploy_cache_test.go index d0c1de0cd54..82677f91a17 100644 --- a/deployment/data-feeds/changeset/tron/deploy_cache_test.go +++ b/deployment/data-feeds/changeset/tron/deploy_cache_test.go @@ -12,12 +12,14 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/tron" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestDeployCache(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/tron/remove_dataid_proxy_mapping_test.go b/deployment/data-feeds/changeset/tron/remove_dataid_proxy_mapping_test.go index 9b2335a6549..5314320d932 100644 --- a/deployment/data-feeds/changeset/tron/remove_dataid_proxy_mapping_test.go +++ b/deployment/data-feeds/changeset/tron/remove_dataid_proxy_mapping_test.go @@ -15,11 +15,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/tron" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestRemoveDataIDProxyMapping(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/tron/set_feed_admin_test.go b/deployment/data-feeds/changeset/tron/set_feed_admin_test.go index 79b5914b6ba..6e5da3255bd 100644 --- a/deployment/data-feeds/changeset/tron/set_feed_admin_test.go +++ b/deployment/data-feeds/changeset/tron/set_feed_admin_test.go @@ -15,11 +15,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/tron" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestSetCacheAdmin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/tron/set_feed_config_test.go b/deployment/data-feeds/changeset/tron/set_feed_config_test.go index 786815d146a..2aa620987bb 100644 --- a/deployment/data-feeds/changeset/tron/set_feed_config_test.go +++ b/deployment/data-feeds/changeset/tron/set_feed_config_test.go @@ -15,11 +15,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/tron" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestSetFeedConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/tron/update_data_id_proxy_test.go b/deployment/data-feeds/changeset/tron/update_data_id_proxy_test.go index 2fad7f05335..6ce51bbd849 100644 --- a/deployment/data-feeds/changeset/tron/update_data_id_proxy_test.go +++ b/deployment/data-feeds/changeset/tron/update_data_id_proxy_test.go @@ -12,12 +12,14 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/tron" "github.com/smartcontractkit/chainlink/deployment/data-feeds/changeset/types" ) func TestUpdateDataIDProxy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/update_data_id_proxy_test.go b/deployment/data-feeds/changeset/update_data_id_proxy_test.go index d73506706ee..351d5282ed8 100644 --- a/deployment/data-feeds/changeset/update_data_id_proxy_test.go +++ b/deployment/data-feeds/changeset/update_data_id_proxy_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonChangesets "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commonTypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -24,6 +25,7 @@ import ( func TestUpdateDataIDProxyMap(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/utils_test.go b/deployment/data-feeds/changeset/utils_test.go index 681f3a1e394..8cf9c9b733d 100644 --- a/deployment/data-feeds/changeset/utils_test.go +++ b/deployment/data-feeds/changeset/utils_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestGetDecimalsFromFeedIDValidFeedID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") decimals, err := GetDecimalsFromFeedID("0x01d0fd1ef80003320000000000000000") // decimal 18 require.NoError(t, err) require.Equal(t, uint8(0x12), decimals) diff --git a/deployment/data-feeds/shared/validation_test.go b/deployment/data-feeds/shared/validation_test.go index 8c6788675c4..019ca143144 100644 --- a/deployment/data-feeds/shared/validation_test.go +++ b/deployment/data-feeds/shared/validation_test.go @@ -4,10 +4,13 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidateFeedID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { feedID string diff --git a/deployment/environment/crib/helpers_test.go b/deployment/environment/crib/helpers_test.go index 2d1a5daac5f..740d4b27e06 100644 --- a/deployment/environment/crib/helpers_test.go +++ b/deployment/environment/crib/helpers_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_getTierChainSelectors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") otherSelectors := []uint64{909606746561742123, 5548718428018410741, 789068866484373046, 5721565186521185178, 964127714438319834} defaultSelectors := []uint64{3379446385462418246, 12463857294658392847, 12922642891491394802} //nolint:gocritic // append is used here to combine the two slices for testing purposes diff --git a/deployment/environment/crib/lane_config_test.go b/deployment/environment/crib/lane_config_test.go index 151e61ffac9..38df23e0ba3 100644 --- a/deployment/environment/crib/lane_config_test.go +++ b/deployment/environment/crib/lane_config_test.go @@ -6,9 +6,12 @@ import ( "k8s.io/utils/ptr" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestGenerateBidirectionalRandomLanesWithMinConnectivity(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string chains []uint64 @@ -50,6 +53,7 @@ func TestGenerateBidirectionalRandomLanesWithMinConnectivity(t *testing.T) { } func TestBidirectionalPairGeneration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") chains := []uint64{1, 2, 3, 4} numLanes := 12 // full connectivity @@ -197,6 +201,7 @@ func findBidirectionalPairs(lanes []LaneConfig) [][]LaneConfig { } func TestLaneConfiguration_GenerateLanes_BidirectionalMode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string lc *LaneConfiguration @@ -281,6 +286,7 @@ func TestLaneConfiguration_GenerateLanes_BidirectionalMode(t *testing.T) { } func Test_generateChainTierLanes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") chains := []uint64{3379446385462418246, 12463857294658392847, 12922642891491394802, 909606746561742123, 5548718428018410741} t.Run("happy path", func(t *testing.T) { diff --git a/deployment/environment/devenv/don_test.go b/deployment/environment/devenv/don_test.go index 57819db4861..04d47a0b5ed 100644 --- a/deployment/environment/devenv/don_test.go +++ b/deployment/environment/devenv/don_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPtrVal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") x := "hello" xptr := ptr(x) got := value(xptr) diff --git a/deployment/environment/devenv/rmn_test.go b/deployment/environment/devenv/rmn_test.go index 7d07670ff7d..29f5f8a03ae 100644 --- a/deployment/environment/devenv/rmn_test.go +++ b/deployment/environment/devenv/rmn_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestExtractPeerID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") data := []byte("{\"Salt\":\"yAUVSNGPnY78hJwJwKDBmA==\",\"Nonce\":\"8p0vNKpnQH1P+7/cg2dM3vNlc60tzPl0\",\"Ciphertext\":\"VboRchQzDx/+zIVDWyTXIEwo4Ej0s7O6kQqmgCqW+A+HEXl6bI02W1Y2T88XuY0m44eC9DvSpBPhs/VLtgymj6nBcl+nzfJHLMp2pBMPjKHxgNsEk34mDgnmqYKTtIkgzv7hEyy7j0CAcR/RxkjfQNKpfWOlNtAFryFO+w==\",\"AdditionalData\":\"{\\\"PeerID\\\":\\\"12D3KooWNqugYSJw9thwwu1PC3aEpPsBxMZM2EdzpJXGesRG4E8n\\\"}\"}") peerID, err := extractPeerID(data) require.NoError(t, err) diff --git a/deployment/environment/nodeclient/chainlink_models_test.go b/deployment/environment/nodeclient/chainlink_models_test.go index c7cc4d37b04..f96b114c660 100644 --- a/deployment/environment/nodeclient/chainlink_models_test.go +++ b/deployment/environment/nodeclient/chainlink_models_test.go @@ -8,10 +8,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-evm/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestOCR2TaskJobSpec_String(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tt := range []struct { name string spec OCR2TaskJobSpec diff --git a/deployment/environment/test/jd_test.go b/deployment/environment/test/jd_test.go index 3a06dbc452f..50fccabc692 100644 --- a/deployment/environment/test/jd_test.go +++ b/deployment/environment/test/jd_test.go @@ -12,6 +12,7 @@ import ( types2 "github.com/smartcontractkit/libocr/offchainreporting2/types" types3 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/shared/ptypes" "github.com/smartcontractkit/chainlink/deployment" @@ -20,6 +21,7 @@ import ( ) func TestJDNodeService_GetNode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nodes := []deployment.Node{ { NodeID: "node1", @@ -71,6 +73,7 @@ func TestJDNodeService_GetNode(t *testing.T) { } func TestJDNodeService_ListNodes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") workflowKey1 := "workflow_key_1" workflowKey2 := "workflow_key_2" nodes := []deployment.Node{ @@ -158,6 +161,7 @@ func TestJDNodeService_ListNodes(t *testing.T) { } func TestJDNodeService_ListNodeChainConfigs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nodes := []deployment.Node{ { NodeID: "node1", @@ -332,6 +336,7 @@ func TestJDNodeService_ListNodeChainConfigs(t *testing.T) { } func TestNewJDServiceFromListNodes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") workflowKey1 := "workflow_key_1" workflowKey2 := "workflow_key_2" workflowKey3 := "workflow_key_3" diff --git a/deployment/environment/test/job_service_client_test.go b/deployment/environment/test/job_service_client_test.go index 67817f6de1f..72438d43ca8 100644 --- a/deployment/environment/test/job_service_client_test.go +++ b/deployment/environment/test/job_service_client_test.go @@ -13,13 +13,14 @@ import ( jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/helpers/pointer" "github.com/smartcontractkit/chainlink/v2/core/services/feeds" ) func TestNewJobServiceClient(t *testing.T) { t.Parallel() - + tests.BelongsToCISuite(t, "unit") // Create a mock JobApprover getter mockGetter := &mockJobApproverGetter{ jobApprovers: make(map[string]*mockJobApprover), @@ -41,9 +42,12 @@ func TestNewJobServiceClient(t *testing.T) { func TestBatchProposeJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, + + // Create mock job approvers + "unit") ctx := t.Context() - // Create mock job approvers mockGetter := &mockJobApproverGetter{ jobApprovers: make(map[string]*mockJobApprover), } @@ -121,6 +125,7 @@ func TestBatchProposeJob(t *testing.T) { func TestProposeJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := context.Background() // Create mock job approvers @@ -239,6 +244,7 @@ name = "Test Job" func TestRevokeJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mockGetter := &mockJobApproverGetter{ jobApprovers: make(map[string]*mockJobApprover), @@ -316,6 +322,7 @@ func TestRevokeJob(t *testing.T) { func TestGetJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := context.Background() // Create mock job approvers @@ -369,6 +376,7 @@ func TestGetJob(t *testing.T) { func TestGetProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := context.Background() // Create mock job approvers @@ -421,6 +429,7 @@ func TestGetProposal(t *testing.T) { func TestListJobs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := context.Background() // Create mock job approvers @@ -533,6 +542,7 @@ func TestListJobs(t *testing.T) { func TestListProposals(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := context.Background() // Create mock job approvers @@ -631,6 +641,7 @@ func TestListProposals(t *testing.T) { func TestMapJobStore(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") store := newMapJobStore() @@ -709,6 +720,7 @@ func TestMapJobStore(t *testing.T) { func TestMapProposalStore(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") store := newMapProposalStore() @@ -775,6 +787,7 @@ func TestMapProposalStore(t *testing.T) { func TestMatchesSelectors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/deployment/environment/web/sdk/client/types_test.go b/deployment/environment/web/sdk/client/types_test.go index e96473dec23..1aa924d1d1c 100644 --- a/deployment/environment/web/sdk/client/types_test.go +++ b/deployment/environment/web/sdk/client/types_test.go @@ -3,10 +3,12 @@ package client import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/environment/web/sdk/internal/generated" ) func TestDecodeInput(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { in any out any diff --git a/deployment/helpers/maps_test.go b/deployment/helpers/maps_test.go index c78e77c56ce..4732bbfa836 100644 --- a/deployment/helpers/maps_test.go +++ b/deployment/helpers/maps_test.go @@ -4,10 +4,12 @@ import ( "reflect" "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/helpers" ) func TestAddValueToNestedMap(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string mapping map[string]map[string]int diff --git a/deployment/keystone/changeset/accept_ownership_test.go b/deployment/keystone/changeset/accept_ownership_test.go index 0d0d98a6fdc..7c5c253204b 100644 --- a/deployment/keystone/changeset/accept_ownership_test.go +++ b/deployment/keystone/changeset/accept_ownership_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -19,6 +20,7 @@ import ( func TestAcceptAllOwnership(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/keystone/changeset/add_capabilities_test.go b/deployment/keystone/changeset/add_capabilities_test.go index 63feda12998..8cd73854a81 100644 --- a/deployment/keystone/changeset/add_capabilities_test.go +++ b/deployment/keystone/changeset/add_capabilities_test.go @@ -13,6 +13,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" @@ -20,6 +21,7 @@ import ( func TestAddCapabilities(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") capabilitiesToAdd := []kcr.CapabilitiesRegistryCapability{ { @@ -82,6 +84,7 @@ func TestAddCapabilities(t *testing.T) { func TestAddCapabilitiesRequest_Validate_WriterCapability(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/deployment/keystone/changeset/add_dons_test.go b/deployment/keystone/changeset/add_dons_test.go index 205417e09df..649a0fe40db 100644 --- a/deployment/keystone/changeset/add_dons_test.go +++ b/deployment/keystone/changeset/add_dons_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" @@ -18,6 +19,7 @@ import ( func TestAddDONs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var testCap = kcr.CapabilitiesRegistryCapability{ LabelledName: "cap1", Version: "1.0", diff --git a/deployment/keystone/changeset/add_nodes_test.go b/deployment/keystone/changeset/add_nodes_test.go index 4e57534c664..8095d6a1562 100644 --- a/deployment/keystone/changeset/add_nodes_test.go +++ b/deployment/keystone/changeset/add_nodes_test.go @@ -11,6 +11,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" @@ -24,6 +25,7 @@ type mcmsTestCase struct { func TestAddNodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") type input struct { te test.EnvWrapper diff --git a/deployment/keystone/changeset/add_nops_test.go b/deployment/keystone/changeset/add_nops_test.go index 33540b4490d..a36b5f96b16 100644 --- a/deployment/keystone/changeset/add_nops_test.go +++ b/deployment/keystone/changeset/add_nops_test.go @@ -9,6 +9,7 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -17,6 +18,7 @@ import ( func TestAddNops(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") nops := []kcr.CapabilitiesRegistryNodeOperator{ { diff --git a/deployment/keystone/changeset/append_node_capabilities_test.go b/deployment/keystone/changeset/append_node_capabilities_test.go index 2dac32a33e7..6fb68e573ea 100644 --- a/deployment/keystone/changeset/append_node_capabilities_test.go +++ b/deployment/keystone/changeset/append_node_capabilities_test.go @@ -8,6 +8,7 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -17,6 +18,7 @@ import ( func TestAppendNodeCapabilities(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( capA = kcr.CapabilitiesRegistryCapability{ diff --git a/deployment/keystone/changeset/deploy_balance_reader_test.go b/deployment/keystone/changeset/deploy_balance_reader_test.go index 1f68bc4cb31..58019249d6f 100644 --- a/deployment/keystone/changeset/deploy_balance_reader_test.go +++ b/deployment/keystone/changeset/deploy_balance_reader_test.go @@ -12,11 +12,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" ) func TestDeployBalanceReader(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector otherSel := chain_selectors.TEST_90000002.Selector diff --git a/deployment/keystone/changeset/deploy_consumer_test.go b/deployment/keystone/changeset/deploy_consumer_test.go index 8c861738589..a746fc6e88b 100644 --- a/deployment/keystone/changeset/deploy_consumer_test.go +++ b/deployment/keystone/changeset/deploy_consumer_test.go @@ -13,11 +13,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/datastore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" ) func TestDeployFeedsConsumer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector otherSel := chain_selectors.TEST_90000002.Selector diff --git a/deployment/keystone/changeset/deploy_forwarder_test.go b/deployment/keystone/changeset/deploy_forwarder_test.go index b918233d55e..c12efb3ffdc 100644 --- a/deployment/keystone/changeset/deploy_forwarder_test.go +++ b/deployment/keystone/changeset/deploy_forwarder_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" crecontracts "github.com/smartcontractkit/chainlink/deployment/cre/contracts" creforwarder "github.com/smartcontractkit/chainlink/deployment/cre/forwarder" @@ -24,6 +25,7 @@ import ( func TestDeployForwarder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -54,6 +56,7 @@ func TestDeployForwarder(t *testing.T) { func TestConfigureForwarders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := []struct { nChains int diff --git a/deployment/keystone/changeset/deploy_ocr3_test.go b/deployment/keystone/changeset/deploy_ocr3_test.go index 00b7351e9bc..b9034a7fbf7 100644 --- a/deployment/keystone/changeset/deploy_ocr3_test.go +++ b/deployment/keystone/changeset/deploy_ocr3_test.go @@ -18,6 +18,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -27,6 +28,7 @@ import ( func TestDeployOCR3(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector otherSel := chain_selectors.TEST_90000002.Selector @@ -61,6 +63,7 @@ func TestDeployOCR3(t *testing.T) { func TestConfigureOCR3(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") nWfNodes := 4 c := ocr3.OracleConfig{ diff --git a/deployment/keystone/changeset/deploy_registry_test.go b/deployment/keystone/changeset/deploy_registry_test.go index 0a0b085e933..cca6ae2c106 100644 --- a/deployment/keystone/changeset/deploy_registry_test.go +++ b/deployment/keystone/changeset/deploy_registry_test.go @@ -11,11 +11,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" ) func TestDeployCapabilityRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector otherSel := chain_selectors.TEST_90000002.Selector diff --git a/deployment/keystone/changeset/internal/append_node_capabilities_test.go b/deployment/keystone/changeset/internal/append_node_capabilities_test.go index ce2807b14b1..6a9e6b6fd2d 100644 --- a/deployment/keystone/changeset/internal/append_node_capabilities_test.go +++ b/deployment/keystone/changeset/internal/append_node_capabilities_test.go @@ -14,11 +14,13 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" kstest "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func TestAppendNodeCapabilities(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( initialp2pToCapabilities = map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ testPeerID(t, "0x1"): { diff --git a/deployment/keystone/changeset/internal/deploy_test.go b/deployment/keystone/changeset/internal/deploy_test.go index 439d3b9eb40..2ee1d38ff0d 100644 --- a/deployment/keystone/changeset/internal/deploy_test.go +++ b/deployment/keystone/changeset/internal/deploy_test.go @@ -19,6 +19,7 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" kstest "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" @@ -26,6 +27,7 @@ import ( ) func Test_RegisterNOPS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( useMCMS bool lggr = logger.Test(t) @@ -67,6 +69,7 @@ func Test_RegisterNOPS(t *testing.T) { } func Test_AddCapabilities(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( useMCMS bool lggr = logger.Test(t) @@ -141,6 +144,7 @@ func Test_AddCapabilities(t *testing.T) { } func Test_RegisterNodes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( useMCMS bool lggr = logger.Test(t) @@ -395,6 +399,7 @@ func assertNodesExist(t *testing.T, registry *kcr.CapabilitiesRegistry, nodes .. } func Test_RegisterDons(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( useMCMS bool lggr = logger.Test(t) @@ -583,6 +588,7 @@ func Test_RegisterDons(t *testing.T) { } func TestAddNodes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( lggr = logger.Test(t) existingNOP = testNop(t, "testNop") diff --git a/deployment/keystone/changeset/internal/remove_dons_test.go b/deployment/keystone/changeset/internal/remove_dons_test.go index 2608e571207..7c1c0124cfc 100644 --- a/deployment/keystone/changeset/internal/remove_dons_test.go +++ b/deployment/keystone/changeset/internal/remove_dons_test.go @@ -16,6 +16,7 @@ import ( cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/helpers/pointer" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" @@ -24,6 +25,7 @@ import ( ) func Test_RemoveDONsRequest_validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { DONs []uint32 chain cldf_evm.Chain @@ -79,6 +81,7 @@ func Test_RemoveDONsRequest_validate(t *testing.T) { // TestRemoveDONs tests the RemoveDONs function func TestRemoveDONs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) var ( diff --git a/deployment/keystone/changeset/internal/state_test.go b/deployment/keystone/changeset/internal/state_test.go index 8986f501af7..269be81bd5e 100644 --- a/deployment/keystone/changeset/internal/state_test.go +++ b/deployment/keystone/changeset/internal/state_test.go @@ -19,9 +19,12 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_GetContractSet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type testCase struct { name string giveRequest *GetContractSetsRequest diff --git a/deployment/keystone/changeset/internal/update_don_test.go b/deployment/keystone/changeset/internal/update_don_test.go index b2733bb2d45..5e76567afe2 100644 --- a/deployment/keystone/changeset/internal/update_don_test.go +++ b/deployment/keystone/changeset/internal/update_don_test.go @@ -21,6 +21,7 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment" kscs "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" @@ -33,8 +34,11 @@ var ( ) func TestUpdateDon(t *testing.T) { - var ( + tests.BelongsToCISuite( + // nodes + t, "unit") + var ( p2p1 = p2pkey.MustNewV2XXXTestingOnly(big.NewInt(100)) pubKey1 = "11114981a6119ca3f932cdb8c402d71a72d672adae7849f581ecff8b8e1098e7" // valid csa key admin1 = common.HexToAddress("0x1111567890123456789012345678901234567890") // valid eth address @@ -170,8 +174,11 @@ func TestUpdateDon(t *testing.T) { } func TestUpdateDon_ChangeComposition(t *testing.T) { - var ( + tests.BelongsToCISuite( + // Initial nodes (n1-n4) + t, "unit") + var ( p2p1 = p2pkey.MustNewV2XXXTestingOnly(big.NewInt(100)) pubKey1 = "11114981a6119ca3f932cdb8c402d71a72d672adae7849f581ecff8b8e1098e7" admin1 = common.HexToAddress("0x1111567890123456789012345678901234567890") diff --git a/deployment/keystone/changeset/internal/update_node_capabilities_test.go b/deployment/keystone/changeset/internal/update_node_capabilities_test.go index 9b155cd19fa..6ab3a510b66 100644 --- a/deployment/keystone/changeset/internal/update_node_capabilities_test.go +++ b/deployment/keystone/changeset/internal/update_node_capabilities_test.go @@ -11,12 +11,14 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" kstest "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func TestUpdateNodeCapabilities(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( initialp2pToCapabilities = map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ testPeerID(t, "0x1"): []kcr.CapabilitiesRegistryCapability{ diff --git a/deployment/keystone/changeset/internal/update_nodes_test.go b/deployment/keystone/changeset/internal/update_nodes_test.go index 8de084e6379..724788f8cf6 100644 --- a/deployment/keystone/changeset/internal/update_nodes_test.go +++ b/deployment/keystone/changeset/internal/update_nodes_test.go @@ -25,12 +25,14 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/onchain" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" kstest "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func Test_UpdateNodesRequest_validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { p2pToUpdates map[p2pkey.PeerID]internal.NodeUpdate nopToNodes map[kcr.CapabilitiesRegistryNodeOperator][]*internal.P2PSignerEnc @@ -103,6 +105,7 @@ func newEncryptionKey(t *testing.T) [32]byte { } func TestUpdateNodes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") chain := testChain(t) require.NotNil(t, chain) lggr := logger.Test(t) @@ -619,6 +622,7 @@ func TestUpdateNodes(t *testing.T) { } func TestAppendCapabilities(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( capMap = map[p2pkey.PeerID][]kcr.CapabilitiesRegistryCapability{ testPeerID(t, "peerID_1"): []kcr.CapabilitiesRegistryCapability{ diff --git a/deployment/keystone/changeset/ocr3_job_test.go b/deployment/keystone/changeset/ocr3_job_test.go index 7c15eafd2bb..1f381df9076 100644 --- a/deployment/keystone/changeset/ocr3_job_test.go +++ b/deployment/keystone/changeset/ocr3_job_test.go @@ -4,10 +4,13 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestResolveOCR3Job(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") type args struct { cfg OCR3JobConfig diff --git a/deployment/keystone/changeset/operations/contracts/add_capabilities_op_test.go b/deployment/keystone/changeset/operations/contracts/add_capabilities_op_test.go index 99d6b074eab..5872633332d 100644 --- a/deployment/keystone/changeset/operations/contracts/add_capabilities_op_test.go +++ b/deployment/keystone/changeset/operations/contracts/add_capabilities_op_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-deployments-framework/operations/optest" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" @@ -62,10 +63,12 @@ func doAppendCapabilitiesOp(t *testing.T, useMcms bool) { } func TestAppendCapabilitiesWithMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") doAppendCapabilitiesOp(t, true) } func TestAppendCapabilitiesWithoutMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") doAppendCapabilitiesOp(t, false) } @@ -125,9 +128,11 @@ func doUpdateDonOp(t *testing.T, useMcms bool) { } func TestUpdateDonOpWithMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") doUpdateDonOp(t, true) } func TestUpdateDonOpWithoutMCMS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") doUpdateDonOp(t, false) } diff --git a/deployment/keystone/changeset/operations/contracts/deploy_capability_registry_op_test.go b/deployment/keystone/changeset/operations/contracts/deploy_capability_registry_op_test.go index cec5e22e623..a84a042b470 100644 --- a/deployment/keystone/changeset/operations/contracts/deploy_capability_registry_op_test.go +++ b/deployment/keystone/changeset/operations/contracts/deploy_capability_registry_op_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-deployments-framework/operations/optest" @@ -15,6 +16,7 @@ import ( func Test_DeployRegistryOp(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector env, err := environment.New(t.Context(), diff --git a/deployment/keystone/changeset/operations/contracts/deploy_configure_forwarders_seq_test.go b/deployment/keystone/changeset/operations/contracts/deploy_configure_forwarders_seq_test.go index 852ff6ea6d8..f9b73fac9bb 100644 --- a/deployment/keystone/changeset/operations/contracts/deploy_configure_forwarders_seq_test.go +++ b/deployment/keystone/changeset/operations/contracts/deploy_configure_forwarders_seq_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/operations/optest" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" crecontracts "github.com/smartcontractkit/chainlink/deployment/cre/contracts" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/operations/contracts" @@ -110,10 +111,12 @@ func doDeployConfigureForwardersSeq(t *testing.T, useMcms bool) { func Test_DeployConfigureForwardersSeqWithoutMCMSSetup(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") doDeployConfigureForwardersSeq(t, false) } func Test_DeployConfigureForwardersSeqWithMCMSSetup(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") doDeployConfigureForwardersSeq(t, true) } diff --git a/deployment/keystone/changeset/remove_dons_test.go b/deployment/keystone/changeset/remove_dons_test.go index b31cfcd8fa1..38e3b4c7a03 100644 --- a/deployment/keystone/changeset/remove_dons_test.go +++ b/deployment/keystone/changeset/remove_dons_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -15,6 +16,7 @@ import ( func Test_RemoveDONsRequest_validate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ WFDonConfig: test.DonConfig{Name: "wfDon", N: 4}, @@ -78,6 +80,7 @@ func Test_RemoveDONsRequest_validate(t *testing.T) { func TestRemoveDONs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/deployment/keystone/changeset/solana/deploy_forwarder_test.go b/deployment/keystone/changeset/solana/deploy_forwarder_test.go index 4b479a73a98..ef29602a8b3 100644 --- a/deployment/keystone/changeset/solana/deploy_forwarder_test.go +++ b/deployment/keystone/changeset/solana/deploy_forwarder_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/onchain" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" solanaMCMS "github.com/smartcontractkit/chainlink/deployment/common/changeset/solana/mcms" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -86,7 +87,7 @@ func TestDeployForwarder(t *testing.T) { func TestConfigureForwarder(t *testing.T) { t.Parallel() - + tests.BelongsToCISuite(t, "unit") // Setup the solana programs programsPath := t.TempDir() solSel := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector diff --git a/deployment/keystone/changeset/test/env_setup_test.go b/deployment/keystone/changeset/test/env_setup_test.go index a8098160b15..002f54f3ce3 100644 --- a/deployment/keystone/changeset/test/env_setup_test.go +++ b/deployment/keystone/changeset/test/env_setup_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" ) func TestSetupEnv(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("test env with in memory nodes", func(t *testing.T) { for _, useMCMS := range []bool{true, false} { diff --git a/deployment/keystone/changeset/tron/configure_forwarder_test.go b/deployment/keystone/changeset/tron/configure_forwarder_test.go index 0f375ac2a3f..85ae33007b2 100644 --- a/deployment/keystone/changeset/tron/configure_forwarder_test.go +++ b/deployment/keystone/changeset/tron/configure_forwarder_test.go @@ -11,12 +11,14 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/onchain" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/tron" ) func TestConfigureForwarder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := []struct { nChains int diff --git a/deployment/keystone/changeset/tron/deploy_forwarder_test.go b/deployment/keystone/changeset/tron/deploy_forwarder_test.go index 2972006d356..3c71de0a70b 100644 --- a/deployment/keystone/changeset/tron/deploy_forwarder_test.go +++ b/deployment/keystone/changeset/tron/deploy_forwarder_test.go @@ -11,11 +11,13 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/tron" ) func TestDeployForwarder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TRON_DEVNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/keystone/changeset/update_don_test.go b/deployment/keystone/changeset/update_don_test.go index b5565e90117..f7ae246ad5f 100644 --- a/deployment/keystone/changeset/update_don_test.go +++ b/deployment/keystone/changeset/update_don_test.go @@ -14,6 +14,7 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) @@ -32,6 +33,7 @@ var ( func TestUpdateDon(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") capACfg, err := proto.Marshal(test.GetDefaultCapConfig(t, capA)) require.NoError(t, err) @@ -152,7 +154,7 @@ func TestUpdateDon(t *testing.T) { func TestUpdateDon_ChangeComposition(t *testing.T) { t.Parallel() - + tests.BelongsToCISuite(t, "unit") // Test capability configurations capACfg, err := proto.Marshal(test.GetDefaultCapConfig(t, capA)) require.NoError(t, err) diff --git a/deployment/keystone/changeset/update_node_capabilities_test.go b/deployment/keystone/changeset/update_node_capabilities_test.go index 6da6f2b5cfb..bae114d7f02 100644 --- a/deployment/keystone/changeset/update_node_capabilities_test.go +++ b/deployment/keystone/changeset/update_node_capabilities_test.go @@ -8,6 +8,7 @@ import ( kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -17,6 +18,7 @@ import ( func TestUpdateNodeCapabilities(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( capA = kcr.CapabilitiesRegistryCapability{ diff --git a/deployment/keystone/changeset/update_nodes_test.go b/deployment/keystone/changeset/update_nodes_test.go index d9fdb7f1e27..55c941ea3a3 100644 --- a/deployment/keystone/changeset/update_nodes_test.go +++ b/deployment/keystone/changeset/update_nodes_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -16,6 +17,7 @@ import ( func TestUpdateNodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("no mcms", func(t *testing.T) { te := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ diff --git a/deployment/keystone/changeset/view_test.go b/deployment/keystone/changeset/view_test.go index 4161ee7249b..24be90e4c9c 100644 --- a/deployment/keystone/changeset/view_test.go +++ b/deployment/keystone/changeset/view_test.go @@ -17,6 +17,7 @@ import ( capabilities_registry "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" "github.com/smartcontractkit/chainlink/deployment/cre/ocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/cre/contracts" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" @@ -54,6 +55,7 @@ var oracleConfig = changeset.OracleConfig{ func TestKeystoneView(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ WFDonConfig: test.DonConfig{N: 4, Name: "wfDon"}, AssetDonConfig: test.DonConfig{N: 4, Name: "assetDon"}, diff --git a/deployment/keystone/changeset/workflowregistry/deploy_test.go b/deployment/keystone/changeset/workflowregistry/deploy_test.go index a8baab55e88..a8d03fd7727 100644 --- a/deployment/keystone/changeset/workflowregistry/deploy_test.go +++ b/deployment/keystone/changeset/workflowregistry/deploy_test.go @@ -11,10 +11,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_Deploy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") registrySel := chain_selectors.TEST_90000001.Selector otherSel := chain_selectors.TEST_90000002.Selector diff --git a/deployment/keystone/changeset/workflowregistry/update_allowed_dons_test.go b/deployment/keystone/changeset/workflowregistry/update_allowed_dons_test.go index c50b2c1dca0..d3ea3469b9d 100644 --- a/deployment/keystone/changeset/workflowregistry/update_allowed_dons_test.go +++ b/deployment/keystone/changeset/workflowregistry/update_allowed_dons_test.go @@ -14,6 +14,7 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" @@ -21,6 +22,7 @@ import ( ) func TestUpdateAllowedDons(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) chainSel := chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector @@ -74,6 +76,7 @@ func TestUpdateAllowedDons(t *testing.T) { } func Test_UpdateAllowedDons_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") te := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ WFDonConfig: test.DonConfig{Name: "wfDon", N: 4}, AssetDonConfig: test.DonConfig{Name: "assetDon", N: 4}, diff --git a/deployment/keystone/changeset/workflowregistry/update_authorized_addresses_test.go b/deployment/keystone/changeset/workflowregistry/update_authorized_addresses_test.go index a6e5c5b63f9..396dfd3c4f6 100644 --- a/deployment/keystone/changeset/workflowregistry/update_authorized_addresses_test.go +++ b/deployment/keystone/changeset/workflowregistry/update_authorized_addresses_test.go @@ -15,6 +15,7 @@ import ( cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" @@ -22,6 +23,7 @@ import ( ) func TestUpdateAuthorizedAddresses(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) chainSel := chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector @@ -76,6 +78,7 @@ func TestUpdateAuthorizedAddresses(t *testing.T) { } func Test_UpdateAuthorizedAddresses_WithMCMS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") te := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ WFDonConfig: test.DonConfig{Name: "wfDon", N: 4}, AssetDonConfig: test.DonConfig{Name: "assetDon", N: 4}, diff --git a/deployment/keystone/test/changeset/capability_registry_test.go b/deployment/keystone/test/changeset/capability_registry_test.go index d64058c9054..2431b9f49de 100644 --- a/deployment/keystone/test/changeset/capability_registry_test.go +++ b/deployment/keystone/test/changeset/capability_registry_test.go @@ -11,10 +11,12 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" ) func TestHydrateCapabilityRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") b, err := os.ReadFile("testdata/capability_registry_view.json") require.NoError(t, err) require.NotEmpty(t, b) diff --git a/deployment/tokens/changesets/deploy_evm_link_tokens_test.go b/deployment/tokens/changesets/deploy_evm_link_tokens_test.go index 4aeff3759ca..c729aecd984 100644 --- a/deployment/tokens/changesets/deploy_evm_link_tokens_test.go +++ b/deployment/tokens/changesets/deploy_evm_link_tokens_test.go @@ -8,6 +8,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_evm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -19,6 +20,7 @@ import ( func Test_DeployEVMLinkTokens_VerifyPreconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( csel = chain_selectors.TEST_1000.Selector @@ -141,6 +143,7 @@ func Test_DeployEVMLinkTokens_VerifyPreconditions(t *testing.T) { func Test_DeployEVMLinkTokens_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/deployment/tokens/changesets/deploy_sol_link_tokens_test.go b/deployment/tokens/changesets/deploy_sol_link_tokens_test.go index 76826616861..c7efe99a8f2 100644 --- a/deployment/tokens/changesets/deploy_sol_link_tokens_test.go +++ b/deployment/tokens/changesets/deploy_sol_link_tokens_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf_solana "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -18,6 +19,7 @@ import ( func Test_DeploySolLinkTokens_VerifyPreconditions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( csel = chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector @@ -140,6 +142,7 @@ func Test_DeploySolLinkTokens_VerifyPreconditions(t *testing.T) { func Test_DeploySolLinkTokens_Apply(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/deployment/tokens/changesets/validate_test.go b/deployment/tokens/changesets/validate_test.go index e052c89760d..8c383fe191f 100644 --- a/deployment/tokens/changesets/validate_test.go +++ b/deployment/tokens/changesets/validate_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink/deployment/tokens/internal/ops" @@ -14,6 +15,7 @@ import ( func Test_validateNoDupeSelectors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -52,6 +54,7 @@ func Test_validateNoDupeSelectors(t *testing.T) { } func Test_validateNoExistingLinkToken(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( csel = chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector ethAddr = "0xeC91988D7dD84d8adE801b739172ad15c860A700" @@ -149,6 +152,7 @@ func Test_validateNoExistingLinkToken(t *testing.T) { func Test_validateChainSelectorsFamily(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( csel = chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector diff --git a/deployment/tokens/internal/ops/ops_evm_test.go b/deployment/tokens/internal/ops/ops_evm_test.go index 62f3c1d43e0..0ba2086efe2 100644 --- a/deployment/tokens/internal/ops/ops_evm_test.go +++ b/deployment/tokens/internal/ops/ops_evm_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" chainevm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" chainevmprovider "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -14,6 +15,7 @@ import ( func Test_OpEVMDeployLinkToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( chainSelector uint64 = 16015286601757825753 diff --git a/deployment/tokens/internal/ops/ops_sol_test.go b/deployment/tokens/internal/ops/ops_sol_test.go index a3bc756f3b0..666b9aa5b88 100644 --- a/deployment/tokens/internal/ops/ops_sol_test.go +++ b/deployment/tokens/internal/ops/ops_sol_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/operations" "github.com/smartcontractkit/chainlink-deployments-framework/operations/optest" ) @@ -19,6 +20,7 @@ import ( // This test is limited to verifying operation error handling. func Test_OpSolDeployLinkToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( chainSelector = chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector diff --git a/deployment/tokens/internal/ops/ops_storage_test.go b/deployment/tokens/internal/ops/ops_storage_test.go index 87308c3f869..75e17ace3f7 100644 --- a/deployment/tokens/internal/ops/ops_storage_test.go +++ b/deployment/tokens/internal/ops/ops_storage_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -15,6 +16,7 @@ import ( func Test_OpAddAddrBookRecord(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( csel = chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector @@ -89,6 +91,7 @@ func Test_OpAddAddrBookRecord(t *testing.T) { func Test_OpAddDatastoreAddrRef(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( csel = chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector diff --git a/deployment/tokens/internal/seqs/seq_deploy_evm_tokens_test.go b/deployment/tokens/internal/seqs/seq_deploy_evm_tokens_test.go index ef5de99cdbb..2846a2514b1 100644 --- a/deployment/tokens/internal/seqs/seq_deploy_evm_tokens_test.go +++ b/deployment/tokens/internal/seqs/seq_deploy_evm_tokens_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" chainevm "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm" chainevmprovider "github.com/smartcontractkit/chainlink-deployments-framework/chain/evm/provider" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -17,6 +18,7 @@ import ( func Test_SeqDeployEVMTokens(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( chainSelector = chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector diff --git a/deployment/tokens/internal/seqs/seq_deploy_solana_tokens_test.go b/deployment/tokens/internal/seqs/seq_deploy_solana_tokens_test.go index b1c66be4782..2e236534142 100644 --- a/deployment/tokens/internal/seqs/seq_deploy_solana_tokens_test.go +++ b/deployment/tokens/internal/seqs/seq_deploy_solana_tokens_test.go @@ -8,6 +8,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" chainsol "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana" chainsolprovider "github.com/smartcontractkit/chainlink-deployments-framework/chain/solana/provider" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" @@ -20,6 +21,7 @@ var once sync.Once func Test_SeqDeploySolTokens(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( chainSelector = chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector diff --git a/deployment/tokens/internal/seqs/seq_persist_address_test.go b/deployment/tokens/internal/seqs/seq_persist_address_test.go index 625978059ad..f16d66c02ba 100644 --- a/deployment/tokens/internal/seqs/seq_persist_address_test.go +++ b/deployment/tokens/internal/seqs/seq_persist_address_test.go @@ -7,6 +7,7 @@ import ( chain_selectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/datastore" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/operations" @@ -15,6 +16,7 @@ import ( func Test_PersistAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( chainSelector = chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector diff --git a/deployment/utils/solutils/artifacts_test.go b/deployment/utils/solutils/artifacts_test.go index ba1f43b8535..30853cd2899 100644 --- a/deployment/utils/solutils/artifacts_test.go +++ b/deployment/utils/solutils/artifacts_test.go @@ -14,9 +14,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDownloadProgramArtifacts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string setupServer func() *httptest.Server @@ -160,6 +162,7 @@ func TestDownloadProgramArtifacts(t *testing.T) { } func TestDownloadProgramArtifacts_ContextCancellation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Create a server that delays response server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // Simulate a slow server @@ -182,6 +185,7 @@ func TestDownloadProgramArtifacts_ContextCancellation(t *testing.T) { } func TestDownloadProgramArtifacts_InvalidURL(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tempDir := t.TempDir() err := downloadProgramArtifacts(t.Context(), "http://invalid-url", tempDir, logger.Test(t)) @@ -189,6 +193,7 @@ func TestDownloadProgramArtifacts_InvalidURL(t *testing.T) { } func TestDownloadProgramArtifacts_NonExistentTargetDir(t *testing.T) { + tests.BelongsToCISuite(t, "unit") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/gzip") diff --git a/deployment/vault/changeset/batch_native_transfer_test.go b/deployment/vault/changeset/batch_native_transfer_test.go index 279a65f5c09..d3752cca563 100644 --- a/deployment/vault/changeset/batch_native_transfer_test.go +++ b/deployment/vault/changeset/batch_native_transfer_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -37,6 +38,7 @@ var ( func TestBatchNativeTransferValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context()) require.NoError(t, err) @@ -123,6 +125,7 @@ func TestBatchNativeTransferValidation(t *testing.T) { func TestSetWhitelist(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rt, err := runtime.New(t.Context()) require.NoError(t, err) @@ -195,6 +198,7 @@ func TestSetWhitelist(t *testing.T) { func TestBatchNativeTransferIntegration(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("full workflow with MCMS setup", func(t *testing.T) { rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/vault/changeset/fund_timelock_test.go b/deployment/vault/changeset/fund_timelock_test.go index 64dd8fe01e2..33d302c8763 100644 --- a/deployment/vault/changeset/fund_timelock_test.go +++ b/deployment/vault/changeset/fund_timelock_test.go @@ -7,6 +7,7 @@ import ( chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" "github.com/smartcontractkit/chainlink/deployment/vault/changeset/types" @@ -19,6 +20,7 @@ var ( func TestFundTimelockValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector @@ -102,6 +104,7 @@ func TestFundTimelockValidation(t *testing.T) { func TestGetTimelockBalances(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selectors := []uint64{chainselectors.TEST_90000001.Selector, chainselectors.TEST_90000002.Selector} rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -149,6 +152,7 @@ func TestGetTimelockBalances(t *testing.T) { func TestCalculateFundingRequirements(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selectors := []uint64{chainselectors.TEST_90000001.Selector, chainselectors.TEST_90000002.Selector} rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( @@ -223,6 +227,7 @@ func TestCalculateFundingRequirements(t *testing.T) { func TestFundTimelockChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector1 := chainselectors.TEST_90000001.Selector selector2 := chainselectors.TEST_90000002.Selector diff --git a/deployment/vault/changeset/manage_whitelist_test.go b/deployment/vault/changeset/manage_whitelist_test.go index cf7614aff16..f1feccc9136 100644 --- a/deployment/vault/changeset/manage_whitelist_test.go +++ b/deployment/vault/changeset/manage_whitelist_test.go @@ -13,6 +13,7 @@ import ( cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/deployment/vault/changeset/types" ) @@ -25,6 +26,7 @@ const ( func TestSetWhitelistValidation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector1 := chainselectors.TEST_90000001.Selector @@ -140,6 +142,7 @@ func TestSetWhitelistValidation(t *testing.T) { func TestGetWhitelistedAddresses(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector1 := chainselectors.TEST_90000001.Selector selector2 := chainselectors.TEST_90000002.Selector @@ -256,6 +259,7 @@ func TestGetWhitelistedAddresses(t *testing.T) { func TestValidateWhitelist(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context(), environment.WithEVMSimulatedN(t, 2), @@ -355,6 +359,7 @@ func TestValidateWhitelist(t *testing.T) { func TestGetChainWhitelist(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selector := chainselectors.TEST_90000001.Selector @@ -408,6 +413,7 @@ func TestGetChainWhitelist(t *testing.T) { func TestSetWhitelistChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( selector1 = chainselectors.TEST_90000001.Selector @@ -539,6 +545,7 @@ func TestSetWhitelistChangeset(t *testing.T) { func TestOverwriteWhitelistChangeset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( selector1 = chainselectors.TEST_90000001.Selector diff --git a/deployment/vault/view/view_test.go b/deployment/vault/view/view_test.go index 51410e9488a..b95b44fca22 100644 --- a/deployment/vault/view/view_test.go +++ b/deployment/vault/view/view_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" @@ -20,6 +21,7 @@ import ( func TestVault_NoChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") env, err := environment.New(t.Context()) require.NoError(t, err) @@ -36,6 +38,7 @@ func TestVault_NoChains(t *testing.T) { func TestGenerateVaultView_WithoutTimelock(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selectors := []uint64{chainselectors.TEST_90000001.Selector} env, err := environment.New(t.Context(), @@ -59,6 +62,7 @@ func TestGenerateVaultView_WithoutTimelock(t *testing.T) { func TestGenerateVaultView_WithMCMSAndWhitelist(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") selectors := []uint64{chainselectors.TEST_90000001.Selector, chainselectors.TEST_90000002.Selector} rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( From f038bd5f1304317470fd36e33a30c0054f551da9 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 13:52:40 -0800 Subject: [PATCH 08/30] test: tag aptos tests --- deployment/ccip/changeset/aptos/cs_add_token_pool_test.go | 2 +- deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go | 2 +- deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go | 2 +- deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go | 2 +- deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go | 2 +- deployment/data-feeds/changeset/aptos/set_feed_config_test.go | 2 +- .../data-feeds/changeset/aptos/set_workflow_config_test.go | 2 +- .../data-feeds/changeset/aptos/transfer_ownership_test.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go b/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go index fba99e71f46..32da5d9475c 100644 --- a/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go +++ b/deployment/ccip/changeset/aptos/cs_add_token_pool_test.go @@ -39,7 +39,7 @@ var testTokenTransferFeeConfig = fee_quoter.TokenTransferFeeConfig{ } func TestAddTokenPool_Apply(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") quarantine.Flaky(t, "DX-2088") t.Parallel() // Setup environment and config with 1 Aptos chain diff --git a/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go b/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go index a6a0b0920fe..8470c288784 100644 --- a/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go +++ b/deployment/ccip/changeset/aptos/cs_deploy_aptos_chain_test.go @@ -241,7 +241,7 @@ func TestDeployAptosChainImp_VerifyPreconditions(t *testing.T) { func TestDeployAptosChain_Apply(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") // Setup environment with 1 Aptos chain selector := chain_selectors.APTOS_LOCALNET.Selector diff --git a/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go b/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go index ed12d33e8da..fae6a2ff8a4 100644 --- a/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go +++ b/deployment/ccip/changeset/aptos/cs_set_ocr3_offramp_test.go @@ -23,7 +23,7 @@ import ( func TestSetOCR3Offramp_Apply(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") // Setup environment and config deployedEnvironment, _ := testhelpers.NewMemoryEnvironment( t, diff --git a/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go b/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go index 558546d40b5..482a5523a87 100644 --- a/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go +++ b/deployment/ccip/changeset/aptos/cs_update_aptos_lanes_test.go @@ -33,7 +33,7 @@ import ( func TestAddAptosLanes_Apply(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") // Setup environment and config deployedEnvironment, _ := testhelpers.NewMemoryEnvironment( t, diff --git a/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go b/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go index 2ba2afda0d6..b03c921f3c6 100644 --- a/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go +++ b/deployment/data-feeds/changeset/aptos/deploy_data_feeds_test.go @@ -21,7 +21,7 @@ import ( func TestDeployAptosCache(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/set_feed_config_test.go b/deployment/data-feeds/changeset/aptos/set_feed_config_test.go index b93574748c1..27cbdb5005b 100644 --- a/deployment/data-feeds/changeset/aptos/set_feed_config_test.go +++ b/deployment/data-feeds/changeset/aptos/set_feed_config_test.go @@ -21,7 +21,7 @@ import ( func TestSetFeedConfig(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go b/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go index b1602658a16..2ee267aaa5b 100644 --- a/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go +++ b/deployment/data-feeds/changeset/aptos/set_workflow_config_test.go @@ -21,7 +21,7 @@ import ( func TestSetWorkflowConfig(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go b/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go index da9a8ea5ce7..d1e8e35bb78 100644 --- a/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go +++ b/deployment/data-feeds/changeset/aptos/transfer_ownership_test.go @@ -21,7 +21,7 @@ import ( func TestTransferOwnership(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "aptos") selector := chain_selectors.APTOS_LOCALNET.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( environment.WithAptosContainer(t, []uint64{selector}), From 2ca644d3a3117e216166f8054335523d7f747134 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 14:19:32 -0800 Subject: [PATCH 09/30] test: tag more tests --- .../ccip/changeset/cs_prerequisites_test.go | 3 +- .../solana_v0_1_1/cs_chain_contracts_test.go | 31 +++++++++++-------- .../solana_v0_1_1/cs_deploy_chain_test.go | 5 ++- .../changeset/solana_v0_1_1/cs_ops_test.go | 5 ++- .../solana_v0_1_1/cs_solana_token_test.go | 2 +- .../solana_v0_1_1/cs_token_pool_test.go | 13 +++++--- .../solana_v0_1_1/self_serve_test.go | 3 +- ...ransfer_ccip_to_mcms_with_timelock_test.go | 2 ++ .../changeset/v1_6/cs_deploy_chain_test.go | 4 +-- .../changeset/deploy_link_token_test.go | 2 +- .../deploy_mcms_with_timelock_test.go | 4 +-- .../common/changeset/set_config_mcms_test.go | 2 +- .../solana/grant_role_timelock_test.go | 2 ++ .../common/changeset/state/solana_test.go | 1 + .../transfer_to_mcms_with_timelock_test.go | 1 + .../changeset/solana/deploy_cache_test.go | 3 ++ deployment/environment/crib/env_test.go | 3 +- deployment/environment_test.go | 5 +++ deployment/evm_kmsclient_test.go | 2 ++ .../changeset/solana/deploy_forwarder_test.go | 1 + deployment/labeled_addresses_test.go | 2 ++ 21 files changed, 66 insertions(+), 30 deletions(-) diff --git a/deployment/ccip/changeset/cs_prerequisites_test.go b/deployment/ccip/changeset/cs_prerequisites_test.go index 13f7cc61bdc..119b4352572 100644 --- a/deployment/ccip/changeset/cs_prerequisites_test.go +++ b/deployment/ccip/changeset/cs_prerequisites_test.go @@ -32,10 +32,9 @@ func TestDeployPrerequisites(t *testing.T) { } func TestDeployPrerequisitesZk(t *testing.T) { + t.Parallel() // Timeouts in CI tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-6427") - - t.Parallel() tests.BelongsToCISuite(t, "with-db") // ? e, err := environment.New(t.Context(), diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go index 22022292d4c..3b030310a98 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_chain_contracts_test.go @@ -82,13 +82,14 @@ func deployTokenAndMint(t *testing.T, tenv cldf.Environment, solChain uint64, wa // remote chain setup func TestAddRemoteChainWithMcms(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "solana") doTestAddRemoteChain(t, true) } func TestAddRemoteChainWithoutMcms(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? doTestAddRemoteChain(t, false) } @@ -645,22 +646,23 @@ func doTestBilling(t *testing.T, mcms bool) { } func TestBillingWithMcms(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1723") t.Parallel() + tests.BelongsToCISuite(t, "solana") + quarantine.Flaky(t, "DX-1723") doTestBilling(t, true) } func TestBillingWithoutMcms(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? doTestBilling(t, false) } func TestSetTokenAuthority(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1778") t.Parallel() + quarantine.Flaky(t, "DX-1778") + tests.BelongsToCISuite(t, "solana") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) solChain := tenv.Env.BlockChains.ListChainSelectors(cldfChain.WithFamily(chainSelectors.FamilySolana))[0] state, err := stateview.LoadOnchainStateSolana(tenv.Env) @@ -881,15 +883,16 @@ func doTestTokenAdminRegistry(t *testing.T, mcms bool) { } func TestTokenAdminRegistryWithMcms(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1720") t.Parallel() + quarantine.Flaky(t, "DX-1720") + tests.BelongsToCISuite(t, "solana") doTestTokenAdminRegistry(t, true) } func TestTokenAdminRegistryWithoutMcms(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? doTestTokenAdminRegistry(t, false) } @@ -993,9 +996,9 @@ func doTestPoolLookupTable(t *testing.T, e cldf.Environment, mcms bool, tokenMet } func TestPoolLookupTableWithMcms(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1753") t.Parallel() + quarantine.Flaky(t, "DX-1753") + tests.BelongsToCISuite(t, "solana") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) doTestPoolLookupTable(t, tenv.Env, true, shared.CLLMetadata) } @@ -1003,6 +1006,7 @@ func TestPoolLookupTableWithMcms(t *testing.T) { func TestPoolLookupTableWithoutMcms(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) doTestPoolLookupTable(t, tenv.Env, false, shared.CLLMetadata) } @@ -1011,14 +1015,15 @@ func TestDeployCCIPContracts(t *testing.T) { // TODO: Fix this test to use the new changeset t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? testhelpers.DeployCCIPContractsTest(t, 1, 1) } // ocr3 test func TestSetOcr3Active(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1775") t.Parallel() + quarantine.Flaky(t, "DX-1775") + tests.BelongsToCISuite(t, "solana") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithNumOfNodes(16), testhelpers.WithNumOfBootstrapNodes(3), @@ -1047,9 +1052,9 @@ func TestSetOcr3Active(t *testing.T) { } func TestSetOcr3Candidate(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1771") t.Parallel() + quarantine.Flaky(t, "DX-1771") + tests.BelongsToCISuite(t, "solana") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) var err error diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go index eb4682023e8..69643f6f17e 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_deploy_chain_test.go @@ -105,9 +105,9 @@ func initialDeployCS(t *testing.T, e cldf.Environment, buildConfig *ccipChangese // use this for a quick deploy test func TestDeployChainContractsChangesetPreload(t *testing.T) { + t.Parallel() tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-1729") - t.Parallel() homeChainSel := chain_selectors.TEST_90000001.Selector solSelector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector @@ -150,6 +150,7 @@ func skipInCI(t *testing.T) { func TestUpgrade(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? homeChainSel := chain_selectors.TEST_90000001.Selector solSelector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector @@ -350,6 +351,7 @@ func TestUpgrade(t *testing.T) { func TestClose(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? homeChainSel := chain_selectors.TEST_90000001.Selector solSelector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector @@ -426,6 +428,7 @@ func TestClose(t *testing.T) { func TestIDL(t *testing.T) { skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) solChain := tenv.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilySolana))[0] e, _, err := commonchangeset.ApplyChangesets(t, tenv.Env, []commonchangeset.ConfiguredChangeSet{ diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go index a263184c37a..cd38e4ac21e 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go @@ -5,6 +5,7 @@ import ( "time" chain_selectors "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/require" cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" @@ -20,13 +21,15 @@ import ( func TestGenericOpsWithMcms(t *testing.T) { t.Parallel() - skipInCI(t) // takes too long in CI + skipInCI(t) // takes too long in CI + tests.BelongsToCISuite(t, "solana") // ? doTestGenericOps(t, true) } func TestGenericOpsWithoutMcms(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? doTestGenericOps(t, false) } diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go index f30cb6025aa..10e98a9b5d5 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_solana_token_test.go @@ -28,7 +28,7 @@ import ( ) func TestSolanaTokenOps(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "solana") quarantine.Flaky(t, "DX-1728") t.Parallel() tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(changeset_solana.SolanaContractV0_1_1)) diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go index e20b4eae22c..b529afa2cf0 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_token_pool_test.go @@ -53,15 +53,16 @@ const ( func TestAddTokenPoolWithoutMcms(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) doTestTokenPool(t, tenv.Env, TokenPoolTestConfig{MCMS: false, TokenMetadata: shared.CLLMetadata}) } func TestAddTokenPoolWithMcms(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1797") t.Parallel() + tests.BelongsToCISuite(t, "solana") + quarantine.Flaky(t, "DX-1797") tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) doTestTokenPool(t, tenv.Env, TokenPoolTestConfig{MCMS: true, TokenMetadata: shared.CLLMetadata}) } @@ -674,9 +675,10 @@ var zeroRateLimitConfig = ccipChangesetSolana.RateLimiterConfig{ } func TestAddTokenPoolE2EWithMcms(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") - quarantine.Flaky(t, "DX-1774") t.Parallel() + quarantine.Flaky(t, "DX-1774") + tests.BelongsToCISuite(t, "solana") + tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) solChain := tenv.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilySolana))[0] evmChain := tenv.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilyEVM))[0] @@ -769,6 +771,7 @@ func TestAddTokenPoolE2EWithMcms(t *testing.T) { func TestPartnerTokenPools(t *testing.T) { skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) e := tenv.Env solChainSelectors := e.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilySolana)) @@ -799,6 +802,7 @@ func TestPartnerTokenPools(t *testing.T) { func TestPartnerTokenPoolsWithUpgrades(t *testing.T) { skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) e := tenv.Env var err error @@ -892,6 +896,7 @@ func getTokenPoolBaseChainConfig(t *testing.T, e cldf.Environment, solChain uint func TestCreatingMultisig(t *testing.T) { skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? tenv, _ := testhelpers.NewMemoryEnvironment(t, testhelpers.WithSolChains(1), testhelpers.WithCCIPSolanaContractVersion(ccipChangesetSolana.SolanaContractV0_1_1)) solChain := tenv.Env.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chain_selectors.FamilySolana))[0] deployerKey := tenv.Env.BlockChains.SolanaChains()[solChain].DeployerKey.PublicKey() diff --git a/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go b/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go index 29217da5309..cbd1f67aca2 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/self_serve_test.go @@ -40,12 +40,13 @@ func TestOnboardTokenPoolForSelfServeWithMCMs(t *testing.T) { // TODO: Fix this test skipInCI(t) t.Parallel() + tests.BelongsToCISuite(t, "solana") doTestOnboardTokenPoolForSelfServe(t, true) } func TestOnboardTokenPoolForSelfServeWithoutMCMs(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "solana") doTestOnboardTokenPoolForSelfServe(t, false) } diff --git a/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go b/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go index 6a5d4927234..ed249f365e5 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/transfer_ccip_to_mcms_with_timelock_test.go @@ -349,6 +349,7 @@ func prepareEnvironmentForOwnershipTransfer(t *testing.T) (cldf.Environment, sta func TestTransferCCIPToMCMSWithTimelockSolana(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? e, state := prepareEnvironmentForOwnershipTransfer(t) solSelector := e.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chainselectors.FamilySolana))[0] @@ -441,6 +442,7 @@ func TestTransferCCIPToMCMSWithTimelockSolana(t *testing.T) { func TestTransferCCIPFromMCMSWithTimelockSolana(t *testing.T) { t.Parallel() skipInCI(t) + tests.BelongsToCISuite(t, "solana") // ? e, state := prepareEnvironmentForOwnershipTransfer(t) solSelector := e.BlockChains.ListChainSelectors(cldf_chain.WithFamily(chainselectors.FamilySolana))[0] diff --git a/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go b/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go index c9d5d80654d..393b54b5f15 100644 --- a/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go +++ b/deployment/ccip/changeset/v1_6/cs_deploy_chain_test.go @@ -47,10 +47,10 @@ func TestDeployChainContractsChangeset(t *testing.T) { } func TestDeployChainContractsChangesetZk(t *testing.T) { + t.Parallel() // Timeouts in CI tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-6427") - - t.Parallel() + tests.BelongsToCISuite(t, "unit") // ? homeChainSel := chain_selectors.TEST_90000001.Selector zkChainSel := chain_selectors.TEST_90000050.Selector diff --git a/deployment/common/changeset/deploy_link_token_test.go b/deployment/common/changeset/deploy_link_token_test.go index 3f8c4940c80..2c95c2454e6 100644 --- a/deployment/common/changeset/deploy_link_token_test.go +++ b/deployment/common/changeset/deploy_link_token_test.go @@ -47,8 +47,8 @@ func TestDeployLinkToken(t *testing.T) { func TestDeployLinkTokenZk(t *testing.T) { // Timeouts in CI tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/CCIP-6427") - t.Parallel() + tests.BelongsToCISuite(t, "unit") // ? selector := chain_selectors.TEST_90000050.Selector rt, err := runtime.New(t.Context(), runtime.WithEnvOpts( diff --git a/deployment/common/changeset/deploy_mcms_with_timelock_test.go b/deployment/common/changeset/deploy_mcms_with_timelock_test.go index 23574f329ef..e9aec47fa21 100644 --- a/deployment/common/changeset/deploy_mcms_with_timelock_test.go +++ b/deployment/common/changeset/deploy_mcms_with_timelock_test.go @@ -446,9 +446,9 @@ func TestDeployMCMSWithTimelockV2(t *testing.T) { // TestDeployMCMSWithTimelockV2SkipInit tests calling the deploy changeset when accounts have already been initialized func TestDeployMCMSWithTimelockV2SkipInitSolana(t *testing.T) { - tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-438") - t.Parallel() + tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-438") + tests.BelongsToCISuite(t, "unit") // ? selector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector programsPath, programIDs, ab := soltestutils.PreloadMCMS(t, selector) diff --git a/deployment/common/changeset/set_config_mcms_test.go b/deployment/common/changeset/set_config_mcms_test.go index 9c1a133bb62..423ad5b6bde 100644 --- a/deployment/common/changeset/set_config_mcms_test.go +++ b/deployment/common/changeset/set_config_mcms_test.go @@ -277,8 +277,8 @@ func TestSetConfigMCMSV2Solana(t *testing.T) { func TestValidateV2(t *testing.T) { tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-439") - t.Parallel() + tests.BelongsToCISuite(t, "unit") // ? evmSelector := chain_selectors.TEST_90000001.Selector solSelector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector diff --git a/deployment/common/changeset/solana/grant_role_timelock_test.go b/deployment/common/changeset/solana/grant_role_timelock_test.go index 45ae52507ed..8a3bd156962 100644 --- a/deployment/common/changeset/solana/grant_role_timelock_test.go +++ b/deployment/common/changeset/solana/grant_role_timelock_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/gagliardetto/solana-go" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" mcmssolanasdk "github.com/smartcontractkit/mcms/sdk/solana" mcmstypes "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" @@ -21,6 +22,7 @@ import ( func TestGrantRoleTimelockSolana(t *testing.T) { t.Skip("fails with Program is not deployed (DoajfR5tK24xVw51fWcawUZWhAXD8yrBJVacc13neVQA) in CI") t.Parallel() + tests.BelongsToCISuite(t, "solana") // --- arrange --- rt, selector := setupTest(t) diff --git a/deployment/common/changeset/state/solana_test.go b/deployment/common/changeset/state/solana_test.go index d6cea1f0a2f..7f4ef2af2c3 100644 --- a/deployment/common/changeset/state/solana_test.go +++ b/deployment/common/changeset/state/solana_test.go @@ -27,6 +27,7 @@ import ( func TestMCMSWithTimelockState_GenerateMCMSWithTimelockViewSolana(t *testing.T) { tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-404") t.Parallel() + tests.BelongsToCISuite(t, "solana") // ? selector := chainselectors.TEST_22222222222222222222222222222222222222222222.Selector programsPath, programIDs, ab := soltestutils.PreloadMCMS(t, selector) diff --git a/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go b/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go index 9dac5353842..44ccb6bae4d 100644 --- a/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go +++ b/deployment/common/changeset/transfer_to_mcms_with_timelock_test.go @@ -190,6 +190,7 @@ func TestTransferToMCMSWithTimelockV2DataStore(t *testing.T) { func TestRenounceTimelockDeployerConfigValidate(t *testing.T) { tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-724") t.Parallel() + tests.BelongsToCISuite(t, "unit") // ? selector1 := chain_selectors.TEST_90000001.Selector selector2 := chain_selectors.TEST_90000002.Selector diff --git a/deployment/data-feeds/changeset/solana/deploy_cache_test.go b/deployment/data-feeds/changeset/solana/deploy_cache_test.go index a05b0e9bacc..4946fd2cca1 100644 --- a/deployment/data-feeds/changeset/solana/deploy_cache_test.go +++ b/deployment/data-feeds/changeset/solana/deploy_cache_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/environment" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" solanaMCMS "github.com/smartcontractkit/chainlink/deployment/common/changeset/solana/mcms" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" @@ -33,6 +34,7 @@ const ( func TestDeployCache(t *testing.T) { skipInCI(t) t.Parallel() + tests.BelongsToCISuite(t, "solana") selector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector e, err := environment.New(t.Context(), @@ -103,6 +105,7 @@ func TestDeployCache(t *testing.T) { func TestConfigureCache(t *testing.T) { skipInCI(t) t.Parallel() + tests.BelongsToCISuite(t, "solana") selector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector programsPath := t.TempDir() diff --git a/deployment/environment/crib/env_test.go b/deployment/environment/crib/env_test.go index 53a9e2b100a..feea491b3e8 100644 --- a/deployment/environment/crib/env_test.go +++ b/deployment/environment/crib/env_test.go @@ -10,9 +10,10 @@ import ( ) func TestShouldProvideEnvironmentConfig(t *testing.T) { + t.Parallel() tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-291") + tests.BelongsToCISuite(t, "unit") // ? - t.Parallel() env := NewDevspaceEnvFromStateDir(nil, "testdata/lanes-deployed-state") config, err := env.GetConfig(DeployerKeys{ EVMKey: "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", diff --git a/deployment/environment_test.go b/deployment/environment_test.go index a1f61a1f589..c15be6c7d87 100644 --- a/deployment/environment_test.go +++ b/deployment/environment_test.go @@ -10,6 +10,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" chain_selectors "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" types2 "github.com/smartcontractkit/libocr/offchainreporting2/types" types3 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/stretchr/testify/assert" @@ -20,6 +21,7 @@ import ( ) func TestNode_OCRConfigForChainSelector(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var m = map[chain_selectors.ChainDetails]OCRConfig{ { ChainSelector: chain_selectors.APTOS_TESTNET.Selector, @@ -103,6 +105,7 @@ func TestNode_OCRConfigForChainSelector(t *testing.T) { } func TestNode_ChainConfigs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { NodeID string SelToOCRConfig map[chain_selectors.ChainDetails]OCRConfig @@ -305,6 +308,7 @@ func hexFrom32Byte(t *testing.T, s string) string { } func Test_isValidMultiAddr(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Generate a p2p piece using p2pkey.MustNewV2XXXTestingOnly() seed := big.NewInt(123) p2p := p2pkey.MustNewV2XXXTestingOnly(seed).PeerID().String() @@ -339,6 +343,7 @@ func Test_isValidMultiAddr(t *testing.T) { } } func TestNewNodeFromJD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") wk := "node-workflow-key" type args struct { jdNode *nodev1.Node diff --git a/deployment/evm_kmsclient_test.go b/deployment/evm_kmsclient_test.go index f4917722839..f4bf2dd9cbb 100644 --- a/deployment/evm_kmsclient_test.go +++ b/deployment/evm_kmsclient_test.go @@ -4,10 +4,12 @@ import ( "encoding/hex" "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/require" ) func TestKMSToEthSigConversion(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kmsSigBytes, err := hex.DecodeString("304402206168865941bafcae3a8cf8b26edbb5693d62222b2e54d962c1aabbeaddf33b6802205edc7f597d2bf2d1eaa14fc514a6202bafcffe52b13ae3fec00674d92a874b73") require.NoError(t, err) ecdsaPublicKeyBytes, err := hex.DecodeString("04a735e9e3cb526f83be23b03f1f5ae7788a8654e3f0fcfb4f978290de07ebd47da30eeb72e904fdd4a81b46e320908ff4345e119148f89c1f04674c14a506e24b") diff --git a/deployment/keystone/changeset/solana/deploy_forwarder_test.go b/deployment/keystone/changeset/solana/deploy_forwarder_test.go index ef29602a8b3..1c2e961e887 100644 --- a/deployment/keystone/changeset/solana/deploy_forwarder_test.go +++ b/deployment/keystone/changeset/solana/deploy_forwarder_test.go @@ -38,6 +38,7 @@ const ( func TestDeployForwarder(t *testing.T) { skipInCI(t) t.Parallel() + tests.BelongsToCISuite(t, "unit") // ? selector := chain_selectors.TEST_22222222222222222222222222222222222222222222.Selector env, err := environment.New(t.Context(), diff --git a/deployment/labeled_addresses_test.go b/deployment/labeled_addresses_test.go index c4c4fe0b2ab..92aeeabc662 100644 --- a/deployment/labeled_addresses_test.go +++ b/deployment/labeled_addresses_test.go @@ -6,10 +6,12 @@ import ( "github.com/Masterminds/semver/v3" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" ) func TestLabeledAddresses_And(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string give LabeledAddresses From 8694b90fe32ceee545d95a339870a6f90432b9d6 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 14:20:27 -0800 Subject: [PATCH 10/30] test: specific workflows --- .github/workflows/ci-core.yml | 4 +-- .github/workflows/ci-integration.yml | 37 ++++++++++------------------ 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index ea6200c6baf..cb513c2387c 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -226,7 +226,7 @@ jobs: os: ${{ needs.runner-config.outputs.deployment-tests-runner }} should-run: ${{ needs.filter.outputs.should-run-deployment-tests }} go-mod-directory: "deployment/" - # test-suite: "unit" + test-suite: "unit" # trunk-auto-quarantine: "true" name: Core Tests (${{ matrix.type.cmd }}) @@ -284,7 +284,7 @@ jobs: id: run-tests shell: bash env: - # CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite || '' }} + CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite }} OUTPUT_FILE: ./output.txt PRODUCE_JUNIT_XML: "true" TRUNK_AUTO_QUARANTINE: ${{ matrix.type.trunk-auto-quarantine }} diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml index 30d52d69013..0a0a3caeb6f 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-integration.yml @@ -38,20 +38,20 @@ jobs: # cmd: go_core_tests # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - # - module: Deployment - # cmd: go_core_ccip_deployment_tests - # test-suite: "solana" - # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - # go-mod-directory: "deployment/" - # setup-solana: "true" + - module: Deployment + cmd: go_core_ccip_deployment_tests + test-suite: "solana" + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + go-mod-directory: "deployment/" + setup-solana: "true" # setup-loopps: "true" - # - module: Deployment - # test-suite: "aptos" - # cmd: go_core_ccip_deployment_tests - # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - # go-mod-directory: "deployment/" - # aptos-cli-version: "7.10.0" + - module: Deployment + test-suite: "aptos" + cmd: go_core_ccip_deployment_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + go-mod-directory: "deployment/" + aptos-cli-version: "7.10.0" # setup-loopps: "true" - module: Deployment @@ -140,22 +140,11 @@ jobs: GODEBUG=goindex=0 ./tools/bin/${{ matrix.type.cmd }} ./... # See: https://github.com/golang/go/issues/69179 - - name: Artifact name - id: artifact-name - if: ${{ always() }} - env: - CMD: ${{ matrix.type.cmd }} - REGEX: ${{ matrix.type.regex }} - run: | - REGEX_SANITIZED=$(echo "$REGEX" | sed 's/[\\^$.*+?{}()|\[\]]//g' | tr ' ' '_') - ARTIFACT_NAME="${CMD}_${REGEX_SANITIZED}_logs" - echo "artifact-name=$ARTIFACT_NAME" | tee -a "$GITHUB_OUTPUT" - - name: Store logs artifacts if: ${{ always() }} uses: actions/upload-artifact@v4 with: - name: ${{ steps.artifact-name.outputs.artifact-name }} + name: ${{ matrix.type.cmd }}_${{matrix.type.test-suite}}_logs path: | ./output.txt ./output-short.txt From 2c77a4fa2a6b3910f7c601ecb2d4e59bb84bc7a3 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 15:00:19 -0800 Subject: [PATCH 11/30] test: tag more tests --- core/bridges/bridge_type_test.go | 5 +++ core/bridges/cache_test.go | 3 ++ core/bridges/external_initiator_test.go | 3 ++ core/bridges/orm_test.go | 4 ++ .../ccip_integration_tests/home_chain_test.go | 2 + .../rmn/rmn_home_test.go | 2 + .../usdcreader/usdcreader_test.go | 2 + .../ccip/ccipaptos/addresscodec_test.go | 4 ++ .../ccip/ccipaptos/commitcodec_test.go | 3 ++ .../ccip/ccipaptos/executecodec_test.go | 3 ++ .../ccip/ccipaptos/extradatadecoder_test.go | 3 ++ .../ccip/ccipaptos/msghasher_test.go | 4 ++ .../ccip/ccipevm/addresscodec_test.go | 8 ++++ .../ccip/ccipevm/commitcodec_test.go | 2 + .../ccip/ccipevm/executecodec_test.go | 3 ++ .../ccip/ccipevm/extradatacodec_test.go | 3 ++ .../ccip/ccipevm/gas_helpers_test.go | 3 ++ .../capabilities/ccip/ccipevm/helpers_test.go | 2 + .../ccip/ccipevm/msghasher_test.go | 3 ++ .../ccip/ccipevm/rmncrypto_test.go | 3 +- .../ccip/ccipevm/tokendata_test.go | 2 + .../ccip/ccipsolana/addresscodec_test.go | 5 +++ .../ccip/ccipsolana/commitcodec_test.go | 3 ++ .../ccip/ccipsolana/executecodec_test.go | 4 ++ .../ccip/ccipsolana/extradatacodec_test.go | 2 + .../ccip/ccipsolana/gas_helpers_test.go | 3 ++ .../ccip/ccipsolana/msghasher_test.go | 5 +++ core/capabilities/ccip/common/common_test.go | 2 + .../ccip/configs/evm/chain_writer_test.go | 2 + .../ccip/configs/evm/init_test.go | 3 ++ .../ccip/configs/solana/chain_writer_test.go | 2 + .../configs/solana/contract_reader_test.go | 2 + .../ccip/launcher/deployment_test.go | 2 + core/capabilities/ccip/launcher/diff_test.go | 6 +++ .../ccip/launcher/integration_test.go | 2 + .../ocrimpls/contract_transmitter_test.go | 2 + .../ccip/oraclecreator/bootstrap_test.go | 2 + .../ccip/oraclecreator/create_test.go | 4 ++ .../ccip/oraclecreator/plugin_test.go | 4 ++ .../ccip/oraclecreator/wrapped_oracle_test.go | 3 ++ .../ccip/validate/validate_test.go | 3 ++ core/capabilities/compute/cache_test.go | 1 + core/capabilities/compute/compute_test.go | 8 ++++ core/capabilities/compute/transformer_test.go | 6 +++ core/capabilities/don_notifier_test.go | 4 ++ core/capabilities/encoder_factory_test.go | 3 ++ .../fakes/consensus_nodag_test.go | 2 + .../gateway_connector/service_wrapper_test.go | 3 ++ .../keystone/keystone_test.go | 3 ++ .../keystone/llo_feed_test.go | 2 + core/capabilities/launcher_test.go | 12 ++++++ .../remote/aggregation/default_mode_test.go | 2 + .../remote/aggregation/signed_report_test.go | 2 + .../remote/combined_client_test.go | 16 ++++++++ core/capabilities/remote/dispatcher_test.go | 7 ++++ .../remote/executable/client_test.go | 4 ++ .../remote/executable/endtoend_test.go | 4 ++ .../remote/executable/hasher_test.go | 7 ++++ .../executable/parallel_executor_test.go | 5 +++ .../executable/request/client_request_test.go | 2 + .../executable/request/server_request_test.go | 2 + .../remote/executable/server_test.go | 14 +++++++ .../remote/messagecache/message_cache_test.go | 3 ++ .../remote/trigger_publisher_test.go | 5 +++ .../remote/trigger_subscriber_test.go | 5 +++ core/capabilities/remote/utils_test.go | 4 ++ core/capabilities/streams/codec_test.go | 2 + .../streams/consensus_agg_test.go | 6 ++- core/capabilities/streams/trigger_test.go | 6 ++- .../local_target_capability_test.go | 2 + .../transmission/transmission_test.go | 2 + .../logevent/log_event_trigger_test.go | 2 + .../validation/validation_test.go | 4 ++ core/capabilities/vault/capability_test.go | 8 ++++ core/capabilities/vault/gw_handler_test.go | 3 ++ core/capabilities/vault/models_test.go | 5 +++ .../vault/request_authorizer_test.go | 5 +++ .../vault/vaultutils/json_test.go | 3 ++ .../webapi/outgoing_connector_handler_test.go | 5 +++ .../capabilities/webapi/target/target_test.go | 3 ++ .../webapi/trigger/trigger_test.go | 5 +++ core/cbor/cbor_test.go | 9 +++++ core/cmd/admin_commands_test.go | 6 +++ core/cmd/app_test.go | 2 + core/cmd/aptos_keys_commands_test.go | 3 ++ core/cmd/blocks_commands_test.go | 3 ++ core/cmd/bridge_commands_test.go | 7 ++++ core/cmd/chains_commands_test.go | 3 ++ core/cmd/cosmos_keys_commands_test.go | 3 ++ core/cmd/csa_keys_commands_test.go | 5 +++ core/cmd/eth_keys_commands_test.go | 9 +++++ core/cmd/evm_transaction_commands_test.go | 6 +++ core/cmd/external_initiator_commands_test.go | 2 + core/cmd/forwarders_commands_test.go | 5 +++ core/cmd/jobs_commands_test.go | 10 +++++ core/cmd/node_commands_test.go | 3 ++ core/cmd/ocr2_keys_commands_test.go | 3 ++ core/cmd/ocr_keys_commands_test.go | 6 +++ core/cmd/p2p_keys_commands_test.go | 6 +++ core/cmd/presenters_test.go | 2 + core/cmd/renderer_test.go | 6 +++ core/cmd/shell_local_test.go | 2 + core/config/config_internal_test.go | 5 +++ core/config/docs/defaults_test.go | 2 + core/config/docs/docs_test.go | 2 + core/config/env/env_test.go | 3 ++ core/config/toml/types_test.go | 16 ++++++++ core/internal/features/features_test.go | 5 +++ .../features/ocr2/features_ocr2_test.go | 3 ++ core/internal/testutils/pgtest/txdb_test.go | 2 + core/logger/audit/audit_logger_test.go | 2 + core/logger/disk_stats_test.go | 3 ++ core/logger/fields_test.go | 4 ++ .../internal/colortest/prettyconsole_test.go | 2 + core/logger/logger_test.go | 4 ++ core/logger/null_logger_test.go | 2 + core/logger/passthrough_test.go | 3 ++ core/logger/prometheus_test.go | 3 ++ core/logger/sentry_test.go | 3 ++ core/logger/test_logger_test.go | 3 ++ core/logger/trace_noop_test.go | 3 ++ core/logger/zap_test.go | 5 +++ core/monitoring/utils_test.go | 3 ++ core/null/int64_test.go | 12 ++++++ core/null/uint32_test.go | 12 ++++++ core/services/blockhashstore/bhs_test.go | 2 + core/services/blockhashstore/feeder_test.go | 5 +++ core/services/blockhashstore/validate_test.go | 2 + .../block_header_feeder_test.go | 3 ++ .../blockheaderfeeder/validate_test.go | 2 + core/services/ccip/observability_test.go | 2 + .../chainlink/config_audit_logger_test.go | 3 ++ .../chainlink/config_auto_pprof_test.go | 2 + .../chainlink/config_capabilities_test.go | 3 ++ core/services/chainlink/config_ccv_test.go | 3 ++ core/services/chainlink/config_cre_test.go | 5 +++ .../chainlink/config_database_test.go | 2 + .../services/chainlink/config_feature_test.go | 3 ++ .../chainlink/config_flux_monitor_test.go | 3 ++ .../services/chainlink/config_general_test.go | 6 +++ .../chainlink/config_insecure_test.go | 3 ++ .../chainlink/config_job_distributor_test.go | 3 ++ .../chainlink/config_job_pipeline_test.go | 2 + core/services/chainlink/config_keeper_test.go | 3 ++ core/services/chainlink/config_log_test.go | 2 + .../services/chainlink/config_mercury_test.go | 3 ++ core/services/chainlink/config_ocr2_test.go | 3 ++ core/services/chainlink/config_ocr_test.go | 3 ++ core/services/chainlink/config_p2p_test.go | 3 ++ .../chainlink/config_password_test.go | 3 ++ .../chainlink/config_prometheus_test.go | 3 ++ .../chainlink/config_pyroscope_test.go | 3 ++ .../config_telemetry_ingress_test.go | 3 ++ .../chainlink/config_telemetry_test.go | 19 ++++++++++ core/services/chainlink/config_test.go | 27 +++++++++++--- .../chainlink/config_threshold_test.go | 3 ++ .../services/chainlink/config_tracing_test.go | 2 + .../chainlink/config_web_server_test.go | 3 ++ .../chainlink/config_workflows_test.go | 3 ++ core/services/chainlink/heartbeat_test.go | 3 ++ .../relayer_chain_interoperators_test.go | 2 + .../chainlink/secret_generator_test.go | 3 ++ core/services/cresettings/validate_test.go | 2 + core/services/cron/cron_test.go | 2 + core/services/directrequest/delegate_test.go | 2 + core/services/directrequest/validate_test.go | 4 ++ .../services/feeds/connection_manager_test.go | 3 ++ core/services/feeds/models_test.go | 15 ++++++++ core/services/feeds/orm_test.go | 32 ++++++++++++++++ core/services/feeds/rpc_handlers_test.go | 8 ++++ core/services/feeds/service_test.go | 8 ++++ .../fluxmonitorv2/contract_submitter_test.go | 2 + .../fluxmonitorv2/deviation_checker_test.go | 2 + core/services/fluxmonitorv2/flags_test.go | 2 + .../fluxmonitorv2/flux_monitor_test.go | 15 ++++++++ .../fluxmonitorv2/integrations_test.go | 5 +++ core/services/fluxmonitorv2/key_store_test.go | 3 ++ core/services/fluxmonitorv2/orm_test.go | 4 ++ .../fluxmonitorv2/payment_checker_test.go | 3 ++ .../fluxmonitorv2/poll_manager_test.go | 15 ++++++++ .../fluxmonitorv2/submission_checker_test.go | 2 + core/services/fluxmonitorv2/validate_test.go | 3 ++ .../functions/connector_handler_test.go | 3 ++ .../functions/external_adapter_client_test.go | 15 ++++++++ core/services/functions/listener_test.go | 12 ++++++ .../functions/offchain_transmitter_test.go | 2 + core/services/functions/orm_test.go | 12 ++++++ .../services/gateway/api/jsonrpccodec_test.go | 6 +++ core/services/gateway/api/message_test.go | 3 ++ .../gateway/common/aggregation/common_test.go | 3 ++ .../aggregation/response_aggregator_test.go | 4 ++ .../workflow_metadata_aggregator_test.go | 10 +++++ core/services/gateway/common/utils_test.go | 4 ++ .../gateway/connectionmanager_test.go | 7 ++++ .../gateway/connector/connector_test.go | 8 ++++ core/services/gateway/delegate_test.go | 2 + core/services/gateway/gateway_test.go | 16 ++++++++ .../handlers/capabilities/handler_test.go | 3 ++ .../capabilities/v2/http_handler_test.go | 12 ++++++ .../v2/http_trigger_handler_test.go | 12 ++++++ .../capabilities/v2/metrics/metrics_test.go | 2 + .../capabilities/v2/response_cache_test.go | 8 ++++ .../v2/workflow_metadata_handler_test.go | 17 +++++++++ .../handlers/capabilities/webapi_test.go | 3 ++ .../gateway/handlers/common/callback_test.go | 2 + .../handlers/common/message_util_test.go | 5 +++ .../handlers/common/requestcache_test.go | 5 +++ .../allowlist/allowlist_internal_test.go | 2 + .../functions/allowlist/allowlist_test.go | 6 +++ .../handlers/functions/allowlist/orm_test.go | 6 +++ .../functions/handler.functions_test.go | 7 ++++ .../functions/subscriptions/orm_test.go | 4 ++ .../subscriptions/subscriptions_test.go | 4 ++ .../subscriptions/user_subscriptions_test.go | 4 ++ .../gateway/handlers/handler.dummy_test.go | 2 + .../gateway/handlers/vault/aggregator_test.go | 6 +++ .../gateway/handlers/vault/handler_test.go | 4 ++ .../gateway_integration_test.go | 2 + .../gateway/network/httpclient_test.go | 9 ++++- .../gateway/network/httpserver_test.go | 9 +++++ .../gateway/network/wsconnection_test.go | 2 + .../services/gateway/network/wsserver_test.go | 6 +++ .../headreporter/head_reporter_test.go | 2 + .../headreporter/prometheus_reporter_test.go | 2 + core/services/health_test.go | 2 + core/services/job/job_orm_test.go | 4 ++ core/services/job/validate_test.go | 3 ++ core/services/keeper/integration_test.go | 2 + core/services/keeper/models_test.go | 2 + core/services/keeper/orm_test.go | 17 +++++++++ .../keeper/registry1_1_synchronizer_test.go | 2 + .../keeper/registry_synchronizer_sync_test.go | 2 + .../keeper/upkeep_executer_unit_test.go | 2 + core/services/keeper/validate_test.go | 3 ++ core/services/keystore/aptos_test.go | 2 + core/services/keystore/internal/raw_test.go | 3 ++ .../keystore/keys/aptoskey/export_test.go | 2 + .../keystore/keys/aptoskey/key_test.go | 2 + .../keystore/keys/cosmoskey/export_test.go | 2 + .../keystore/keys/csakey/export_test.go | 2 + .../keystore/keys/csakey/key_v2_test.go | 3 ++ .../keystore/keys/dkgrecipientkey/key_test.go | 7 ++++ .../keystore/keys/ethkey/key_v2_test.go | 3 ++ .../keys/ocr2key/cosmos_keyring_test.go | 4 ++ .../keys/ocr2key/ed25519_keyring_test.go | 4 ++ .../keystore/keys/ocr2key/evm_keyring_test.go | 5 +++ .../keystore/keys/ocr2key/export_test.go | 2 + .../keys/ocr2key/generic_key_bundle_test.go | 2 + .../keystore/keys/ocr2key/key_bundle_test.go | 3 ++ .../keys/ocr2key/offchain_keyring_test.go | 6 +++ .../keys/ocr2key/solana_keyring_test.go | 4 ++ .../keystore/keys/ocr2key/ton_keyring_test.go | 5 +++ .../keys/ocrkey/config_public_key_test.go | 3 ++ .../keystore/keys/ocrkey/export_test.go | 2 + .../keystore/keys/ocrkey/key_v2_test.go | 3 ++ .../keys/ocrkey/off_chain_private_key_test.go | 3 ++ .../keys/ocrkey/off_chain_public_key_test.go | 4 ++ .../keys/ocrkey/on_chain_private_key_test.go | 3 ++ .../keys/ocrkey/on_chain_public_key_test.go | 3 ++ .../ocrkey/on_chain_signing_address_test.go | 2 + .../keystore/keys/p2pkey/export_test.go | 2 + .../keystore/keys/p2pkey/key_v2_test.go | 3 ++ .../keystore/keys/p2pkey/peer_id_test.go | 4 ++ .../keystore/keys/solkey/export_test.go | 2 + .../keystore/keys/starkkey/export_test.go | 2 + .../keystore/keys/starkkey/ocr2key_test.go | 4 ++ .../keystore/keys/suikey/export_test.go | 2 + .../services/keystore/keys/suikey/key_test.go | 2 + .../keystore/keys/tonkey/export_test.go | 2 + .../services/keystore/keys/tonkey/key_test.go | 3 ++ .../keystore/keys/tronkey/account_test.go | 5 +++ .../keystore/keys/tronkey/export_test.go | 2 + .../keystore/keys/tronkey/key_test.go | 4 ++ .../keystore/keys/vrfkey/crypto_test.go | 5 +++ .../keystore/keys/vrfkey/export_test.go | 2 + .../keystore/keys/vrfkey/key_v2_test.go | 2 + .../keystore/keys/vrfkey/models_test.go | 3 ++ .../keystore/keys/vrfkey/proof_test.go | 3 ++ .../keystore/keys/workflowkey/key_test.go | 7 ++++ core/services/keystore/models_test.go | 2 + .../services/llo/bm/dummy_transmitter_test.go | 2 + .../channel_definition_cache_factory_test.go | 2 + .../onchain_channel_definition_cache_test.go | 5 +++ core/services/llo/cleanup_test.go | 2 + core/services/llo/cre/report_codec_test.go | 3 ++ core/services/llo/cre/transmitter_test.go | 2 + core/services/llo/grpc/client_test.go | 2 + .../llo/mercurytransmitter/orm_test.go | 2 + core/services/llo/observation/cache_test.go | 7 ++++ .../llo/observation/data_source_test.go | 2 + .../observation/observation_context_test.go | 4 ++ ...gin_scoped_retirement_report_cache_test.go | 2 + .../retirement_report_cache_test.go | 2 + .../retirement/retirement_report_orm_test.go | 2 + core/services/llo/telem/sampling_test.go | 5 +++ core/services/llo/telem/telemetry_test.go | 5 +++ .../bridge_status_reporter_test.go | 37 +++++++++++++++++++ core/services/nurse_test.go | 2 + core/services/ocr/config_overrider_test.go | 3 ++ core/services/ocr/contract_tracker_test.go | 4 ++ .../services/ocr/contract_transmitter_test.go | 2 + core/services/ocr/database_test.go | 2 + core/services/ocr2/database_test.go | 2 + .../ccip/abihelpers/abi_helpers_test.go | 4 ++ .../plugins/ccip/ccipcommit/factory_test.go | 2 + .../ocr2/plugins/ccip/ccipcommit/ocr2_test.go | 15 ++++++++ .../plugins/ccip/ccipexec/batching_test.go | 5 +++ .../plugins/ccip/ccipexec/factory_test.go | 2 + .../plugins/ccip/ccipexec/gashelpers_test.go | 5 +++ .../plugins/ccip/ccipexec/helpers_test.go | 2 + .../plugins/ccip/ccipexec/inflight_test.go | 3 ++ .../ocr2/plugins/ccip/ccipexec/ocr2_test.go | 19 ++++++++++ .../plugins/ccip/clo_ccip_integration_test.go | 3 ++ .../plugins/ccip/config/chain_config_test.go | 6 +++ .../ocr2/plugins/ccip/config/config_test.go | 7 +++- .../ccip/config/type_and_version_test.go | 3 ++ .../ccip/estimatorconfig/config_test.go | 3 ++ .../ocr2/plugins/ccip/integration_test.go | 3 ++ .../ccip/internal/cache/autosync_test.go | 2 + .../ccip/internal/cache/chain_health_test.go | 5 +++ .../ccip/internal/cache/commit_roots_test.go | 2 + .../internal/cache/commit_roots_unit_test.go | 5 +++ .../plugins/ccip/internal/cache/lazy_test.go | 5 +++ .../cache/observed_chain_health_test.go | 3 ++ .../plugins/ccip/internal/cache/once_test.go | 5 +++ .../ccip/internal/ccipcalc/calc_test.go | 8 ++++ .../internal/ccipcommon/shortcuts_test.go | 6 +++ .../token_pool_batch_reader_test.go | 2 + .../ccipdata/factory/commit_store_test.go | 2 + .../internal/ccipdata/factory/offramp_test.go | 2 + .../internal/ccipdata/factory/onramp_test.go | 2 + .../ccipdata/factory/price_registry_test.go | 2 + .../ccip/internal/ccipdata/reader_test.go | 3 ++ .../ccipdata/usdc_reader_internal_test.go | 4 ++ .../ccipdata/v1_2_0/commit_store_test.go | 4 ++ .../internal/ccipdata/v1_2_0/hasher_test.go | 3 ++ .../ccipdata/v1_2_0/offramp_reader_test.go | 2 + .../v1_2_0/offramp_reader_unit_test.go | 6 +++ .../internal/ccipdata/v1_2_0/offramp_test.go | 4 ++ .../internal/ccipdata/v1_2_0/onramp_test.go | 2 + .../ccipdata/v1_2_0/token_pool_test.go | 2 + .../ccipdata/v1_4_0/token_pool_test.go | 2 + .../internal/ccipdata/v1_5_0/hasher_test.go | 2 + .../internal/ccipdata/v1_5_0/onramp_test.go | 3 ++ .../internal/ccipdb/price_service_test.go | 8 ++++ .../internal/logpollerutil/filters_test.go | 4 ++ .../internal/observability/metrics_test.go | 3 ++ .../observability/onramp_observed_test.go | 3 ++ .../ccip/internal/parseutil/bigint_test.go | 3 ++ .../ccip/internal/pricegetter/evm_test.go | 2 + .../internal/pricegetter/pipeline_test.go | 2 + .../plugins/ccip/internal/rpclib/evm_test.go | 4 ++ .../ocr2/plugins/ccip/metrics_test.go | 4 ++ .../ocr2/plugins/ccip/observations_test.go | 11 +++++- .../ccip/prices/da_price_estimator_test.go | 6 +++ .../ccip/prices/exec_price_estimator_test.go | 6 +++ .../plugins/ccip/tokendata/bgworker_test.go | 4 ++ .../plugins/ccip/tokendata/lbtc/lbtc_test.go | 7 ++++ .../observability/usdc_client_test.go | 2 + .../ccip/tokendata/usdc/usdc_blackbox_test.go | 2 + .../plugins/ccip/tokendata/usdc/usdc_test.go | 6 +++ .../plugins/functions/aggregation_test.go | 3 ++ .../plugins/functions/config/config_test.go | 3 ++ .../functions/encoding/abi_codec_test.go | 3 ++ .../v1/functions_integration_test.go | 5 +++ .../ocr2/plugins/functions/plugin_test.go | 3 ++ .../ocr2/plugins/functions/reporting_test.go | 15 ++++++++ .../ocr2/plugins/generic/merge_test.go | 3 ++ .../generic/pipeline_runner_adapter_test.go | 4 ++ .../ocr2/plugins/generic/relayerset_test.go | 4 ++ .../plugins/generic/telemetry_adapter_test.go | 2 + .../ocr2/plugins/llo/config/config_test.go | 4 ++ .../ocr2/plugins/llo/integration_test.go | 6 +++ ...annel_definition_cache_integration_test.go | 2 + .../ocr2/plugins/median/config/config_test.go | 2 + .../plugins/mercury/config/config_test.go | 3 ++ .../ocr2/plugins/mercury/integration_test.go | 4 ++ .../ocr2/plugins/mercury/plugin_test.go | 2 + .../ocr2/plugins/ocr2keeper/config_test.go | 4 ++ .../ocr2keeper/evmregistry/v20/abi_test.go | 5 +++ .../evmregistry/v20/encoder_test.go | 2 + .../evmregistry/v20/registry_test.go | 3 ++ .../evmregistry/v21/active_list_test.go | 3 ++ .../autotelemetry21/custom_telemetry_test.go | 2 + .../evmregistry/v21/block_subscriber_test.go | 9 +++++ .../evmregistry/v21/core/payload_test.go | 3 ++ .../evmregistry/v21/core/trigger_test.go | 2 + .../evmregistry/v21/core/type_test.go | 2 + .../evmregistry/v21/core/utils_test.go | 2 + .../evmregistry/v21/encoding/encoder_test.go | 3 ++ .../evmregistry/v21/encoding/packer_test.go | 6 +++ .../evmregistry/v21/gasprice/gasprice_test.go | 2 + .../evmregistry/v21/keyring_test.go | 2 + .../v21/logprovider/block_time_test.go | 2 + .../v21/logprovider/buffer_v1_test.go | 10 +++++ .../v21/logprovider/filter_store_test.go | 4 ++ .../v21/logprovider/filter_test.go | 2 + .../v21/logprovider/integration_test.go | 5 +++ .../evmregistry/v21/logprovider/log_test.go | 2 + .../logprovider/provider_life_cycle_test.go | 4 ++ .../v21/logprovider/provider_test.go | 6 +++ .../v21/logprovider/recoverer_test.go | 9 +++++ .../evmregistry/v21/mercury/mercury_test.go | 8 ++++ .../v21/mercury/streams/streams_test.go | 5 +++ .../v21/mercury/v02/v02_request_test.go | 9 +++++ .../v21/mercury/v03/v03_request_test.go | 6 +++ .../evmregistry/v21/payload_builder_test.go | 2 + .../v21/registry_check_pipeline_test.go | 6 +++ .../evmregistry/v21/registry_test.go | 4 ++ .../evmregistry/v21/transmit/cache_test.go | 2 + .../evmregistry/v21/transmit/encoding_test.go | 2 + .../v21/transmit/event_provider_test.go | 3 ++ .../evmregistry/v21/upkeep_provider_test.go | 2 + .../evmregistry/v21/upkeepstate/orm_test.go | 2 + .../plugins/ocr2keeper/integration_21_test.go | 3 ++ .../plugins/ocr2keeper/integration_test.go | 2 + .../ocr2/plugins/promwrapper/plugin_test.go | 4 ++ core/services/ocr2/plugins/s4/factory_test.go | 3 ++ .../ocr2/plugins/s4/integration_test.go | 3 ++ .../threshold/decryption_queue_test.go | 24 ++++++++++++ .../ocr2/plugins/vault/disk_monitor_test.go | 3 ++ .../ocr2/plugins/vault/kvstore_test.go | 6 +++ core/services/ocr2/plugins/vault/orm_test.go | 9 +++++ .../ocr2/plugins/vault/plugin_test.go | 2 + core/services/ocr2/validate/validate_test.go | 4 ++ .../services/ocr3/promwrapper/factory_test.go | 2 + core/services/ocr3/promwrapper/plugin_test.go | 4 ++ core/services/ocrbootstrap/database_test.go | 2 + core/services/ocrbootstrap/validate_test.go | 2 + core/services/ocrcommon/adapters_test.go | 5 +++ core/services/ocrcommon/data_source_test.go | 6 +++ .../ocrcommon/discoverer_database_test.go | 2 + core/services/ocrcommon/run_saver_test.go | 2 + core/services/ocrcommon/telemetry_test.go | 18 +++++++++ core/services/p2p/counter_test.go | 3 ++ core/services/p2p/peer_test.go | 2 + core/services/p2p/shared_peer_test.go | 2 + core/services/p2p/signer_test.go | 2 + core/services/p2p/wrapper/wrapper_test.go | 2 + core/services/periodicbackup/backup_test.go | 7 ++++ core/services/pg/connection_test.go | 3 ++ core/services/pg/lease_lock_test.go | 2 + core/services/pg/locked_db_test.go | 7 ++++ core/services/pipeline/common_eth_test.go | 5 +++ core/services/pipeline/common_test.go | 12 ++++++ .../services/pipeline/eautils/eautils_test.go | 3 ++ core/services/pipeline/getters_test.go | 8 ++++ core/services/pipeline/graph_test.go | 6 +++ core/services/pipeline/keypath_test.go | 2 + core/services/pipeline/models_test.go | 4 ++ core/services/pipeline/orm_test.go | 2 + core/services/pipeline/scheduler_test.go | 3 ++ .../pipeline/task.eth_abi_decode_test.go | 2 + .../registrysyncer/local_registry_test.go | 2 + .../registrysyncer/monitoring_test.go | 3 ++ core/services/registrysyncer/orm_test.go | 2 + .../registrysyncer/v2/monitoring_test.go | 3 ++ .../services/registrysyncer/v2/syncer_test.go | 5 +++ core/services/relay/evm/ccip_test.go | 4 ++ core/services/relay/evm/config_poller_test.go | 2 + .../relay/evm/functions/config_poller_test.go | 2 + .../evm/functions/logpoller_wrapper_test.go | 8 ++++ .../relay/evm/mercury/config_digest_test.go | 2 + .../relay/evm/mercury/config_poller_test.go | 2 + .../relay/evm/mercury/utils/feeds_test.go | 3 ++ .../relay/evm/mercury/v2/data_source_test.go | 2 + .../v2/reportcodec/report_codec_test.go | 4 ++ .../relay/evm/mercury/v3/data_source_test.go | 2 + .../v3/reportcodec/report_codec_test.go | 4 ++ .../relay/evm/mercury/v4/data_source_test.go | 2 + .../v4/reportcodec/report_codec_test.go | 4 ++ .../evm/mercury/verifier/verifier_test.go | 2 + .../evm/mercury/wsrpc/cache/cache_set_test.go | 2 + .../evm/mercury/wsrpc/cache/cache_test.go | 2 + .../relay/evm/mercury/wsrpc/client_test.go | 3 ++ .../relay/evm/mercury/wsrpc/pool_test.go | 2 + .../relay/evm/read/batch_caller_test.go | 3 ++ core/services/relay/evm/read/bindings_test.go | 2 + core/services/relay/evm/read/event_test.go | 2 + .../relay/evm/read/multieventtype_test.go | 3 ++ core/services/s4/address_range_test.go | 6 +++ core/services/s4/cached_orm_wrapper_test.go | 2 + .../services/signatures/ethdss/ethdss_test.go | 6 +++ .../signatures/ethschnorr/ethschnorr_test.go | 4 ++ .../signatures/secp256k1/curve_test.go | 4 ++ .../signatures/secp256k1/field_test.go | 13 +++++++ .../signatures/secp256k1/point_test.go | 16 ++++++++ .../signatures/secp256k1/public_key_test.go | 4 ++ .../signatures/secp256k1/scalar_test.go | 17 +++++++++ .../signatures/secp256k1/suite_test.go | 3 ++ .../standardcapabilities/delegate_test.go | 2 + .../standard_capabilities_test.go | 2 + core/services/streams/delegate_test.go | 4 ++ core/services/streams/stream_registry_test.go | 3 ++ core/services/streams/stream_test.go | 2 + .../telemetry_ingress_batch_client_test.go | 2 + .../telemetry_ingress_batch_worker_test.go | 2 + .../telemetry_ingress_client_test.go | 3 ++ core/services/telemetry/chip_ingress_test.go | 6 +++ core/services/telemetry/ingress_batch_test.go | 2 + core/services/telemetry/ingress_test.go | 2 + core/services/telemetry/manager_test.go | 5 +++ core/services/versioning/orm_test.go | 2 + core/services/vrf/delegate_test.go | 2 + .../services/vrf/proof/proof_response_test.go | 2 + .../vrf_consumer_base_test.go | 2 + .../vrf_coordinator_interface_test.go | 2 + ...rf_coordinator_solidity_crosscheck_test.go | 7 ++++ .../vrf_fulfillment_cost_test.go | 3 ++ .../vrf_hash_to_curve_cost_test.go | 2 + .../vrf_randomness_output_cost_test.go | 2 + .../vrf_request_cost_test.go | 2 + .../vrf_solidity_crosscheck_test.go | 13 +++++++ .../vrf_v08_solidity_crosscheck_test.go | 14 +++++++ core/services/vrf/v1/integration_test.go | 3 ++ core/services/vrf/v1/listener_v1_test.go | 3 ++ .../vrf/v2/listener_v2_log_listener_test.go | 8 ++++ core/services/vrf/v2/listener_v2_test.go | 2 + .../services/vrf/vrfcommon/log_dedupe_test.go | 3 ++ core/services/vrf/vrfcommon/validate_test.go | 2 + core/services/webhook/authorizer_test.go | 2 + core/services/workflows/artifacts/orm_test.go | 3 ++ .../workflows/artifacts/v2/orm_test.go | 3 ++ .../cmd/cre/examples/compile_test.go | 2 + .../workflows/cmd/cre/utils/runner_test.go | 2 + core/services/workflows/delegate_test.go | 2 + core/services/workflows/engine_test.go | 24 ++++++++++++ core/services/workflows/events/emit_test.go | 3 ++ .../services/workflows/internal/retry_test.go | 7 ++++ .../workflows/metering/balance_store_test.go | 3 ++ .../workflows/metering/metering_test.go | 16 ++++++++ core/services/workflows/models_test.go | 3 ++ .../workflows/monitoring/monitoring_test.go | 3 ++ .../workflows/ratelimiter/ratelimiter_test.go | 2 + core/services/workflows/store/models_test.go | 2 + .../workflows/store/store_memory_test.go | 6 +++ .../workflows/syncer/engine_registry_test.go | 3 ++ .../services/workflows/syncer/fetcher_test.go | 3 ++ .../services/workflows/syncer/handler_test.go | 4 ++ .../syncer/v2/engine_registry_test.go | 2 + .../workflows/syncer/v2/fetcher_test.go | 3 ++ .../workflows/syncer/v2/handler_test.go | 3 ++ .../syncer/versioning/contracts_test.go | 5 +++ .../workflows/syncerlimiter/limiter_test.go | 2 + .../workflows/types/workflow_meta_test.go | 5 +++ core/services/workflows/v2/config_test.go | 2 + core/services/workflows/v2/engine_test.go | 16 ++++++++ core/services/workflows/v2/secrets_test.go | 7 ++++ core/sessions/ldapauth/ldap_test.go | 7 ++++ core/sessions/localauth/orm_test.go | 6 +++ core/sessions/oidcauth/oidc_test.go | 4 ++ core/sessions/user_test.go | 5 +++ core/sessions/webauthn_test.go | 2 + core/shutdown/shutdown_test.go | 2 + core/static/static_test.go | 3 ++ core/store/migrate/migrate_test.go | 7 ++++ core/store/models/common_test.go | 24 ++++++++++++ core/store/models/errors_test.go | 6 +++ core/utils/backoff_ticker_test.go | 8 ++++ core/utils/big_math/big_math_test.go | 5 +++ core/utils/collection_test.go | 3 ++ core/utils/crypto/private_key_test.go | 5 +++ core/utils/crypto/public_key_test.go | 7 ++++ core/utils/decimal_test.go | 3 ++ core/utils/deferable_write_closer_test.go | 3 ++ core/utils/eth_signatures_test.go | 6 +++ core/utils/files_test.go | 6 +++ core/utils/finite_ticker_test.go | 2 + core/utils/jwt_test.go | 13 +++++++ core/utils/password_test.go | 3 ++ core/utils/plainhex_test.go | 4 ++ core/utils/safe/safe_test.go | 4 ++ core/utils/safe_math_test.go | 2 + core/utils/stringutils/string_utils_test.go | 6 +++ core/utils/thread_control_test.go | 4 ++ core/utils/tomlutils/toml_test.go | 8 ++++ core/utils/utils_test.go | 23 ++++++++++++ core/web/api_test.go | 6 +++ core/web/aptos_keys_controller_test.go | 5 +++ core/web/auth/auth_test.go | 12 ++++++ core/web/auth/gql_test.go | 4 ++ core/web/bridge_types_controller_test.go | 11 ++++++ core/web/build_info_controller_test.go | 3 ++ core/web/capability_controller_test.go | 5 +++ core/web/chains_controller_test.go | 5 +++ core/web/cors_test.go | 3 ++ core/web/cosmos_keys_controller_test.go | 6 +++ .../web/dkg_recipient_keys_controller_test.go | 3 ++ core/web/eth_keys_controller_test.go | 20 ++++++++++ core/web/evm_forwarders_controller_test.go | 3 ++ core/web/evm_transactions_controller_test.go | 6 +++ core/web/evm_transfer_controller_test.go | 11 ++++++ core/web/evm_tx_attempts_controller_test.go | 4 ++ .../external_initiators_controller_test.go | 9 +++++ core/web/features_controller_test.go | 3 ++ core/web/gui_assets_test.go | 6 +++ core/web/health_controller_test.go | 4 ++ core/web/health_template_test.go | 3 ++ core/web/jobs_controller_test.go | 12 ++++++ core/web/lca_controller_test.go | 2 + core/web/loader/loader_test.go | 11 ++++++ core/web/log_controller_test.go | 3 ++ core/web/loop_registry_internal_test.go | 3 ++ core/web/loop_registry_test.go | 2 + core/web/ocr2_keys_controller_test.go | 6 +++ core/web/ocr_keys_controller_test.go | 6 +++ core/web/p2p_keys_controller_test.go | 7 ++++ core/web/ping_controller_test.go | 5 +++ ...ipeline_job_spec_errors_controller_test.go | 3 ++ core/web/pipeline_runs_controller_test.go | 8 ++++ core/web/presenters/bridges_test.go | 2 + core/web/presenters/chain_msg_test.go | 3 ++ core/web/presenters/csa_key_test.go | 2 + core/web/presenters/eth_key_test.go | 3 ++ core/web/presenters/eth_tx_test.go | 2 + core/web/presenters/evm_forwarder_test.go | 2 + core/web/presenters/job_test.go | 7 +++- core/web/presenters/node_test.go | 2 + core/web/presenters/p2p_key_test.go | 2 + core/web/presenters/user_test.go | 2 + core/web/resolver/api_token_test.go | 3 ++ core/web/resolver/aptos_key_test.go | 2 + core/web/resolver/bridge_test.go | 6 +++ core/web/resolver/chain_test.go | 3 ++ core/web/resolver/config_test.go | 2 + core/web/resolver/cosmos_key_test.go | 2 + core/web/resolver/csa_keys_test.go | 4 ++ core/web/resolver/eth_key_test.go | 2 + core/web/resolver/eth_transaction_test.go | 4 ++ core/web/resolver/features_test.go | 2 + .../feeds_manager_chain_config_test.go | 4 ++ core/web/resolver/feeds_manager_test.go | 7 ++++ core/web/resolver/job_error_test.go | 3 ++ core/web/resolver/job_proposal_spec_test.go | 6 +++ core/web/resolver/job_proposal_test.go | 2 + core/web/resolver/job_run_test.go | 4 ++ core/web/resolver/job_test.go | 5 +++ core/web/resolver/log_test.go | 5 +++ core/web/resolver/node_test.go | 3 ++ core/web/resolver/ocr2_keys_test.go | 4 ++ core/web/resolver/ocr_test.go | 4 ++ core/web/resolver/p2p_test.go | 4 ++ core/web/resolver/solana_key_test.go | 2 + core/web/resolver/spec_test.go | 16 ++++++++ core/web/resolver/starknet_key_test.go | 2 + core/web/resolver/sui_key_test.go | 2 + core/web/resolver/ton_key_test.go | 2 + core/web/resolver/tron_key_test.go | 2 + core/web/resolver/user_test.go | 2 + core/web/resolver/vrf_test.go | 5 +++ core/web/router_test.go | 9 +++++ core/web/sessions_controller_test.go | 6 +++ core/web/solana_keys_controller_test.go | 5 +++ core/web/starknet_keys_controller_test.go | 6 +++ core/web/sui_keys_controller_test.go | 5 +++ core/web/ton_keys_controller_test.go | 6 +++ core/web/tron_keys_controller_test.go | 6 +++ core/web/user_controller_test.go | 9 +++++ core/web/vault_controller_test.go | 6 +++ core/web/workflow_keys_controller_test.go | 3 ++ .../changeset/solana_v0_1_1/cs_ops_test.go | 3 +- .../solana/grant_role_timelock_test.go | 3 +- deployment/environment_test.go | 3 +- deployment/evm_kmsclient_test.go | 3 +- .../ccip/ccip_sui_token_transfer_test.go | 1 + plugins/cmd_test.go | 3 ++ plugins/env_test.go | 3 ++ plugins/loop_registry_test.go | 4 ++ plugins/medianpoc/data_source_test.go | 4 ++ plugins/medianpoc/plugin_test.go | 2 + tools/flakeytests/reporter_test.go | 8 ++++ tools/flakeytests/runner_test.go | 16 ++++++++ tools/flakeytests/utils_test.go | 4 ++ .../internal/updater/config_test.go | 5 +++ .../internal/updater/updater_test.go | 4 ++ tools/plugout/main_test.go | 27 +++++++++++++- 676 files changed, 3034 insertions(+), 20 deletions(-) diff --git a/core/bridges/bridge_type_test.go b/core/bridges/bridge_type_test.go index 344ff931db4..a1dfa030410 100644 --- a/core/bridges/bridge_type_test.go +++ b/core/bridges/bridge_type_test.go @@ -17,9 +17,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBridgeTypeRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") u, err := url.Parse("http://example.com/test") require.NoError(t, err) r := bridges.BridgeTypeRequest{ @@ -38,6 +40,7 @@ func TestBridgeTypeRequest(t *testing.T) { func TestBridgeType_Authenticate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") bta, bt := cltest.NewBridgeType(t, cltest.BridgeOpts{}) tests := []struct { @@ -84,6 +87,7 @@ func BenchmarkParseBridgeName(b *testing.B) { } func TestBridgeName_UnmarshalJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var b bridges.BridgeName require.NoError(t, json.Unmarshal([]byte(`"asdf123test"`), &b)) require.Equal(t, "asdf123test", b.String()) @@ -97,6 +101,7 @@ func TestBridgeName_UnmarshalJSON(t *testing.T) { func TestMarshalBridgeMetaData(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/bridges/cache_test.go b/core/bridges/cache_test.go index 4e88631f910..584e67e8f85 100644 --- a/core/bridges/cache_test.go +++ b/core/bridges/cache_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/bridges/mocks" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -17,6 +18,7 @@ import ( func TestBridgeCache_Type(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("loads bridge from data source - single", func(t *testing.T) { t.Parallel() @@ -130,6 +132,7 @@ func TestBridgeCache_Type(t *testing.T) { func TestBridgeCache_Response(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("loads response from data source", func(t *testing.T) { t.Parallel() diff --git a/core/bridges/external_initiator_test.go b/core/bridges/external_initiator_test.go index 9f59c8e0030..f2818b3ba41 100644 --- a/core/bridges/external_initiator_test.go +++ b/core/bridges/external_initiator_test.go @@ -11,9 +11,11 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNewExternalInitiator(t *testing.T) { + tests.BelongsToCISuite(t, "unit") eia := auth.NewToken() assert.Len(t, eia.AccessKey, 32) assert.Len(t, eia.Secret, 64) @@ -31,6 +33,7 @@ func TestNewExternalInitiator(t *testing.T) { } func TestAuthenticateExternalInitiator(t *testing.T) { + tests.BelongsToCISuite(t, "unit") eia := auth.NewToken() ok, err := bridges.AuthenticateExternalInitiator(eia, &bridges.ExternalInitiator{ Salt: "salt", diff --git a/core/bridges/orm_test.go b/core/bridges/orm_test.go index 2ef6807f841..6cee259b8c2 100644 --- a/core/bridges/orm_test.go +++ b/core/bridges/orm_test.go @@ -11,6 +11,7 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -32,6 +33,7 @@ func setupORM(t *testing.T) (*sqlx.DB, bridges.ORM) { func TestORM_FindBridges(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, orm := setupORM(t) bt := bridges.BridgeType{ @@ -69,6 +71,7 @@ func TestORM_FindBridges(t *testing.T) { func TestORM_FindBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -104,6 +107,7 @@ func TestORM_FindBridge(t *testing.T) { } } func TestORM_UpdateBridgeType(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) diff --git a/core/capabilities/ccip/ccip_integration_tests/home_chain_test.go b/core/capabilities/ccip/ccip_integration_tests/home_chain_test.go index c81e001e9d2..7cc52acc070 100644 --- a/core/capabilities/ccip/ccip_integration_tests/home_chain_test.go +++ b/core/capabilities/ccip/ccip_integration_tests/home_chain_test.go @@ -19,10 +19,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestHomeChainReader_ChainConfigs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.Test(t) uni := integrationhelpers.NewTestUniverse(ctx, t, lggr) diff --git a/core/capabilities/ccip/ccip_integration_tests/rmn/rmn_home_test.go b/core/capabilities/ccip/ccip_integration_tests/rmn/rmn_home_test.go index ba19bd70f9b..b3f75825e7a 100644 --- a/core/capabilities/ccip/ccip_integration_tests/rmn/rmn_home_test.go +++ b/core/capabilities/ccip/ccip_integration_tests/rmn/rmn_home_test.go @@ -19,11 +19,13 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_home" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccip_integration_tests/integrationhelpers" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestRMNHomeReader_GetRMNNodesInfo(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.Test(t) uni := integrationhelpers.NewTestUniverse(ctx, t, lggr) diff --git a/core/capabilities/ccip/ccip_integration_tests/usdcreader/usdcreader_test.go b/core/capabilities/ccip/ccip_integration_tests/usdcreader/usdcreader_test.go index 659838b281b..cc1c1df2b09 100644 --- a/core/capabilities/ccip/ccip_integration_tests/usdcreader/usdcreader_test.go +++ b/core/capabilities/ccip/ccip_integration_tests/usdcreader/usdcreader_test.go @@ -31,6 +31,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-ccip/pluginconfig" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client" "github.com/smartcontractkit/chainlink-evm/pkg/heads/headstest" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" @@ -46,6 +47,7 @@ import ( const ChainID = 1337 func Test_USDCReader_MessageHashes(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") finalityDepth := 5 ctx := testutils.Context(t) diff --git a/core/capabilities/ccip/ccipaptos/addresscodec_test.go b/core/capabilities/ccip/ccipaptos/addresscodec_test.go index 18fc28f1449..79813a617ce 100644 --- a/core/capabilities/ccip/ccipaptos/addresscodec_test.go +++ b/core/capabilities/ccip/ccipaptos/addresscodec_test.go @@ -8,6 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func generateAddressBytes32() [32]byte { @@ -34,6 +36,7 @@ func generateAddressString() string { } func TestAddressBytesToString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string inHex string @@ -85,6 +88,7 @@ func TestAddressBytesToString(t *testing.T) { } func TestAddressStringToBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string in string diff --git a/core/capabilities/ccip/ccipaptos/commitcodec_test.go b/core/capabilities/ccip/ccipaptos/commitcodec_test.go index 3b3d370213d..98fa37addce 100644 --- a/core/capabilities/ccip/ccipaptos/commitcodec_test.go +++ b/core/capabilities/ccip/ccipaptos/commitcodec_test.go @@ -12,6 +12,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ) @@ -78,6 +79,7 @@ var randomCommitReport = func() cciptypes.CommitPluginReport { } func TestCommitPluginCodecV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string report func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport @@ -142,6 +144,7 @@ func TestCommitPluginCodecV1(t *testing.T) { // Go equivalent of test_deserialize_commit_report // https://github.com/smartcontractkit/chainlink-aptos/blob/cb70d13f90d16ea7fea7f0f52f02fbebc38d16a9/contracts/ccip/ccip_offramp/tests/offramp_test.move#L525 func TestCommitPluginCodecV1_Decode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expectedSourceToken := "0x000000000000000000000000000000000000000000000000000000000000000a" expectedUsdPerToken, ok := new(big.Int).SetString("500000000000000000000", 10) require.True(t, ok) diff --git a/core/capabilities/ccip/ccipaptos/executecodec_test.go b/core/capabilities/ccip/ccipaptos/executecodec_test.go index 8653cd12c63..5ce3ed8c276 100644 --- a/core/capabilities/ccip/ccipaptos/executecodec_test.go +++ b/core/capabilities/ccip/ccipaptos/executecodec_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common/mocks" ) @@ -92,6 +93,7 @@ var randomExecuteReport = func(t *testing.T, chainSelector uint64, gasLimit *big } func TestExecutePluginCodecV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() mockExtraDataCodec := &mocks.SourceChainExtraDataCodec{} destGasAmount := rand.Uint32() @@ -195,6 +197,7 @@ func TestExecutePluginCodecV1(t *testing.T) { // Go equivalent of test_deserialize_execution_report // https://github.com/smartcontractkit/chainlink-aptos/blob/4a9525abbbc024af87ed6277c57dcf8aa58dd268/contracts/ccip/ccip_offramp/tests/offramp_test.move#L453 func TestExecutePluginCodecV1_Decode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expectedSender, err := hexutil.Decode("0xd87929a32cf0cbdc9e2d07ffc7c33344079de727") require.NoError(t, err) expectedData, err := hexutil.Decode("0x68656c6c6f20434349505265636569766572") // "hello CCIPReceiver" diff --git a/core/capabilities/ccip/ccipaptos/extradatadecoder_test.go b/core/capabilities/ccip/ccipaptos/extradatadecoder_test.go index 42b9cabe835..356bbd9d71b 100644 --- a/core/capabilities/ccip/ccipaptos/extradatadecoder_test.go +++ b/core/capabilities/ccip/ccipaptos/extradatadecoder_test.go @@ -8,9 +8,12 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/holiman/uint256" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_decodeExtraData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") extraDataDecoder := &ExtraDataDecoder{} t.Run("decode extra args into map evm v1", func(t *testing.T) { diff --git a/core/capabilities/ccip/ccipaptos/msghasher_test.go b/core/capabilities/ccip/ccipaptos/msghasher_test.go index fa06a9fb2b7..8a9ed3ac795 100644 --- a/core/capabilities/ccip/ccipaptos/msghasher_test.go +++ b/core/capabilities/ccip/ccipaptos/msghasher_test.go @@ -6,10 +6,13 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // the equivalent test with the same values exists in the Aptos offramp.move contract, see test_calculate_message_hash func TestComputeMessageDataHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expectedHashStr := "0xc8d6cf666864a60dd6ecd89e5c294734c53b3218d3f83d2d19a3c3f9e200e00d" metadataHashBytes, err := hexutil.Decode("0xaabbccddeeff00112233445566778899aabbccddeeff00112233445566778899") @@ -76,6 +79,7 @@ func TestComputeMessageDataHash(t *testing.T) { // the equivalent test with the same values exists in the Aptos offramp.move contract, see test_calculate_metadata_hash func TestComputeMetadataHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expectedHashStr := "0x812acb01df318f85be452cf6664891cf5481a69dac01e0df67102a295218dd17" expectedHashAlternateStr := "0x6caf8756ae02ee4f12b83b38e0f21b5e43e90d203bd06729486fd4a0fc8bcc5e" diff --git a/core/capabilities/ccip/ccipevm/addresscodec_test.go b/core/capabilities/ccip/ccipevm/addresscodec_test.go index f8daec603f1..062212af15f 100644 --- a/core/capabilities/ccip/ccipevm/addresscodec_test.go +++ b/core/capabilities/ccip/ccipevm/addresscodec_test.go @@ -5,9 +5,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestAddressBytesToString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addressCodec := AddressCodec{} addr := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13} want := "0x000102030405060708090a0b0c0d0e0f10111213" @@ -17,6 +20,7 @@ func TestAddressBytesToString(t *testing.T) { } func TestAddressStringToBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addressCodec := AddressCodec{} addr := "0x000102030405060708090a0b0c0d0e0f10111213" want := []byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13} @@ -34,6 +38,7 @@ func TestAddressStringToBytes(t *testing.T) { // } func TestInvalidAddressStringToBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addressCodec := AddressCodec{} addr := "0x000102030405060708090a0b0c0d0e0f1011121" _, err := addressCodec.AddressStringToBytes(addr) @@ -41,6 +46,7 @@ func TestInvalidAddressStringToBytes(t *testing.T) { } func TestValidEVMAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addressCodec := AddressCodec{} addr := []byte{0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef} want := "0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF" @@ -50,6 +56,7 @@ func TestValidEVMAddress(t *testing.T) { } func TestInvalidHexString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addressCodec := AddressCodec{} addr := "0xZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ" _, err := addressCodec.AddressStringToBytes(addr) @@ -57,6 +64,7 @@ func TestInvalidHexString(t *testing.T) { } func TestAddressCodec_OracleIDAsAddressBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") codec := AddressCodec{} testCases := []struct { diff --git a/core/capabilities/ccip/ccipevm/commitcodec_test.go b/core/capabilities/ccip/ccipevm/commitcodec_test.go index 6c969bb33d2..fe2aa28a993 100644 --- a/core/capabilities/ccip/ccipevm/commitcodec_test.go +++ b/core/capabilities/ccip/ccipevm/commitcodec_test.go @@ -11,6 +11,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) @@ -78,6 +79,7 @@ var randomCommitReport = func() cciptypes.CommitPluginReport { } func TestCommitPluginCodecV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string report func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport diff --git a/core/capabilities/ccip/ccipevm/executecodec_test.go b/core/capabilities/ccip/ccipevm/executecodec_test.go index 50553c18838..e889442ff6b 100644 --- a/core/capabilities/ccip/ccipevm/executecodec_test.go +++ b/core/capabilities/ccip/ccipevm/executecodec_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/report_codec" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" evmtestutils "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -97,6 +98,7 @@ var randomExecuteReport = func(t *testing.T, d *testSetupData, chainSelector uin } func TestExecutePluginCodecV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") d := testSetup(t) ctx := testutils.Context(t) mockExtraDataCodec := mocks.NewSourceChainExtraDataCodec(t) @@ -231,6 +233,7 @@ func TestExecutePluginCodecV1(t *testing.T) { } func Test_DecodeReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") offRampABI, err := offramp.OffRampMetaData.GetAbi() require.NoError(t, err) diff --git a/core/capabilities/ccip/ccipevm/extradatacodec_test.go b/core/capabilities/ccip/ccipevm/extradatacodec_test.go index 64b7a494475..51ceec230d0 100644 --- a/core/capabilities/ccip/ccipevm/extradatacodec_test.go +++ b/core/capabilities/ccip/ccipevm/extradatacodec_test.go @@ -10,9 +10,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/message_hasher" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_decodeExtraData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") d := testSetup(t) gasLimit := big.NewInt(rand.Int63()) extraDataDecoder := &ExtraDataDecoder{} @@ -67,6 +69,7 @@ func Test_decodeExtraData(t *testing.T) { } func TestExtraDataDecoder_DecodeExtraArgsToMap_SVMDestination(t *testing.T) { + tests.BelongsToCISuite(t, "unit") d := testSetup(t) extraDataDecoder := &ExtraDataDecoder{} diff --git a/core/capabilities/ccip/ccipevm/gas_helpers_test.go b/core/capabilities/ccip/ccipevm/gas_helpers_test.go index 9410d9a969d..b9454af70a3 100644 --- a/core/capabilities/ccip/ccipevm/gas_helpers_test.go +++ b/core/capabilities/ccip/ccipevm/gas_helpers_test.go @@ -10,9 +10,11 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/message_hasher" "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_calculateMessageMaxGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { dataLen int numTokens int @@ -91,6 +93,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { // TestCalculateMaxGas is taken from the ccip repo where the CalculateMerkleTreeGas and CalculateMessageMaxGas values // are combined to one function. func TestCalculateMaxGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string numRequests int diff --git a/core/capabilities/ccip/ccipevm/helpers_test.go b/core/capabilities/ccip/ccipevm/helpers_test.go index f42deb71310..490f63676cd 100644 --- a/core/capabilities/ccip/ccipevm/helpers_test.go +++ b/core/capabilities/ccip/ccipevm/helpers_test.go @@ -8,9 +8,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/message_hasher" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_decodeExtraArgs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") d := testSetup(t) gasLimit := big.NewInt(rand.Int63()) extraDataDecoder := &ExtraDataDecoder{} diff --git a/core/capabilities/ccip/ccipevm/msghasher_test.go b/core/capabilities/ccip/ccipevm/msghasher_test.go index 5240a6e4ac7..88d5059333d 100644 --- a/core/capabilities/ccip/ccipevm/msghasher_test.go +++ b/core/capabilities/ccip/ccipevm/msghasher_test.go @@ -30,6 +30,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" evmtestutils "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -48,6 +49,7 @@ var extraDataCodec = ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainE // NOTE: these test cases are only EVM <-> EVM. // Update these cases once we have non-EVM examples. func TestMessageHasher_EVM2EVM(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) d := testSetup(t) @@ -221,6 +223,7 @@ func testSetup(t *testing.T) *testSetupData { } func TestMessagerHasher_againstRmnSharedVector(t *testing.T) { + tests.BelongsToCISuite(t, "unit") transactor := evmtestutils.MustNewSimTransactor(t) backend := backends.NewSimulatedBackend(types.GenesisAlloc{ transactor.From: {Balance: assets.Ether(1000).ToInt()}, diff --git a/core/capabilities/ccip/ccipevm/rmncrypto_test.go b/core/capabilities/ccip/ccipevm/rmncrypto_test.go index f5822b3cc07..966884a4847 100644 --- a/core/capabilities/ccip/ccipevm/rmncrypto_test.go +++ b/core/capabilities/ccip/ccipevm/rmncrypto_test.go @@ -11,11 +11,12 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_VerifyRmnReportSignatures(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // NOTE: The following test data (public keys, signatures, ...) are shared from the RMN team. - onchainRmnRemoteAddr := common.HexToAddress("0x7821bcd6944457d17c631157efeb0c621baa76eb") rmnHomeContractConfigDigestHex := "0x785936570d1c7422ef30b7da5555ad2f175fa2dd97a2429a2e71d1e07c94e060" diff --git a/core/capabilities/ccip/ccipevm/tokendata_test.go b/core/capabilities/ccip/ccipevm/tokendata_test.go index f2e28cabc3f..11edf002d40 100644 --- a/core/capabilities/ccip/ccipevm/tokendata_test.go +++ b/core/capabilities/ccip/ccipevm/tokendata_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" ) func Test_EVMTokenDataEncoder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var empty usdcAttestationPayload encoder := NewEVMTokenDataEncoder() diff --git a/core/capabilities/ccip/ccipsolana/addresscodec_test.go b/core/capabilities/ccip/ccipsolana/addresscodec_test.go index a9419292543..b7d2de862e0 100644 --- a/core/capabilities/ccip/ccipsolana/addresscodec_test.go +++ b/core/capabilities/ccip/ccipsolana/addresscodec_test.go @@ -8,9 +8,12 @@ import ( "github.com/gagliardetto/solana-go" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPublicKeyFromBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string inHex string @@ -62,6 +65,7 @@ func TestPublicKeyFromBytes(t *testing.T) { } func TestPublicKeyFromBase58(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string in string @@ -97,6 +101,7 @@ func TestPublicKeyFromBase58(t *testing.T) { } func TestAddressCodec_OracleIDAsAddressBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") codec := AddressCodec{} testCases := []struct { diff --git a/core/capabilities/ccip/ccipsolana/commitcodec_test.go b/core/capabilities/ccip/ccipsolana/commitcodec_test.go index 2ad136c5139..502fe48e554 100644 --- a/core/capabilities/ccip/ccipsolana/commitcodec_test.go +++ b/core/capabilities/ccip/ccipsolana/commitcodec_test.go @@ -17,6 +17,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) @@ -58,6 +59,7 @@ var randomBlessedCommitReport = func() cciptypes.CommitPluginReport { } func TestCommitPluginCodecV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string report func(report cciptypes.CommitPluginReport) cciptypes.CommitPluginReport @@ -199,6 +201,7 @@ func BenchmarkCommitPluginCodecV1_Encode_Decode(b *testing.B) { } func Test_DecodingCommitReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("decode on-chain commit report", func(t *testing.T) { chainSel := cciptypes.ChainSelector(rand.Uint64()) minSeqNr := rand.Uint64() diff --git a/core/capabilities/ccip/ccipsolana/executecodec_test.go b/core/capabilities/ccip/ccipsolana/executecodec_test.go index 51268fb275e..fbec4df341f 100644 --- a/core/capabilities/ccip/ccipsolana/executecodec_test.go +++ b/core/capabilities/ccip/ccipsolana/executecodec_test.go @@ -23,6 +23,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var randomExecuteReport = func(t *testing.T, sourceChainSelector uint64) ccipocr3.ExecutePluginReport { @@ -103,6 +105,7 @@ var randomExecuteReport = func(t *testing.T, sourceChainSelector uint64) ccipocr } func TestExecutePluginCodecV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string report func(report ccipocr3.ExecutePluginReport) ccipocr3.ExecutePluginReport @@ -215,6 +218,7 @@ func TestExecutePluginCodecV1(t *testing.T) { } func Test_DecodingExecuteReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockExtraDataCodec := mocks.NewSourceChainExtraDataCodec(t) mockExtraDataCodec.On("DecodeDestExecDataToMap", mock.Anything, mock.Anything).Return(map[string]any{ "destGasAmount": uint32(10), diff --git a/core/capabilities/ccip/ccipsolana/extradatacodec_test.go b/core/capabilities/ccip/ccipsolana/extradatacodec_test.go index cdad6b92aeb..cc1077fefb2 100644 --- a/core/capabilities/ccip/ccipsolana/extradatacodec_test.go +++ b/core/capabilities/ccip/ccipsolana/extradatacodec_test.go @@ -12,9 +12,11 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/solana/contracts/tests/config" "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/latest/fee_quoter" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_decodeExtraArgs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") extraDataDecoder := &ExtraDataDecoder{} t.Run("decode dest exec data into map svm", func(t *testing.T) { destGasAmount := uint32(10000) diff --git a/core/capabilities/ccip/ccipsolana/gas_helpers_test.go b/core/capabilities/ccip/ccipsolana/gas_helpers_test.go index 807bb3d8c80..148387c350e 100644 --- a/core/capabilities/ccip/ccipsolana/gas_helpers_test.go +++ b/core/capabilities/ccip/ccipsolana/gas_helpers_test.go @@ -11,9 +11,11 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/latest/fee_quoter" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_calculateMessageMaxGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { dataLen int numTokens int @@ -71,6 +73,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { // TestCalculateMaxGas is taken from the ccip repo where the CalculateMerkleTreeGas and CalculateMessageMaxGas values // are combined to one function. func TestCalculateMaxGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string numRequests int diff --git a/core/capabilities/ccip/ccipsolana/msghasher_test.go b/core/capabilities/ccip/ccipsolana/msghasher_test.go index 9a30c4d0b93..d7a80503cff 100644 --- a/core/capabilities/ccip/ccipsolana/msghasher_test.go +++ b/core/capabilities/ccip/ccipsolana/msghasher_test.go @@ -19,6 +19,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipaptos" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" @@ -27,6 +28,7 @@ import ( ) func TestMessageHasher_EVM2SVM(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registeredExtraDataCodecMap := map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyAptos: ccipaptos.ExtraDataDecoder{}, chainsel.FamilyEVM: ccipevm.ExtraDataDecoder{}, @@ -44,6 +46,7 @@ func TestMessageHasher_EVM2SVM(t *testing.T) { } func TestMessageHasher_InvalidReceiver(t *testing.T) { + tests.BelongsToCISuite(t, "unit") any2AnyMsg, _, _ := createEVM2SolanaMessages(t) // Set receiver to a []byte of 2 length @@ -74,6 +77,7 @@ func TestMessageHasher_InvalidReceiver(t *testing.T) { } func TestMessageHasher_InvalidDestinationTokenAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") any2AnyMsg, _, _ := createEVM2SolanaMessages(t) // Set DestTokenAddress to a []byte of 2 length @@ -196,6 +200,7 @@ func abiEncodeUint32(data uint32) ([]byte, error) { } func TestToLittleEndian(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mustSetString := func(s string) *big.Int { b, ok := big.NewInt(0).SetString(s, 10) if !ok { diff --git a/core/capabilities/ccip/common/common_test.go b/core/capabilities/ccip/common/common_test.go index b490009ff95..c96bf75551c 100644 --- a/core/capabilities/ccip/common/common_test.go +++ b/core/capabilities/ccip/common/common_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" kcr "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" @@ -15,6 +16,7 @@ import ( ) func Test_HashedCapabilityId(t *testing.T) { + tests.BelongsToCISuite(t, "unit") transactor := testutils.MustNewSimTransactor(t) sb := backends.NewSimulatedBackend(core.GenesisAlloc{ transactor.From: {Balance: assets.Ether(1000).ToInt()}, diff --git a/core/capabilities/ccip/configs/evm/chain_writer_test.go b/core/capabilities/ccip/configs/evm/chain_writer_test.go index a8851ab6e48..96fadf95fcb 100644 --- a/core/capabilities/ccip/configs/evm/chain_writer_test.go +++ b/core/capabilities/ccip/configs/evm/chain_writer_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/smartcontractkit/chainlink-ccip/pkg/consts" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/configs/evm" ) func TestChainWriterConfigRaw(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string fromAddress common.Address diff --git a/core/capabilities/ccip/configs/evm/init_test.go b/core/capabilities/ccip/configs/evm/init_test.go index 010592b6dc9..30865c88020 100644 --- a/core/capabilities/ccip/configs/evm/init_test.go +++ b/core/capabilities/ccip/configs/evm/init_test.go @@ -2,9 +2,12 @@ package evm import ( "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Config is created during initialization, the following functions may panic: // MustGetABI // mustGetMethodName diff --git a/core/capabilities/ccip/configs/solana/chain_writer_test.go b/core/capabilities/ccip/configs/solana/chain_writer_test.go index 7167c6aa4ec..67a8c83d6ce 100644 --- a/core/capabilities/ccip/configs/solana/chain_writer_test.go +++ b/core/capabilities/ccip/configs/solana/chain_writer_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-solana/pkg/solana/chainwriter" ) func TestChainWriterConfigRaw(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string fromAddress string diff --git a/core/capabilities/ccip/configs/solana/contract_reader_test.go b/core/capabilities/ccip/configs/solana/contract_reader_test.go index f4e343f07f4..2ffa9f51768 100644 --- a/core/capabilities/ccip/configs/solana/contract_reader_test.go +++ b/core/capabilities/ccip/configs/solana/contract_reader_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" ) func TestContractReaderConfigRaw(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cfg, err := DestContractReaderConfig() require.NoError(t, err) diff --git a/core/capabilities/ccip/launcher/deployment_test.go b/core/capabilities/ccip/launcher/deployment_test.go index 0ceb1d822b3..daa040abec1 100644 --- a/core/capabilities/ccip/launcher/deployment_test.go +++ b/core/capabilities/ccip/launcher/deployment_test.go @@ -8,11 +8,13 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" mocktypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types/mocks" ) func Test_ccipDeployment_Transitions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // we use a pointer to the oracle here for mock assertions type args struct { prevDeployment map[ocrtypes.ConfigDigest]*mocktypes.CCIPOracle diff --git a/core/capabilities/ccip/launcher/diff_test.go b/core/capabilities/ccip/launcher/diff_test.go index 37c4a229580..5cc815188ea 100644 --- a/core/capabilities/ccip/launcher/diff_test.go +++ b/core/capabilities/ccip/launcher/diff_test.go @@ -9,12 +9,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" ) func Test_diff(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { capabilityID string oldState registrysyncer.LocalRegistry @@ -116,6 +118,7 @@ func Test_diff(t *testing.T) { } func Test_compareDONs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { currCCIPDONs map[registrysyncer.DonID]registrysyncer.DON newCCIPDONs map[registrysyncer.DonID]registrysyncer.DON @@ -198,6 +201,7 @@ func Test_compareDONs(t *testing.T) { } func Test_filterCCIPDONs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { ccipCapability registrysyncer.Capability state registrysyncer.LocalRegistry @@ -278,6 +282,7 @@ func Test_filterCCIPDONs(t *testing.T) { } func Test_checkCapabilityPresence(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { capabilityID string state registrysyncer.LocalRegistry @@ -330,6 +335,7 @@ func Test_checkCapabilityPresence(t *testing.T) { } func Test_isMemberOfDON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var p2pIDs []ragep2ptypes.PeerID for i := range [4]struct{}{} { p2pIDs = append(p2pIDs, ragep2ptypes.PeerID(p2pkey.MustNewV2XXXTestingOnly(big.NewInt(int64(i+1))).PeerID())) diff --git a/core/capabilities/ccip/launcher/integration_test.go b/core/capabilities/ccip/launcher/integration_test.go index fdbde544fbd..66287ffd582 100644 --- a/core/capabilities/ccip/launcher/integration_test.go +++ b/core/capabilities/ccip/launcher/integration_test.go @@ -18,11 +18,13 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" ) func TestIntegration_Launcher(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.Test(t) uni := it.NewTestUniverse(ctx, t, lggr) diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go index 811a9965d8b..d1072969a3f 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go @@ -28,6 +28,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/client" evmconfig "github.com/smartcontractkit/chainlink-evm/pkg/config" @@ -56,6 +57,7 @@ import ( ) func Test_ContractTransmitter_TransmitWithoutSignatures(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") type testCase struct { name string pluginType uint8 diff --git a/core/capabilities/ccip/oraclecreator/bootstrap_test.go b/core/capabilities/ccip/oraclecreator/bootstrap_test.go index 4a31b10a3d6..2491cc81d72 100644 --- a/core/capabilities/ccip/oraclecreator/bootstrap_test.go +++ b/core/capabilities/ccip/oraclecreator/bootstrap_test.go @@ -10,9 +10,11 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestCalculateSyncActions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string currentDigests []cciptypes.Bytes32 diff --git a/core/capabilities/ccip/oraclecreator/create_test.go b/core/capabilities/ccip/oraclecreator/create_test.go index c36c3b56448..aac8a767a09 100644 --- a/core/capabilities/ccip/oraclecreator/create_test.go +++ b/core/capabilities/ccip/oraclecreator/create_test.go @@ -23,6 +23,7 @@ import ( ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common" cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types/mocks" @@ -37,6 +38,7 @@ import ( // before any heavy initialisation takes place. func TestPluginOracleCreatorCreate_InvalidSelector(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) @@ -85,6 +87,7 @@ func TestPluginOracleCreatorCreate_InvalidSelector(t *testing.T) { // has not been started – this guards a critical control-flow condition. func TestCreateFactoryAndTransmitter_PeerWrapperNotStarted(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) @@ -125,6 +128,7 @@ func TestCreateFactoryAndTransmitter_PeerWrapperNotStarted(t *testing.T) { // is created when destChainWriter is nil for both commit and execute plugin types. func TestCreateFactoryAndTransmitter_NilDestChainWriter(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) p2pk := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) diff --git a/core/capabilities/ccip/oraclecreator/plugin_test.go b/core/capabilities/ccip/oraclecreator/plugin_test.go index 83360b0299e..ae30a75df24 100644 --- a/core/capabilities/ccip/oraclecreator/plugin_test.go +++ b/core/capabilities/ccip/oraclecreator/plugin_test.go @@ -14,11 +14,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" ) func TestPluginTypeToTelemetryType(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string pluginType types.PluginType @@ -59,6 +61,7 @@ func TestPluginTypeToTelemetryType(t *testing.T) { } func TestPluginOracleCreator_getTransmitterFromPublicConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) poc := &pluginOracleCreator{p2pID: key} @@ -129,6 +132,7 @@ func TestPluginOracleCreator_getTransmitterFromPublicConfig(t *testing.T) { // Sanity-check that these parameters are not accidentally changed without breaking CI func Test_defaultLocalConfigProperties(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lc := defaultLocalConfig() assert.Equal(t, 30*time.Second, lc.DefaultMaxDurationInitialization) diff --git a/core/capabilities/ccip/oraclecreator/wrapped_oracle_test.go b/core/capabilities/ccip/oraclecreator/wrapped_oracle_test.go index 062ed8d56c8..4971f18f8a6 100644 --- a/core/capabilities/ccip/oraclecreator/wrapped_oracle_test.go +++ b/core/capabilities/ccip/oraclecreator/wrapped_oracle_test.go @@ -6,9 +6,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_wrappedOracle_Close(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string oracleErr error diff --git a/core/capabilities/ccip/validate/validate_test.go b/core/capabilities/ccip/validate/validate_test.go index 97958f4cf9d..13fe309b609 100644 --- a/core/capabilities/ccip/validate/validate_test.go +++ b/core/capabilities/ccip/validate/validate_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestNewCCIPSpecToml(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string specArgs validate.SpecArgs @@ -33,6 +35,7 @@ func TestNewCCIPSpecToml(t *testing.T) { } func TestValidatedCCIPSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { tomlString string } diff --git a/core/capabilities/compute/cache_test.go b/core/capabilities/compute/cache_test.go index 1b59553ce28..abe20126e15 100644 --- a/core/capabilities/compute/cache_test.go +++ b/core/capabilities/compute/cache_test.go @@ -65,6 +65,7 @@ func TestCache(t *testing.T) { // Verify that an expired module is not evicted because evictAfterSize is 1 func TestCache_EvictAfterSize(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") clock := clockwork.NewFakeClock() tick := 1 * time.Second timeout := 1 * time.Second diff --git a/core/capabilities/compute/compute_test.go b/core/capabilities/compute/compute_test.go index 2d5da9df504..3680256ce05 100644 --- a/core/capabilities/compute/compute_test.go +++ b/core/capabilities/compute/compute_test.go @@ -24,6 +24,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/metering" "github.com/smartcontractkit/chainlink-protos/cre/go/values" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/capabilities/webapi" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/wasmtest" @@ -92,6 +93,7 @@ func setup(t *testing.T, config Config) testHarness { } func TestComputeStartAddsToRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t, defaultConfig) require.NoError(t, th.compute.Start(t.Context())) @@ -107,6 +109,7 @@ func TestComputeStartAddsToRegistry(t *testing.T) { func TestComputeExecuteMissingConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") th := setup(t, defaultConfig) require.NoError(t, th.compute.Start(t.Context())) @@ -128,6 +131,7 @@ func TestComputeExecuteMissingConfig(t *testing.T) { } func TestComputeExecuteMissingBinary(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t, defaultConfig) require.NoError(t, th.compute.Start(t.Context())) @@ -149,6 +153,7 @@ func TestComputeExecuteMissingBinary(t *testing.T) { func TestComputeExecute(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") th := setup(t, defaultConfig) require.NoError(t, th.compute.Start(t.Context())) @@ -208,6 +213,7 @@ func TestComputeExecute(t *testing.T) { func TestComputeFetch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") workflowID := "15c631d295ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0" workflowExecutionID := "95ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0abbadeed" th := setup(t, defaultConfig) @@ -299,6 +305,7 @@ func TestComputeFetch(t *testing.T) { func TestCompute_SpendValueRelativeToComputeTime(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // because we are using ms precision and test overhead can result in variance, we use a range of 400ms // to apply assertions. @@ -383,6 +390,7 @@ func TestCompute_SpendValueRelativeToComputeTime(t *testing.T) { func TestComputeFetchMaxResponseSizeBytes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") workflowID := "15c631d295ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0" workflowExecutionID := "95ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0abbadeed" diff --git a/core/capabilities/compute/transformer_test.go b/core/capabilities/compute/transformer_test.go index 295ad9f043e..d5fb18bbf00 100644 --- a/core/capabilities/compute/transformer_test.go +++ b/core/capabilities/compute/transformer_test.go @@ -12,14 +12,18 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_NotFoundError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nfe := NewNotFoundError("test") assert.Equal(t, "could not find \"test\" in map", nfe.Error()) } func Test_popValue(t *testing.T) { + tests.BelongsToCISuite(t, "unit") m, err := values.NewMap( map[string]any{ "test": "value", @@ -51,6 +55,7 @@ func Test_popValue(t *testing.T) { } func Test_popOptionalValue(t *testing.T) { + tests.BelongsToCISuite(t, "unit") m, err := values.NewMap( map[string]any{ "test": "value", @@ -83,6 +88,7 @@ func Test_popOptionalValue(t *testing.T) { } func Test_transformer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( lgger = logger.Test(t) emitter = custmsg.NewLabeler() diff --git a/core/capabilities/don_notifier_test.go b/core/capabilities/don_notifier_test.go index cf9d204a6d3..560e9b73fec 100644 --- a/core/capabilities/don_notifier_test.go +++ b/core/capabilities/don_notifier_test.go @@ -11,10 +11,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" ) func TestDonNotifier_WaitForDon(t *testing.T) { + tests.BelongsToCISuite(t, "unit") notifier := capabilities.NewDonNotifier() don := commoncap.DON{ ID: 1, @@ -45,6 +47,7 @@ func TestDonNotifier_WaitForDon(t *testing.T) { } func TestDonNotifier_WaitForDon_ContextTimeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") notifier := capabilities.NewDonNotifier() ctx, cancel := context.WithCancel(context.Background()) @@ -56,6 +59,7 @@ func TestDonNotifier_WaitForDon_ContextTimeout(t *testing.T) { } func TestDonNotifier_DonUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") notifier := capabilities.NewDonNotifier() notifyChs := []chan struct{}{ make(chan struct{}), diff --git a/core/capabilities/encoder_factory_test.go b/core/capabilities/encoder_factory_test.go index 93509d94338..0ad89503bd9 100644 --- a/core/capabilities/encoder_factory_test.go +++ b/core/capabilities/encoder_factory_test.go @@ -9,10 +9,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_NewEncoder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("All ocr3 encoder types return a factory", func(t *testing.T) { evmEncoding, err := values.NewMap(map[string]any{"abi": "bytes[] Full_reports"}) require.NoError(t, err) diff --git a/core/capabilities/fakes/consensus_nodag_test.go b/core/capabilities/fakes/consensus_nodag_test.go index dc28ef3dfd8..3ba1dd0446f 100644 --- a/core/capabilities/fakes/consensus_nodag_test.go +++ b/core/capabilities/fakes/consensus_nodag_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" sdkpb "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" ) @@ -26,6 +27,7 @@ const ( ) func Test_Simple_EVMEncoder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nSigners := 4 signers := []ocr2key.KeyBundle{} for range nSigners { diff --git a/core/capabilities/gateway_connector/service_wrapper_test.go b/core/capabilities/gateway_connector/service_wrapper_test.go index 9d6561ecd3d..c61848d2b9a 100644 --- a/core/capabilities/gateway_connector/service_wrapper_test.go +++ b/core/capabilities/gateway_connector/service_wrapper_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest" gatewayconnector "github.com/smartcontractkit/chainlink/v2/core/capabilities/gateway_connector" "github.com/smartcontractkit/chainlink/v2/core/config/toml" @@ -49,6 +50,7 @@ func generateWrapper(t *testing.T, privateKey *ecdsa.PrivateKey, keystoreKey *ec func TestGatewayConnectorServiceWrapper_CleanStartClose(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") key, _ := testutils.NewPrivateKeyAndAddress(t) wrapper, err := generateWrapper(t, key, key) @@ -65,6 +67,7 @@ func TestGatewayConnectorServiceWrapper_CleanStartClose(t *testing.T) { func TestGatewayConnectorServiceWrapper_NonexistentKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") key, _ := testutils.NewPrivateKeyAndAddress(t) keystoreKey, _ := testutils.NewPrivateKeyAndAddress(t) diff --git a/core/capabilities/integration_tests/keystone/keystone_test.go b/core/capabilities/integration_tests/keystone/keystone_test.go index aad68ed4acb..5a42fce70af 100644 --- a/core/capabilities/integration_tests/keystone/keystone_test.go +++ b/core/capabilities/integration_tests/keystone/keystone_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" feeds_consumer "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/feeds_consumer_1_0_0" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/integration_tests/framework" @@ -23,10 +24,12 @@ import ( ) func Test_AllAtOnceTransmissionSchedule(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testTransmissionSchedule(t, "2s", "allAtOnce") } func Test_OneAtATimeTransmissionSchedule(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testTransmissionSchedule(t, "2s", "oneAtATime") } diff --git a/core/capabilities/integration_tests/keystone/llo_feed_test.go b/core/capabilities/integration_tests/keystone/llo_feed_test.go index a853628ba54..5cfecc3a755 100644 --- a/core/capabilities/integration_tests/keystone/llo_feed_test.go +++ b/core/capabilities/integration_tests/keystone/llo_feed_test.go @@ -20,12 +20,14 @@ import ( datastreamsllo "github.com/smartcontractkit/chainlink-data-streams/llo" feeds_consumer "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/feeds_consumer_1_0_0" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/integration_tests/framework" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/llo/cre" ) func Test_runLLOWorkflow(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() lggr := logger.Test(t) diff --git a/core/capabilities/launcher_test.go b/core/capabilities/launcher_test.go index c2fd5fb390c..ce1debbf5b3 100644 --- a/core/capabilities/launcher_test.go +++ b/core/capabilities/launcher_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" remoteMocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" @@ -72,6 +73,7 @@ func (m *mockCapability) UnregisterFromWorkflow(ctx context.Context, request cap } func TestLauncher(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("OK-wires_up_external_capabilities", func(t *testing.T) { lggr := logger.Test(t) registry := NewRegistry(lggr) @@ -280,6 +282,7 @@ func newTriggerEventMsg(t *testing.T, } func TestLauncher_RemoteTriggerModeAggregatorShim(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() lggr := logger.Test(t) registry := NewRegistry(lggr) @@ -389,6 +392,7 @@ func TestLauncher_RemoteTriggerModeAggregatorShim(t *testing.T) { } func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) dispatcher := remoteMocks.NewDispatcher(t) @@ -436,6 +440,7 @@ func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { } func TestLauncher_WiresUpClientsForPublicWorkflowDON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) dispatcher := remoteMocks.NewDispatcher(t) @@ -497,6 +502,7 @@ func TestLauncher_WiresUpClientsForPublicWorkflowDON(t *testing.T) { } func TestLauncher_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) dispatcher := remoteMocks.NewDispatcher(t) @@ -552,6 +558,7 @@ func TestLauncher_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilitie } func TestLauncher_SucceedsEvenIfDispatcherAlreadyHasReceiver(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) dispatcher := remoteMocks.NewDispatcher(t) @@ -618,6 +625,7 @@ func TestLauncher_SucceedsEvenIfDispatcherAlreadyHasReceiver(t *testing.T) { } func TestLauncher_SuccessfullyFilterDon2Don(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) dispatcher := remoteMocks.NewDispatcher(t) @@ -711,6 +719,7 @@ func TestLauncher_SuccessfullyFilterDon2Don(t *testing.T) { } func TestLauncher_DonPairsToUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registry := NewRegistry(logger.Test(t)) dispatcher := remoteMocks.NewDispatcher(t) @@ -769,6 +778,7 @@ func TestLauncher_DonPairsToUpdate(t *testing.T) { } func TestLauncher_DonPairsToUpdate_SkipsDifferentFamilies(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registry := NewRegistry(logger.Test(t)) dispatcher := remoteMocks.NewDispatcher(t) @@ -823,6 +833,7 @@ func TestLauncher_DonPairsToUpdate_SkipsDifferentFamilies(t *testing.T) { } func TestLauncher_V2CapabilitiesAddViaCombinedClient(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) dispatcher := remoteMocks.NewDispatcher(t) @@ -945,6 +956,7 @@ func TestLauncher_V2CapabilitiesAddViaCombinedClient(t *testing.T) { } func TestLauncher_V2CapabilitiesExposeRemotely(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) registry := NewRegistry(lggr) fullTriggerCapID := "streams-trigger@1.0.0" diff --git a/core/capabilities/remote/aggregation/default_mode_test.go b/core/capabilities/remote/aggregation/default_mode_test.go index 2121fdcadce..3d19dcd583a 100644 --- a/core/capabilities/remote/aggregation/default_mode_test.go +++ b/core/capabilities/remote/aggregation/default_mode_test.go @@ -7,6 +7,7 @@ import ( commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" ) @@ -16,6 +17,7 @@ var ( ) func TestDefaultModeAggregator_Aggregate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val, err := values.NewMap(triggerEvent1) require.NoError(t, err) capResponse1 := commoncap.TriggerResponse{ diff --git a/core/capabilities/remote/aggregation/signed_report_test.go b/core/capabilities/remote/aggregation/signed_report_test.go index cab27fd07de..8803428ead0 100644 --- a/core/capabilities/remote/aggregation/signed_report_test.go +++ b/core/capabilities/remote/aggregation/signed_report_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-protos/cre/go/values" // "github.com/smartcontractkit/chainlink/common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/aggregation" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" @@ -27,6 +28,7 @@ import ( func TestSignedReportAggregator_Aggregate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Setup test keys kb1, err := ocr2key.New(chaintype.EVM) diff --git a/core/capabilities/remote/combined_client_test.go b/core/capabilities/remote/combined_client_test.go index 02ebfa2d5cc..dd44a4b567e 100644 --- a/core/capabilities/remote/combined_client_test.go +++ b/core/capabilities/remote/combined_client_test.go @@ -8,12 +8,14 @@ import ( "github.com/stretchr/testify/require" commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/mocks" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestCombinedClient_Info(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-capability-info", commoncap.CapabilityTypeAction) client := remote.NewCombinedClient(info) @@ -24,6 +26,7 @@ func TestCombinedClient_Info(t *testing.T) { } func TestCombinedClient_RegisterTrigger_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-trigger", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -47,6 +50,7 @@ func TestCombinedClient_RegisterTrigger_Success(t *testing.T) { } func TestCombinedClient_RegisterTrigger_MethodNotDefined(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-trigger", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -63,6 +67,7 @@ func TestCombinedClient_RegisterTrigger_MethodNotDefined(t *testing.T) { } func TestCombinedClient_RegisterTrigger_ErrorFromSubscriber(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-trigger", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -87,6 +92,7 @@ func TestCombinedClient_RegisterTrigger_ErrorFromSubscriber(t *testing.T) { } func TestCombinedClient_UnregisterTrigger_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-trigger", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -107,6 +113,7 @@ func TestCombinedClient_UnregisterTrigger_Success(t *testing.T) { } func TestCombinedClient_UnregisterTrigger_MethodNotDefined(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-trigger", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -122,6 +129,7 @@ func TestCombinedClient_UnregisterTrigger_MethodNotDefined(t *testing.T) { } func TestCombinedClient_UnregisterTrigger_ErrorFromSubscriber(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-trigger", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -145,6 +153,7 @@ func TestCombinedClient_UnregisterTrigger_ErrorFromSubscriber(t *testing.T) { } func TestCombinedClient_RegisterToWorkflow_NotSupported(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-capability", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -161,6 +170,7 @@ func TestCombinedClient_RegisterToWorkflow_NotSupported(t *testing.T) { } func TestCombinedClient_UnregisterFromWorkflow_NotSupported(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-capability", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -177,6 +187,7 @@ func TestCombinedClient_UnregisterFromWorkflow_NotSupported(t *testing.T) { } func TestCombinedClient_Execute_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-executable", commoncap.CapabilityTypeAction) client := remote.NewCombinedClient(info) @@ -208,6 +219,7 @@ func TestCombinedClient_Execute_Success(t *testing.T) { } func TestCombinedClient_Execute_MethodNotDefined(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-executable", commoncap.CapabilityTypeAction) client := remote.NewCombinedClient(info) @@ -229,6 +241,7 @@ func TestCombinedClient_Execute_MethodNotDefined(t *testing.T) { } func TestCombinedClient_Execute_ErrorFromExecutable(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-executable", commoncap.CapabilityTypeAction) client := remote.NewCombinedClient(info) @@ -259,6 +272,7 @@ func TestCombinedClient_Execute_ErrorFromExecutable(t *testing.T) { } func TestCombinedClient_SetTriggerSubscriber(t *testing.T) { + tests.BelongsToCISuite(t, "unit") info := createTestCapabilityInfo("test-capability", commoncap.CapabilityTypeTrigger) client := remote.NewCombinedClient(info) @@ -281,6 +295,7 @@ func TestCombinedClient_SetTriggerSubscriber(t *testing.T) { } func TestCombinedClient_SetExecutableClient(t *testing.T) { + tests.BelongsToCISuite(t, "unit") info := createTestCapabilityInfo("test-capability", commoncap.CapabilityTypeAction) client := remote.NewCombinedClient(info) @@ -311,6 +326,7 @@ func TestCombinedClient_SetExecutableClient(t *testing.T) { } func TestCombinedClient_MultipleMethodsAndCapabilities(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) info := createTestCapabilityInfo("test-multi-capability", commoncap.CapabilityTypeAction) client := remote.NewCombinedClient(info) diff --git a/core/capabilities/remote/dispatcher_test.go b/core/capabilities/remote/dispatcher_test.go index b97250331d7..9feb58923c1 100644 --- a/core/capabilities/remote/dispatcher_test.go +++ b/core/capabilities/remote/dispatcher_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types/mocks" commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type testReceiver struct { @@ -80,6 +81,7 @@ func (c testConfig) SendToSharedPeer() bool { } func TestDispatcher_CleanStartClose(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) peer := mocks.NewPeer(t) @@ -99,6 +101,7 @@ func TestDispatcher_CleanStartClose(t *testing.T) { } func TestDispatcher_Receive(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) privKey1, peerID1 := newKeyPair(t) @@ -144,6 +147,7 @@ func TestDispatcher_Receive(t *testing.T) { } func TestDispatcher_ReceiveForMethod(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) privKey1, peerID1 := newKeyPair(t) @@ -196,6 +200,7 @@ func TestDispatcher_ReceiveForMethod(t *testing.T) { } func TestDispatcher_RespondWithError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) privKey1, peerID1 := newKeyPair(t) @@ -230,6 +235,7 @@ func TestDispatcher_RespondWithError(t *testing.T) { } func TestDispatcher_ReceiveFromBothPeers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) privKey1, peerID1 := newKeyPair(t) @@ -271,6 +277,7 @@ func TestDispatcher_ReceiveFromBothPeers(t *testing.T) { } func TestDispatcher_SendToSharedPeer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) _, peerID1 := newKeyPair(t) diff --git a/core/capabilities/remote/executable/client_test.go b/core/capabilities/remote/executable/client_test.go index fe5b52879cc..0f43d2d0a50 100644 --- a/core/capabilities/remote/executable/client_test.go +++ b/core/capabilities/remote/executable/client_test.go @@ -144,6 +144,7 @@ func Test_Client_TransmissionSchedules(t *testing.T) { } func Test_Client_TimesOutIfInsufficientCapabilityPeerResponses(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) responseTest := func(t *testing.T, response commoncap.CapabilityResponse, responseError error) { @@ -171,6 +172,7 @@ func Test_Client_TimesOutIfInsufficientCapabilityPeerResponses(t *testing.T) { } func Test_Client_ContextCanceledBeforeQuorumReached(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx, cancel := context.WithCancel(testutils.Context(t)) responseTest := func(t *testing.T, response commoncap.CapabilityResponse, responseError error) { @@ -372,6 +374,7 @@ func (t *clientTestServer) sendResponse(messageID string, responseErr error, } func TestClient_SetConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capabilityID := "test_capability@1.0.0" @@ -461,6 +464,7 @@ func TestClient_SetConfig(t *testing.T) { } func TestClient_SetConfig_StartClose(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lggr := logger.Test(t) capabilityID := "test_capability@1.0.0" diff --git a/core/capabilities/remote/executable/endtoend_test.go b/core/capabilities/remote/executable/endtoend_test.go index 996c0ca4657..036037c4594 100644 --- a/core/capabilities/remote/executable/endtoend_test.go +++ b/core/capabilities/remote/executable/endtoend_test.go @@ -28,6 +28,7 @@ import ( ) func Test_RemoteExecutableCapability_ExecutionNotBlockedBySlowCapabilityExecution_AllAtOnce(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) workflowIDToPause := map[string]time.Duration{} @@ -91,6 +92,7 @@ func Test_RemoteExecutableCapability_ExecutionNotBlockedBySlowCapabilityExecutio } func Test_RemoteExecutableCapability_ExecutionNotBlockedBySlowCapabilityExecution_OneAtATime(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) workflowIDToPause := map[string]time.Duration{} @@ -194,6 +196,7 @@ func Test_RemoteExecutableCapability_TransmissionSchedules(t *testing.T) { } func Test_RemoteExecutionCapability_CapabilityError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) capability := &TestErrorCapability{} @@ -218,6 +221,7 @@ func Test_RemoteExecutionCapability_CapabilityError(t *testing.T) { } func Test_RemoteExecutableCapability_RandomCapabilityError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) capability := &TestRandomErrorCapability{} diff --git a/core/capabilities/remote/executable/hasher_test.go b/core/capabilities/remote/executable/hasher_test.go index 10f49267dfc..517b9bcf80b 100644 --- a/core/capabilities/remote/executable/hasher_test.go +++ b/core/capabilities/remote/executable/hasher_test.go @@ -9,11 +9,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" evmcappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" ) func TestWriteReportExcludeSignaturesHasher_Hash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") req1a := getRequest(t, []byte("testdata"), [][]byte{[]byte("sig1"), []byte("sig2")}) req1b := getRequest(t, []byte("testdata"), [][]byte{[]byte("sig3"), []byte("sig4")}) req2 := getRequest(t, []byte("otherdata"), [][]byte{[]byte("sig1"), []byte("sig2")}) @@ -31,6 +33,7 @@ func TestWriteReportExcludeSignaturesHasher_Hash(t *testing.T) { } func TestWriteReportExcludeSignaturesHasher_Hash_NilPayload(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nilReq := capabilities.CapabilityRequest{Payload: nil} nilReqBytes, err := pb.MarshalCapabilityRequest(nilReq) require.NoError(t, err) @@ -44,6 +47,7 @@ func TestWriteReportExcludeSignaturesHasher_Hash_NilPayload(t *testing.T) { } func TestWriteReportExcludeSignaturesHasher_Hash_NilReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nilReq := &evmcappb.WriteReportRequest{Report: nil} nilPb, err := anypb.New(nilReq) require.NoError(t, err) @@ -61,6 +65,7 @@ func TestWriteReportExcludeSignaturesHasher_Hash_NilReport(t *testing.T) { } func TestWriteReportExcludeSignaturesHasher_Hash_InvalidPayload(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Test with completely invalid payload that cannot be unmarshaled msgBody := &types.MessageBody{ Payload: []byte("invalid protobuf data"), @@ -73,6 +78,7 @@ func TestWriteReportExcludeSignaturesHasher_Hash_InvalidPayload(t *testing.T) { } func TestSimpleHasher_ExcludesSpendLimits(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Create two requests with identical payloads but different SpendLimits req1 := getRequestWithSpendLimits(t, []byte("testdata"), []capabilities.SpendLimit{ {SpendType: "gas", Limit: "1000"}, @@ -100,6 +106,7 @@ func TestSimpleHasher_ExcludesSpendLimits(t *testing.T) { } func TestWriteReportExcludeSignaturesHasher_ExcludesSpendLimits(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Create two requests with identical payloads but different SpendLimits req1 := getWriteReportRequestWithSpendLimits(t, []byte("testdata"), [][]byte{[]byte("sig1"), []byte("sig2")}, []capabilities.SpendLimit{ {SpendType: "gas", Limit: "1000"}, diff --git a/core/capabilities/remote/executable/parallel_executor_test.go b/core/capabilities/remote/executable/parallel_executor_test.go index f7eb4535c4e..a496fb8775a 100644 --- a/core/capabilities/remote/executable/parallel_executor_test.go +++ b/core/capabilities/remote/executable/parallel_executor_test.go @@ -10,9 +10,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_CancellingContext_StopsTask(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tp := newParallelExecutor(10) servicetest.Run(t, tp) @@ -45,6 +47,7 @@ func Test_CancellingContext_StopsTask(t *testing.T) { } func Test_ExecuteRequestTimesOutWhenParallelExecutionLimitReached(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tp := newParallelExecutor(3) servicetest.Run(t, tp) @@ -64,6 +67,7 @@ func Test_ExecuteRequestTimesOutWhenParallelExecutionLimitReached(t *testing.T) } func Test_ExecutingMultipleTasksInParallel(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tp := newParallelExecutor(10) servicetest.Run(t, tp) @@ -83,6 +87,7 @@ func Test_ExecutingMultipleTasksInParallel(t *testing.T) { } func Test_StopsExecutingMultipleParallelTasksWhenClosed(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tp := newParallelExecutor(10) var counter int32 t.Cleanup(func() { diff --git a/core/capabilities/remote/executable/request/client_request_test.go b/core/capabilities/remote/executable/request/client_request_test.go index 1ecb6bad722..1776d5e3c0b 100644 --- a/core/capabilities/remote/executable/request/client_request_test.go +++ b/core/capabilities/remote/executable/request/client_request_test.go @@ -21,6 +21,7 @@ import ( "google.golang.org/protobuf/proto" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/executable/request" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/transmission" @@ -34,6 +35,7 @@ const ( ) func Test_ClientRequest_MessageValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") numWorkflowPeers := 2 workflowPeers := make([]p2ptypes.PeerID, numWorkflowPeers) for i := range numWorkflowPeers { diff --git a/core/capabilities/remote/executable/request/server_request_test.go b/core/capabilities/remote/executable/request/server_request_test.go index aad90136892..f448eb6aa5e 100644 --- a/core/capabilities/remote/executable/request/server_request_test.go +++ b/core/capabilities/remote/executable/request/server_request_test.go @@ -15,6 +15,7 @@ import ( caperrors "github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/executable/request" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" @@ -22,6 +23,7 @@ import ( ) func Test_ServerRequest_MessageValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capability := TestCapability{} capabilityPeerID := NewP2PPeerID(t) diff --git a/core/capabilities/remote/executable/server_test.go b/core/capabilities/remote/executable/server_test.go index 63a2c9753b2..2974fbd8114 100644 --- a/core/capabilities/remote/executable/server_test.go +++ b/core/capabilities/remote/executable/server_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" sdkpb "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/executable" @@ -28,6 +29,7 @@ import ( ) func Test_Server_Execute_SlowCapabilityExecutionDoesNotImpactSubsequentCall(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -81,6 +83,7 @@ func Test_Server_Execute_SlowCapabilityExecutionDoesNotImpactSubsequentCall(t *t } func Test_Server_DefaultExcludedAttributes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -117,6 +120,7 @@ func Test_Server_DefaultExcludedAttributes(t *testing.T) { } func Test_Server_ExcludesNonDeterministicInputAttributes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -153,6 +157,7 @@ func Test_Server_ExcludesNonDeterministicInputAttributes(t *testing.T) { } func Test_Server_Execute_RespondsAfterSufficientRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -180,6 +185,7 @@ func Test_Server_Execute_RespondsAfterSufficientRequests(t *testing.T) { } func Test_Server_InsufficientCallers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -207,6 +213,7 @@ func Test_Server_InsufficientCallers(t *testing.T) { } func Test_Server_CapabilityError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -234,6 +241,7 @@ func Test_Server_CapabilityError(t *testing.T) { } func Test_Server_V2Request_ExcludesNonDeterministicInputAttributes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) numCapabilityPeers := 4 @@ -444,6 +452,7 @@ func (r *serverTestClient) Execute(ctx context.Context, req commoncap.Capability } func Test_Server_SetConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) peerID := NewP2PPeerID(t) @@ -571,6 +580,7 @@ func Test_Server_SetConfig(t *testing.T) { } func Test_Server_SetConfig_ConfigReplacement(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) peerID := NewP2PPeerID(t) broker := newTestAsyncMessageBroker(t, 100) @@ -628,6 +638,7 @@ func Test_Server_SetConfig_ConfigReplacement(t *testing.T) { } func Test_Server_SetConfig_StartValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) t.Run("Start without SetConfig should fail", func(t *testing.T) { @@ -689,6 +700,7 @@ func Test_Server_SetConfig_StartValidation(t *testing.T) { } func Test_Server_SetConfig_DONMembershipChange(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lggr := logger.Test(t) peerID := NewP2PPeerID(t) @@ -777,6 +789,7 @@ func Test_Server_SetConfig_DONMembershipChange(t *testing.T) { } func Test_Server_SetConfig_ShutdownRaces(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lggr := logger.Test(t) peerID := NewP2PPeerID(t) @@ -842,6 +855,7 @@ func Test_Server_SetConfig_ShutdownRaces(t *testing.T) { } func Test_Server_Execute_WithConcurrentSetConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lggr := logger.Test(t) numWorkflowPeers := 4 diff --git a/core/capabilities/remote/messagecache/message_cache_test.go b/core/capabilities/remote/messagecache/message_cache_test.go index 2d059adef32..6abb9331be4 100644 --- a/core/capabilities/remote/messagecache/message_cache_test.go +++ b/core/capabilities/remote/messagecache/message_cache_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/messagecache" ) @@ -17,6 +18,7 @@ const ( ) func TestMessageCache_InsertReady(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cache := messagecache.NewMessageCache[string, string]() // not ready with one message @@ -43,6 +45,7 @@ func TestMessageCache_InsertReady(t *testing.T) { } func TestMessageCache_DeleteOlderThan(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cache := messagecache.NewMessageCache[string, string]() ts := cache.Insert(eventID1, peerID1, 100, []byte(payloadA)) diff --git a/core/capabilities/remote/trigger_publisher_test.go b/core/capabilities/remote/trigger_publisher_test.go index bad3b4cd905..8feb4fd331c 100644 --- a/core/capabilities/remote/trigger_publisher_test.go +++ b/core/capabilities/remote/trigger_publisher_test.go @@ -11,6 +11,7 @@ import ( commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" @@ -21,6 +22,7 @@ import ( const capID = "cap_id@1" func TestTriggerPublisher_Register(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) capabilityDONID, workflowDONID := uint32(1), uint32(2) @@ -42,6 +44,7 @@ func TestTriggerPublisher_Register(t *testing.T) { } func TestTriggerPublisher_ReceiveTriggerEvents_NoBatching(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) capabilityDONID, workflowDONID := uint32(1), uint32(2) @@ -62,6 +65,7 @@ func TestTriggerPublisher_ReceiveTriggerEvents_NoBatching(t *testing.T) { } func TestTriggerPublisher_ReceiveTriggerEvents_BatchingEnabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) capabilityDONID, workflowDONID := uint32(1), uint32(2) @@ -101,6 +105,7 @@ func TestTriggerPublisher_ReceiveTriggerEvents_BatchingEnabled(t *testing.T) { func TestTriggerPublisher_SetConfig_Basic(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capInfo := commoncap.CapabilityInfo{ ID: capID, diff --git a/core/capabilities/remote/trigger_subscriber_test.go b/core/capabilities/remote/trigger_subscriber_test.go index 16223504557..1f154300874 100644 --- a/core/capabilities/remote/trigger_subscriber_test.go +++ b/core/capabilities/remote/trigger_subscriber_test.go @@ -11,6 +11,7 @@ import ( commoncap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/aggregation" @@ -32,6 +33,7 @@ var ( func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capInfo, capDon, workflowDon := buildTwoTestDONs(t, 1, 1) dispatcher := remoteMocks.NewDispatcher(t) @@ -81,6 +83,7 @@ func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { func TestTriggerSubscriber_CorrectEventExpiryCheck(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capInfo, capDon, workflowDon := buildTwoTestDONs(t, 3, 1) awaitRegistrationMessageCh := make(chan struct{}) @@ -146,6 +149,7 @@ func TestTriggerSubscriber_CorrectEventExpiryCheck(t *testing.T) { func TestTriggerSubscriber_SetConfig_Basic(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capInfo, capDon, workflowDon := buildTwoTestDONs(t, 3, 1) agg := aggregation.NewDefaultModeAggregator(1) @@ -211,6 +215,7 @@ func TestTriggerSubscriber_SetConfig_Basic(t *testing.T) { func TestTriggerSubscriber_RegistrationLoopWithConfigUpdate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) capInfo, capDon, _ := buildTwoTestDONs(t, 1, 1) dispatcher := remoteMocks.NewDispatcher(t) diff --git a/core/capabilities/remote/utils_test.go b/core/capabilities/remote/utils_test.go index 28a5fddd021..6d6f22720fa 100644 --- a/core/capabilities/remote/utils_test.go +++ b/core/capabilities/remote/utils_test.go @@ -10,6 +10,7 @@ import ( ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" @@ -24,6 +25,7 @@ const ( ) func TestValidateMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privKey1, peerID1 := newKeyPair(t) _, peerID2 := newKeyPair(t) @@ -96,12 +98,14 @@ func signBody(t *testing.T, senderPrivKey ed25519.PrivateKey, body *remotetypes. } func TestToPeerID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") id, err := remote.ToPeerID([]byte("12345678901234567890123456789012")) require.NoError(t, err) require.Equal(t, "12D3KooWD8QYTQVYjB6oog4Ej8PcPpqTrPRnxLQap8yY8KUQRVvq", id.String()) } func TestSanitizeLogString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, "hello", remote.SanitizeLogString("hello")) require.Equal(t, "[UNPRINTABLE] 0a", remote.SanitizeLogString("\n")) diff --git a/core/capabilities/streams/codec_test.go b/core/capabilities/streams/codec_test.go index c73ee1ccb6e..38cda7b12b0 100644 --- a/core/capabilities/streams/codec_test.go +++ b/core/capabilities/streams/codec_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" "github.com/smartcontractkit/chainlink-common/pkg/logger" v3 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" @@ -23,6 +24,7 @@ import ( ) func TestCodec_WrapUnwrap(t *testing.T) { + tests.BelongsToCISuite(t, "unit") codec := streams.NewCodec(logger.Test(t)) id1, id1Str := newFeedID(t) diff --git a/core/capabilities/streams/consensus_agg_test.go b/core/capabilities/streams/consensus_agg_test.go index f9d67bbde49..82a76b1f976 100644 --- a/core/capabilities/streams/consensus_agg_test.go +++ b/core/capabilities/streams/consensus_agg_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/datafeeds" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" ) @@ -19,7 +20,10 @@ import ( // Integration/load test that combines Data Feeds Consensus Aggregator and Streams Codec. // For more meaningful measurements, increase the values of parameters P and T. func TestStreamsConsensusAggregator(t *testing.T) { - Nt := 10 // trigger DON nodes + tests.BelongsToCISuite( + // trigger DON nodes + t, "unit") + Nt := 10 Ft := 3 // trigger DON faulty nodes Nw := 10 // workflow DON nodes Fw := 3 // workflow DON faulty nodes diff --git a/core/capabilities/streams/trigger_test.go b/core/capabilities/streams/trigger_test.go index cd1aae63292..625eb312947 100644 --- a/core/capabilities/streams/trigger_test.go +++ b/core/capabilities/streams/trigger_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" @@ -58,7 +59,10 @@ type node struct { // It measures time needed to receive and process trigger events from multiple nodes and produce a local aggregated event. // For more meaningful measurements, increase the values of parameters P and T. func TestStreamsTrigger(t *testing.T) { - N := 31 // trigger DON nodes + tests.BelongsToCISuite( + // trigger DON nodes + t, "unit") + N := 31 F := 10 // faulty nodes R := 5 // different reports per feed (i.e. prices and timestamps) P := 2 // feeds diff --git a/core/capabilities/transmission/local_target_capability_test.go b/core/capabilities/transmission/local_target_capability_test.go index a6b7b8303c5..d859a9d351c 100644 --- a/core/capabilities/transmission/local_target_capability_test.go +++ b/core/capabilities/transmission/local_target_capability_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" ) @@ -21,6 +22,7 @@ func assertBetween(t *testing.T, got time.Duration, low time.Duration, high time } func TestScheduledExecutionStrategy_LocalDON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var gotTime time.Time var called bool diff --git a/core/capabilities/transmission/transmission_test.go b/core/capabilities/transmission/transmission_test.go index eed5fe8ef97..38b6a54eb9f 100644 --- a/core/capabilities/transmission/transmission_test.go +++ b/core/capabilities/transmission/transmission_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" ) func Test_GetPeerIDToTransmissionDelay(t *testing.T) { + tests.BelongsToCISuite(t, "unit") peer1 := [32]byte(fmt.Appendf(nil, "%-32s", "one")) peer2 := [32]byte(fmt.Appendf(nil, "%-32s", "two")) peer3 := [32]byte(fmt.Appendf(nil, "%-32s", "three")) diff --git a/core/capabilities/triggers/logevent/log_event_trigger_test.go b/core/capabilities/triggers/logevent/log_event_trigger_test.go index ee6fbcfd954..ba41c02907d 100644 --- a/core/capabilities/triggers/logevent/log_event_trigger_test.go +++ b/core/capabilities/triggers/logevent/log_event_trigger_test.go @@ -20,6 +20,7 @@ import ( // Test for Log Event Trigger Capability happy path for EVM func TestLogEventTriggerEVMHappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") th := testutils.NewContractReaderTH(t) logEventConfig := Config{ @@ -67,6 +68,7 @@ func TestLogEventTriggerEVMHappyPath(t *testing.T) { // by using cursor and does not receive duplicate logs func TestLogEventTriggerCursorNewLogs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") th := testutils.NewContractReaderTH(t) logEventConfig := Config{ diff --git a/core/capabilities/validation/validation_test.go b/core/capabilities/validation/validation_test.go index 5429e040b6d..2b8260c3f15 100644 --- a/core/capabilities/validation/validation_test.go +++ b/core/capabilities/validation/validation_test.go @@ -4,15 +4,19 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestIsValidWorkflowID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Error(t, ValidateWorkflowOrExecutionID("too_short")) require.Error(t, ValidateWorkflowOrExecutionID("nothex--95ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0")) require.NoError(t, ValidateWorkflowOrExecutionID("15c631d295ef5e32deb99a10ee6804bc4af13855687559d7ff6552ac6dbb2ce0")) } func TestIsValidTriggerEventID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.False(t, IsValidID("")) require.False(t, IsValidID("\n\n")) require.True(t, IsValidID("id_id_2")) diff --git a/core/capabilities/vault/capability_test.go b/core/capabilities/vault/capability_test.go index b2948755bc2..1496ee9364b 100644 --- a/core/capabilities/vault/capability_test.go +++ b/core/capabilities/vault/capability_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" coreCapabilities "github.com/smartcontractkit/chainlink/v2/core/capabilities" vaultcapmocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/mocks" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" @@ -30,6 +31,7 @@ import ( ) func TestCapability_CapabilityCall(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) clock := clockwork.NewFakeClock() expiry := 10 * time.Second @@ -128,6 +130,7 @@ func TestCapability_CapabilityCall(t *testing.T) { } func TestCapability_CapabilityCall_DuringSubscriptionPhase(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) clock := clockwork.NewFakeClock() expiry := 10 * time.Second @@ -225,6 +228,7 @@ func TestCapability_CapabilityCall_DuringSubscriptionPhase(t *testing.T) { } func TestCapability_CapabilityCall_ReturnsIncorrectType(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) clock := clockwork.NewFakeClock() expiry := 10 * time.Second @@ -300,6 +304,7 @@ func TestCapability_CapabilityCall_ReturnsIncorrectType(t *testing.T) { } func TestCapability_CapabilityCall_TimeOut(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) fakeClock := clockwork.NewFakeClock() expiry := 10 * time.Second @@ -371,6 +376,7 @@ func TestCapability_CapabilityCall_TimeOut(t *testing.T) { } func TestCapability_CRUD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := "0x0001020304050607080900010203040506070809" requestID := owner + "::" + "test-request-id" sid := &vault.SecretIdentifier{ @@ -1073,6 +1079,7 @@ func TestCapability_CRUD(t *testing.T) { } func TestCapability_Lifecycle(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) clock := clockwork.NewFakeClock() expiry := 10 * time.Second @@ -1105,6 +1112,7 @@ func TestCapability_Lifecycle(t *testing.T) { } func TestCapability_PublicKeyGet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) clock := clockwork.NewFakeClock() expiry := 10 * time.Second diff --git a/core/capabilities/vault/gw_handler_test.go b/core/capabilities/vault/gw_handler_test.go index e5a74116810..f1818e0fd8e 100644 --- a/core/capabilities/vault/gw_handler_test.go +++ b/core/capabilities/vault/gw_handler_test.go @@ -13,6 +13,7 @@ import ( vaultcommon "github.com/smartcontractkit/chainlink-common/pkg/capabilities/actions/vault" jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" core_mocks "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" vaultcap "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" vaulttypesmocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes/mocks" @@ -22,6 +23,7 @@ import ( ) func TestGatewayHandler_HandleGatewayMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) ctx := context.Background() @@ -187,6 +189,7 @@ func TestGatewayHandler_HandleGatewayMessage(t *testing.T) { } func TestGatewayHandler_Lifecycle(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) ctx := context.Background() diff --git a/core/capabilities/vault/models_test.go b/core/capabilities/vault/models_test.go index 95dfea8c1db..9a08d89979d 100644 --- a/core/capabilities/vault/models_test.go +++ b/core/capabilities/vault/models_test.go @@ -7,10 +7,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" ) func Test_ValidateSignatures_Valid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx, err := hex.DecodeString("000ec4f6a2ba011e909eccf64628855b848e08876a1edd938a1372a9e51adff100000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000") require.NoError(t, err) sig1, err := hex.DecodeString("d1067844e2849b404d903730c4cae19f090d53a578a1e8dc16ecbdc0285c1f186599108abbe0073b78bc148a6504907474ed3a6881df917e6d142cff70acfb5900") @@ -39,6 +41,7 @@ func Test_ValidateSignatures_Valid(t *testing.T) { } func Test_ValidateSignatures_InsufficientSignatures(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx, err := hex.DecodeString("000ec4f6a2ba011e909eccf64628855b848e08876a1edd938a1372a9e51adff100000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000") require.NoError(t, err) sig1, err := hex.DecodeString("d1067844e2849b404d903730c4cae19f090d53a578a1e8dc16ecbdc0285c1f186599108abbe0073b78bc148a6504907474ed3a6881df917e6d142cff70acfb5900") @@ -63,6 +66,7 @@ func Test_ValidateSignatures_InsufficientSignatures(t *testing.T) { } func Test_ValidateSignatures_DoesntCountDuplicates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx, err := hex.DecodeString("000ec4f6a2ba011e909eccf64628855b848e08876a1edd938a1372a9e51adff100000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000") require.NoError(t, err) sig1, err := hex.DecodeString("d1067844e2849b404d903730c4cae19f090d53a578a1e8dc16ecbdc0285c1f186599108abbe0073b78bc148a6504907474ed3a6881df917e6d142cff70acfb5900") @@ -88,6 +92,7 @@ func Test_ValidateSignatures_DoesntCountDuplicates(t *testing.T) { } func Test_ValidateSignatures_InvalidSignature(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx, err := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") require.NoError(t, err) sig1, err := hex.DecodeString("d1067844e2849b404d903730c4cae19f090d53a578a1e8dc16ecbdc0285c1f186599108abbe0073b78bc148a6504907474ed3a6881df917e6d142cff70acfb5900") diff --git a/core/capabilities/vault/request_authorizer_test.go b/core/capabilities/vault/request_authorizer_test.go index f0422463a27..87f513d317a 100644 --- a/core/capabilities/vault/request_authorizer_test.go +++ b/core/capabilities/vault/request_authorizer_test.go @@ -13,6 +13,7 @@ import ( vaultcommon "github.com/smartcontractkit/chainlink-common/pkg/capabilities/actions/vault" jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/workflow_registry_wrapper_v2" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -20,6 +21,7 @@ import ( ) func TestRequestAuthorizer_CreateSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") params, err := json.Marshal(vaultcommon.CreateSecretsRequest{ EncryptedSecrets: []*vaultcommon.EncryptedSecret{ { @@ -60,6 +62,7 @@ func TestRequestAuthorizer_CreateSecrets(t *testing.T) { } func TestRequestAuthorizer_UpdateSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") params, err := json.Marshal(vaultcommon.UpdateSecretsRequest{ EncryptedSecrets: []*vaultcommon.EncryptedSecret{ { @@ -99,6 +102,7 @@ func TestRequestAuthorizer_UpdateSecrets(t *testing.T) { } func TestRequestAuthorizer_DeleteSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") params, err := json.Marshal(vaultcommon.DeleteSecretsRequest{ Ids: []*vaultcommon.SecretIdentifier{ { @@ -132,6 +136,7 @@ func TestRequestAuthorizer_DeleteSecrets(t *testing.T) { } func TestRequestAuthorizer_ListSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") params, err := json.Marshal(vaultcommon.ListSecretIdentifiersRequest{ Namespace: "b", }) diff --git a/core/capabilities/vault/vaultutils/json_test.go b/core/capabilities/vault/vaultutils/json_test.go index 557bd71defd..03cb7ca9bcb 100644 --- a/core/capabilities/vault/vaultutils/json_test.go +++ b/core/capabilities/vault/vaultutils/json_test.go @@ -6,9 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/structpb" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestToCanonicalJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testData, err := structpb.NewValue(map[string]any{ "field1": "value1", "field2": 42, diff --git a/core/capabilities/webapi/outgoing_connector_handler_test.go b/core/capabilities/webapi/outgoing_connector_handler_test.go index 5f3f4443d75..f84d2c40607 100644 --- a/core/capabilities/webapi/outgoing_connector_handler_test.go +++ b/core/capabilities/webapi/outgoing_connector_handler_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/ratelimit" "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/common" gcmocks "github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector/mocks" @@ -31,6 +32,7 @@ const ( ) func TestOutgoingConnectorHandler_AwaitConnection(t *testing.T) { + tests.BelongsToCISuite(t, "unit") gateways := []string{"gateway1", "gateway2"} type testCase struct { @@ -145,6 +147,7 @@ func TestOutgoingConnectorHandler_AwaitConnection(t *testing.T) { } func TestHandleSingleNodeRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("uses default timeout if no timeout is provided", func(t *testing.T) { msgID := "msgID" testURL := "http://localhost:8080" @@ -409,6 +412,7 @@ func gatewayResponse(t *testing.T, msgID string, privateKey string) *jsonrpc.Req } func TestServiceConfigDefaults(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("fills default RateLimiterConfigs", func(t *testing.T) { var cfg ServiceConfig @@ -429,6 +433,7 @@ func TestServiceConfigDefaults(t *testing.T) { }) } func TestOutgoingConnectorHandler_HandleGatewayMessage_InvalidMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") _, handler := newFunctionWithDefaultConfig( t, func(gc *gcmocks.GatewayConnector) {}, diff --git a/core/capabilities/webapi/target/target_test.go b/core/capabilities/webapi/target/target_test.go index 92d3c165d6e..11b36e59298 100644 --- a/core/capabilities/webapi/target/target_test.go +++ b/core/capabilities/webapi/target/target_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/ratelimit" registrymock "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/webapi" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -151,6 +152,7 @@ func gatewayResponse(t *testing.T, msgID string, privateKey string) *jsonrpc.Req } func TestRegisterUnregister(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t, defaultConfig) ctx := testutils.Context(t) @@ -196,6 +198,7 @@ func TestRegisterUnregister(t *testing.T) { } func TestCapability_Execute(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t, defaultConfig) ctx := testutils.Context(t) th.connector.EXPECT().DonID(matches.AnyContext).Return("donID", nil) diff --git a/core/capabilities/webapi/trigger/trigger_test.go b/core/capabilities/webapi/trigger/trigger_test.go index 58605499877..c27acb8aec8 100644 --- a/core/capabilities/webapi/trigger/trigger_test.go +++ b/core/capabilities/webapi/trigger/trigger_test.go @@ -18,6 +18,7 @@ import ( registrymock "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" "github.com/smartcontractkit/chainlink-protos/cre/go/values" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/webapi/webapicap" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" @@ -160,6 +161,7 @@ func requireChanMsg[T capabilities.TriggerResponse](t *testing.T, ch <-chan capa } func TestTriggerExecute(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t) ctx := testutils.Context(t) ctx, cancelContext := context.WithDeadline(ctx, time.Now().Add(10*time.Second)) @@ -324,6 +326,7 @@ func TestTriggerExecute(t *testing.T) { } func TestRegisterNoAllowedSenders(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t) ctx := testutils.Context(t) Config, _ := workflowTriggerConfig(th, []string{}, []string{"daily_price_update"}) @@ -343,6 +346,7 @@ func TestRegisterNoAllowedSenders(t *testing.T) { } func TestTriggerExecute2WorkflowsSameTopicDifferentAllowLists(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t) ctx := testutils.Context(t) ctx, cancelContext := context.WithDeadline(ctx, time.Now().Add(10*time.Second)) @@ -402,6 +406,7 @@ func TestTriggerExecute2WorkflowsSameTopicDifferentAllowLists(t *testing.T) { } func TestRegisterUnregister(t *testing.T) { + tests.BelongsToCISuite(t, "unit") th := setup(t) ctx := testutils.Context(t) Config, err := workflowTriggerConfig(th, []string{address1}, []string{"daily_price_update"}) diff --git a/core/cbor/cbor_test.go b/core/cbor/cbor_test.go index 5883daf976f..6c099145136 100644 --- a/core/cbor/cbor_test.go +++ b/core/cbor/cbor_test.go @@ -11,11 +11,13 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func Test_ParseCBOR(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") address, err := hex.DecodeString("0x8bd112d3f8f92e41c861939545ad387307af9703") require.NoError(t, err) @@ -153,6 +155,7 @@ func Test_ParseCBOR(t *testing.T) { func Test_ParseCBORToStruct_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hexCBOR := `0xbf6375726c781a68747470733a2f2f657468657270726963652e636f6d2f61706964706174689f66726563656e7463757364ffff000000` bytesCBOR, err := hexutil.Decode(hexCBOR) @@ -171,6 +174,7 @@ func Test_ParseCBORToStruct_Success(t *testing.T) { func Test_ParseCBORToStruct_WrongFieldType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hexCBOR := `0xbf6375726c781a68747470733a2f2f657468657270726963652e636f6d2f61706964706174689f66726563656e7463757364ffff000000` bytesCBOR, err := hexutil.Decode(hexCBOR) @@ -187,6 +191,7 @@ func Test_ParseCBORToStruct_WrongFieldType(t *testing.T) { func Test_ParseCBORToStruct_BinaryStringOfWrongType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // {"key":"value"} but with last byte replaced with invalid unicode (0x88) hexCBOR := `0x636B65796576616C7588` @@ -202,6 +207,7 @@ func Test_ParseCBORToStruct_BinaryStringOfWrongType(t *testing.T) { func Test_autoAddMapDelimiters(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -266,6 +272,7 @@ func jsonMustUnmarshal(t *testing.T, in string) any { func TestCoerceInterfaceMapToStringMap(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -310,6 +317,7 @@ func TestCoerceInterfaceMapToStringMap(t *testing.T) { func TestCoerceInterfaceMapToStringMap_BadInputs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -329,6 +337,7 @@ func TestCoerceInterfaceMapToStringMap_BadInputs(t *testing.T) { func TestJSON_CBOR(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/cmd/admin_commands_test.go b/core/cmd/admin_commands_test.go index d631ad907a0..1af0200bb6a 100644 --- a/core/cmd/admin_commands_test.go +++ b/core/cmd/admin_commands_test.go @@ -14,6 +14,7 @@ import ( "github.com/urfave/cli" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( ) func TestShell_CreateUser(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() client.PasswordPrompter = cltest.MockPasswordPrompter{ @@ -61,6 +63,7 @@ func TestShell_CreateUser(t *testing.T) { } func TestShell_ChangeRole(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -101,6 +104,7 @@ func TestShell_ChangeRole(t *testing.T) { } func TestShell_DeleteUser(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -136,6 +140,7 @@ func TestShell_DeleteUser(t *testing.T) { } func TestShell_ListUsers(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -166,6 +171,7 @@ func TestShell_ListUsers(t *testing.T) { } func TestAdminUsersPresenter_RenderTable(t *testing.T) { + tests.BelongsToCISuite(t, "unit") user := sessions.User{ Email: "foo@bar.com", Role: "admin", diff --git a/core/cmd/app_test.go b/core/cmd/app_test.go index d152687165e..e707e6c4e1c 100644 --- a/core/cmd/app_test.go +++ b/core/cmd/app_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -56,6 +57,7 @@ func withDefaults(t *testing.T, c chainlink.Config, s chainlink.Secrets) chainli } func Test_initServerConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { opts *chainlink.GeneralConfigOpts fileNames []string diff --git a/core/cmd/aptos_keys_commands_test.go b/core/cmd/aptos_keys_commands_test.go index 5343e3ae601..44214542082 100644 --- a/core/cmd/aptos_keys_commands_test.go +++ b/core/cmd/aptos_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestAptosKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = "1" @@ -56,6 +58,7 @@ func TestAptosKeyPresenter_RenderTable(t *testing.T) { } func TestShell_AptosKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Aptos() cleanup := func() { diff --git a/core/cmd/blocks_commands_test.go b/core/cmd/blocks_commands_test.go index eae71a4d139..a5aedd4a8a0 100644 --- a/core/cmd/blocks_commands_test.go +++ b/core/cmd/blocks_commands_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/urfave/cli" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" @@ -15,6 +16,7 @@ import ( func Test_ReplayFromBlock(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].ChainID = (*ubig.Big)(big.NewInt(5)) @@ -71,6 +73,7 @@ func Test_ReplayFromBlock(t *testing.T) { func Test_FindLCA(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(42), nil) app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { diff --git a/core/cmd/bridge_commands_test.go b/core/cmd/bridge_commands_test.go index 14042261a5e..6a5947f1add 100644 --- a/core/cmd/bridge_commands_test.go +++ b/core/cmd/bridge_commands_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/urfave/cli" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -20,6 +21,7 @@ import ( func TestBridgePresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( name = "Bridge 1" @@ -64,6 +66,7 @@ func TestBridgePresenter_RenderTable(t *testing.T) { func TestShell_IndexBridges(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -101,6 +104,7 @@ func TestShell_IndexBridges(t *testing.T) { func TestShell_ShowBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, r := app.NewShellAndRenderer() @@ -129,6 +133,7 @@ func TestShell_ShowBridge(t *testing.T) { func TestShell_CreateBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -166,6 +171,7 @@ func TestShell_CreateBridge(t *testing.T) { func TestShell_RemoveBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, r := app.NewShellAndRenderer() @@ -194,6 +200,7 @@ func TestShell_RemoveBridge(t *testing.T) { } func TestShell_UpdateBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() diff --git a/core/cmd/chains_commands_test.go b/core/cmd/chains_commands_test.go index 82768e9987c..2a53da2fd2e 100644 --- a/core/cmd/chains_commands_test.go +++ b/core/cmd/chains_commands_test.go @@ -9,6 +9,7 @@ import ( solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" client2 "github.com/smartcontractkit/chainlink-evm/pkg/client" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/cmd" @@ -24,6 +25,7 @@ func newRandChainID() *big.Big { func TestShell_IndexEVMChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) @@ -42,6 +44,7 @@ func TestShell_IndexEVMChains(t *testing.T) { func TestShell_IndexSolanaChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") id := solanatest.RandomChainID() cfg := solcfg.TOMLConfig{ diff --git a/core/cmd/cosmos_keys_commands_test.go b/core/cmd/cosmos_keys_commands_test.go index 0f934a84624..eeb288d3366 100644 --- a/core/cmd/cosmos_keys_commands_test.go +++ b/core/cmd/cosmos_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestCosmosKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = "1" @@ -56,6 +58,7 @@ func TestCosmosKeyPresenter_RenderTable(t *testing.T) { } func TestShell_CosmosKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Cosmos() cleanup := func() { diff --git a/core/cmd/csa_keys_commands_test.go b/core/cmd/csa_keys_commands_test.go index aa296bd80e7..b3fcc718fd0 100644 --- a/core/cmd/csa_keys_commands_test.go +++ b/core/cmd/csa_keys_commands_test.go @@ -11,6 +11,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestCSAKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( pubKey = "somepubkey" @@ -54,6 +56,7 @@ func TestCSAKeyPresenter_RenderTable(t *testing.T) { func TestShell_ListCSAKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -72,6 +75,7 @@ func TestShell_ListCSAKeys(t *testing.T) { func TestShell_CreateCSAKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -85,6 +89,7 @@ func TestShell_CreateCSAKey(t *testing.T) { func TestShell_ImportExportCsaKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") defer deleteKeyExportFile(t) ctx := testutils.Context(t) diff --git a/core/cmd/eth_keys_commands_test.go b/core/cmd/eth_keys_commands_test.go index d8cd494babb..304ca01c683 100644 --- a/core/cmd/eth_keys_commands_test.go +++ b/core/cmd/eth_keys_commands_test.go @@ -19,6 +19,7 @@ import ( commonassets "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/cmd" @@ -32,6 +33,7 @@ func ptr[T any](t T) *T { return &t } func TestEthKeysPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( address = "0x5431F5F973781809D18643b87B44921b11355d81" @@ -88,6 +90,7 @@ func TestEthKeysPresenter_RenderTable(t *testing.T) { func TestShell_ListETHKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := newEthMock(t) ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(42), nil) @@ -113,6 +116,7 @@ func TestShell_ListETHKeys(t *testing.T) { func TestShell_ListETHKeys_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := newEthMock(t) ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(nil, errors.New("fake error")) @@ -138,6 +142,7 @@ func TestShell_ListETHKeys_Error(t *testing.T) { func TestShell_ListETHKeys_Disabled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := newEthMock(t) app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -167,6 +172,7 @@ func TestShell_ListETHKeys_Disabled(t *testing.T) { func TestShell_CreateETHKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := newEthMock(t) ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(42), nil) @@ -208,6 +214,7 @@ func TestShell_CreateETHKey(t *testing.T) { func TestShell_DeleteETHKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) @@ -240,6 +247,7 @@ func TestShell_DeleteETHKey(t *testing.T) { func TestShell_ImportExportETHKey_NoChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Cleanup(func() { deleteKeyExportFile(t) }) @@ -346,6 +354,7 @@ func TestShell_ImportExportETHKey_NoChains(t *testing.T) { } func TestShell_ImportExportETHKey_WithChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Cleanup(func() { deleteKeyExportFile(t) }) diff --git a/core/cmd/evm_transaction_commands_test.go b/core/cmd/evm_transaction_commands_test.go index 97f1b362fcd..4a0afd8c2a3 100644 --- a/core/cmd/evm_transaction_commands_test.go +++ b/core/cmd/evm_transaction_commands_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr/txmgrtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -27,6 +28,7 @@ import ( func TestShell_IndexTransactions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, r := app.NewShellAndRenderer() @@ -67,6 +69,7 @@ func TestShell_IndexTransactions(t *testing.T) { func TestShell_ShowTransaction(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, r := app.NewShellAndRenderer() @@ -92,6 +95,7 @@ func TestShell_ShowTransaction(t *testing.T) { func TestShell_IndexTxAttempts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, r := app.NewShellAndRenderer() @@ -131,6 +135,7 @@ func TestShell_IndexTxAttempts(t *testing.T) { func TestShell_SendEther_From_Txm(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) fromAddress := key.Address @@ -194,6 +199,7 @@ func TestShell_SendEther_From_Txm(t *testing.T) { func TestShell_SendEther_From_Txm_WEI(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) fromAddress := key.Address diff --git a/core/cmd/external_initiator_commands_test.go b/core/cmd/external_initiator_commands_test.go index 6231e1fe46f..a137c60bfc7 100644 --- a/core/cmd/external_initiator_commands_test.go +++ b/core/cmd/external_initiator_commands_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" @@ -15,6 +16,7 @@ import ( func TestExternalInitiatorPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( name = "ExternalInitiator 1" diff --git a/core/cmd/forwarders_commands_test.go b/core/cmd/forwarders_commands_test.go index c7dddae817b..239ad1d6c6a 100644 --- a/core/cmd/forwarders_commands_test.go +++ b/core/cmd/forwarders_commands_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/urfave/cli" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/cmd" @@ -20,6 +21,7 @@ import ( func TestEVMForwarderPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = "ID:" @@ -64,6 +66,7 @@ func TestEVMForwarderPresenter_RenderTable(t *testing.T) { func TestShell_TrackEVMForwarder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") id := newRandChainID() app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -109,6 +112,7 @@ func TestShell_TrackEVMForwarder(t *testing.T) { func TestShell_TrackEVMForwarder_BadAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") id := newRandChainID() app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -130,6 +134,7 @@ func TestShell_TrackEVMForwarder_BadAddress(t *testing.T) { func TestShell_DeleteEVMForwarders_MissingFwdId(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) diff --git a/core/cmd/jobs_commands_test.go b/core/cmd/jobs_commands_test.go index 8dc5686f567..a4978d02724 100644 --- a/core/cmd/jobs_commands_test.go +++ b/core/cmd/jobs_commands_test.go @@ -17,6 +17,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -27,6 +28,7 @@ import ( func TestJobPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = "1" @@ -91,6 +93,7 @@ func TestJobPresenter_RenderTable(t *testing.T) { func TestJobRenderer_GetTasks(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") r := &cmd.JobPresenter{} @@ -123,6 +126,7 @@ func TestJobRenderer_GetTasks(t *testing.T) { func TestJob_FriendlyTasks(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") r := &cmd.JobPresenter{} @@ -149,6 +153,7 @@ func TestJob_FriendlyTasks(t *testing.T) { func TestJob_FriendlyCreatedAt(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") now := time.Now() @@ -270,6 +275,7 @@ func TestJob_FriendlyCreatedAt(t *testing.T) { func TestJob_ToRows(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") now := time.Now() @@ -309,6 +315,7 @@ func getDirectRequestSpec() string { func TestShell_ListFindJobs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) @@ -335,6 +342,7 @@ func TestShell_ListFindJobs(t *testing.T) { func TestShell_ShowJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) @@ -368,6 +376,7 @@ var ocrBootstrapSpec string func TestShell_CreateJobV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Database.Listener.FallbackPollInterval = commonconfig.MustNewDuration(100 * time.Millisecond) @@ -406,6 +415,7 @@ func TestShell_CreateJobV2(t *testing.T) { func TestShell_DeleteJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Database.Listener.FallbackPollInterval = commonconfig.MustNewDuration(100 * time.Millisecond) diff --git a/core/cmd/node_commands_test.go b/core/cmd/node_commands_test.go index 53021b33216..3c45cad30de 100644 --- a/core/cmd/node_commands_test.go +++ b/core/cmd/node_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" configtoml "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -30,6 +31,7 @@ func assertTableRenders(t *testing.T, r *cltest.RendererMock) { func TestShell_IndexEVMNodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") chainID := newRandChainID() node1 := configtoml.Node{ @@ -108,6 +110,7 @@ func solanaStartNewApplication(t *testing.T, cfgs ...*solcfg.TOMLConfig) *cltest func TestShell_IndexSolanaNodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") id := solanatest.RandomChainID() node1 := solcfg.Node{ diff --git a/core/cmd/ocr2_keys_commands_test.go b/core/cmd/ocr2_keys_commands_test.go index c3c0c17c34e..b67235ca9ba 100644 --- a/core/cmd/ocr2_keys_commands_test.go +++ b/core/cmd/ocr2_keys_commands_test.go @@ -13,6 +13,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -23,6 +24,7 @@ import ( func TestOCR2KeyBundlePresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( bundleID = "f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5" @@ -69,6 +71,7 @@ func TestOCR2KeyBundlePresenter_RenderTable(t *testing.T) { func TestShell_OCR2Keys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().OCR2() diff --git a/core/cmd/ocr_keys_commands_test.go b/core/cmd/ocr_keys_commands_test.go index cbe15fc7808..3bc2bc76eff 100644 --- a/core/cmd/ocr_keys_commands_test.go +++ b/core/cmd/ocr_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestOCRKeyBundlePresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( bundleID = "f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5" @@ -66,6 +68,7 @@ func TestOCRKeyBundlePresenter_RenderTable(t *testing.T) { func TestShell_ListOCRKeyBundles(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -84,6 +87,7 @@ func TestShell_ListOCRKeyBundles(t *testing.T) { func TestShell_CreateOCRKeyBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, r := app.NewShellAndRenderer() @@ -103,6 +107,7 @@ func TestShell_CreateOCRKeyBundle(t *testing.T) { func TestShell_DeleteOCRKeyBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -130,6 +135,7 @@ func TestShell_DeleteOCRKeyBundle(t *testing.T) { } func TestShell_ImportExportOCRKey(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") defer deleteKeyExportFile(t) ctx := testutils.Context(t) diff --git a/core/cmd/p2p_keys_commands_test.go b/core/cmd/p2p_keys_commands_test.go index df267e08366..74a00ff2a6b 100644 --- a/core/cmd/p2p_keys_commands_test.go +++ b/core/cmd/p2p_keys_commands_test.go @@ -11,6 +11,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestP2PKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = "1" @@ -61,6 +63,7 @@ func TestP2PKeyPresenter_RenderTable(t *testing.T) { func TestShell_ListP2PKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -79,6 +82,7 @@ func TestShell_ListP2PKeys(t *testing.T) { func TestShell_CreateP2PKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -93,6 +97,7 @@ func TestShell_CreateP2PKey(t *testing.T) { func TestShell_DeleteP2PKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -120,6 +125,7 @@ func TestShell_DeleteP2PKey(t *testing.T) { func TestShell_ImportExportP2PKeyBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) defer deleteKeyExportFile(t) diff --git a/core/cmd/presenters_test.go b/core/cmd/presenters_test.go index 070930be386..00d0a1e03db 100644 --- a/core/cmd/presenters_test.go +++ b/core/cmd/presenters_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" ) func TestJAID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") jaid := cmd.JAID{ID: "1"} diff --git a/core/cmd/renderer_test.go b/core/cmd/renderer_test.go index 0cd9e75f168..5554a351cda 100644 --- a/core/cmd/renderer_test.go +++ b/core/cmd/renderer_test.go @@ -13,10 +13,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestRendererJSON_RenderVRFKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") r := cmd.RendererJSON{Writer: io.Discard} keys := []cmd.VRFKeyPresenter{ @@ -33,6 +36,7 @@ func TestRendererJSON_RenderVRFKeys(t *testing.T) { func TestRendererTable_RenderConfigurationV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) wantUser, wantEffective := app.Config.ConfigTOML() @@ -73,6 +77,7 @@ func (w *testWriter) Write(actual []byte) (int, error) { func TestRendererTable_RenderExternalInitiatorAuthentication(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") eia := webpresenters.ExternalInitiatorAuthentication{ Name: "bitcoin", @@ -106,6 +111,7 @@ func TestRendererTable_RenderExternalInitiatorAuthentication(t *testing.T) { func TestRendererTable_RenderUnknown(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") r := cmd.RendererTable{Writer: io.Discard} anon := struct{ Name string }{"Romeo"} assert.Error(t, r.Render(&anon)) diff --git a/core/cmd/shell_local_test.go b/core/cmd/shell_local_test.go index 21acc4372f0..64167bb3773 100644 --- a/core/cmd/shell_local_test.go +++ b/core/cmd/shell_local_test.go @@ -27,6 +27,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/txmgr/txmgrtest" "github.com/smartcontractkit/chainlink-framework/multinode" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/cmd" cmdMocks "github.com/smartcontractkit/chainlink/v2/core/cmd/mocks" @@ -84,6 +85,7 @@ func genTestEVMRelayers(t *testing.T, cfg chainlink.GeneralConfig, ds sqlutil.Da } func TestShell_RunNodeWithAPICredentialsFile(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string apiFile string diff --git a/core/config/config_internal_test.go b/core/config/config_internal_test.go index 41c6a4bb19d..3393a7feb42 100644 --- a/core/config/config_internal_test.go +++ b/core/config/config_internal_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/parse" ) func TestStore_bigIntParser(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val, err := parse.BigInt("0") assert.NoError(t, err) assert.Equal(t, new(big.Int).SetInt64(0), val) @@ -31,6 +33,7 @@ func TestStore_bigIntParser(t *testing.T) { } func TestStore_levelParser(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val, err := parse.LogLevel("ERROR") assert.NoError(t, err) assert.Equal(t, zapcore.ErrorLevel, val) @@ -45,6 +48,7 @@ func TestStore_levelParser(t *testing.T) { } func TestStore_urlParser(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input string @@ -72,6 +76,7 @@ func TestStore_urlParser(t *testing.T) { } func TestStore_boolParser(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val, err := parse.Bool("true") assert.NoError(t, err) assert.Equal(t, true, val) diff --git a/core/config/docs/defaults_test.go b/core/config/docs/defaults_test.go index 1f56bf9386d..fd072c4e79a 100644 --- a/core/config/docs/defaults_test.go +++ b/core/config/docs/defaults_test.go @@ -4,8 +4,10 @@ import ( "testing" "github.com/smartcontractkit/chainlink-common/pkg/config/configtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestCoreDefaults_notNil(t *testing.T) { + tests.BelongsToCISuite(t, "unit") configtest.AssertFieldsNotNil(t, CoreDefaults()) } diff --git a/core/config/docs/docs_test.go b/core/config/docs/docs_test.go index cc4d1f28948..c8234d10876 100644 --- a/core/config/docs/docs_test.go +++ b/core/config/docs/docs_test.go @@ -5,10 +5,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config/configtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/docs" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) func TestDocsTOMLComplete(t *testing.T) { + tests.BelongsToCISuite(t, "unit") configtest.AssertDocsTOMLComplete[chainlink.Config](t, docs.DocsTOML) } diff --git a/core/config/env/env_test.go b/core/config/env/env_test.go index a0e9a309ca7..41d673ab85b 100644 --- a/core/config/env/env_test.go +++ b/core/config/env/env_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNewPlugin(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tt := range []struct { name string kind string diff --git a/core/config/toml/types_test.go b/core/config/toml/types_test.go index 9134a226066..c0cc588fe72 100644 --- a/core/config/toml/types_test.go +++ b/core/config/toml/types_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/build" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/store/models" @@ -21,6 +22,7 @@ import ( ) func TestMercurySecrets_valid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ms := MercurySecrets{ Credentials: map[string]MercuryCredentials{ "cred1": { @@ -47,6 +49,7 @@ func TestMercurySecrets_valid(t *testing.T) { } func TestMercurySecrets_duplicateURLs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ms := MercurySecrets{ Credentials: map[string]MercuryCredentials{ "cred1": { @@ -68,6 +71,7 @@ func TestMercurySecrets_duplicateURLs(t *testing.T) { } func TestMercurySecrets_emptyURL(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ms := MercurySecrets{ Credentials: map[string]MercuryCredentials{ "cred1": { @@ -85,6 +89,7 @@ func TestMercurySecrets_emptyURL(t *testing.T) { func Test_validateDBURL(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -114,6 +119,7 @@ func Test_validateDBURL(t *testing.T) { } func TestDatabaseSecrets_ValidateConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validUrl := commonconfig.URL(url.URL{Scheme: "https", Host: "localhost"}) validSecretURL := *models.NewSecretURL(&validUrl) @@ -187,6 +193,7 @@ func TestDatabaseSecrets_ValidateConfig(t *testing.T) { } } func TestTracing_ValidateCollectorTarget(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string collectorTarget *string @@ -315,6 +322,7 @@ func TestTracing_ValidateCollectorTarget(t *testing.T) { } func TestTracing_ValidateSamplingRatio(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string samplingRatio *float64 @@ -375,6 +383,7 @@ func TestTracing_ValidateSamplingRatio(t *testing.T) { } func TestTracing_ValidateTLSCertPath(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // tests for Tracing.Mode = 'tls' tls_tests := []struct { name string @@ -475,6 +484,7 @@ func TestTracing_ValidateTLSCertPath(t *testing.T) { } func TestTracing_ValidateMode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string mode *string @@ -537,6 +547,7 @@ func TestTracing_ValidateMode(t *testing.T) { } func TestMercuryTLS_ValidateTLSCertPath(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string tlsCertPath *string @@ -583,6 +594,7 @@ func TestMercuryTLS_ValidateTLSCertPath(t *testing.T) { func TestEthKeys_TOMLSerialization(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("encode", func(t *testing.T) { ethKeysWrapper := EthKeys{ Keys: []*EthKey{ @@ -624,6 +636,7 @@ Password = 'something'` func TestSolKeys_TOMLSerialization(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("encode", func(t *testing.T) { solKeys := SolKeys{ @@ -666,6 +679,7 @@ Password = 'secret'` func TestSolKeys_SetFrom(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") solKeysWrapper1 := &SolKeys{} solKeysWrapper2 := SolKeys{ @@ -684,6 +698,7 @@ func TestSolKeys_SetFrom(t *testing.T) { } func TestEthKeys_SetFrom(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ethKeysWrapper1 := &EthKeys{} ethKeysWrapper2 := EthKeys{ Keys: []*EthKey{ @@ -700,6 +715,7 @@ func TestEthKeys_SetFrom(t *testing.T) { func ptr[T any](t T) *T { return &t } func TestBridgeStatusReporter_ValidateConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string config *BridgeStatusReporter diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index a69273fd199..ec53893640e 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -85,6 +85,7 @@ var oneETH = assets.Eth(*big.NewInt(1000000000000000000)) func TestIntegration_ExternalInitiatorV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -264,6 +265,7 @@ observationSource = """ func TestIntegration_AuthToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplication(t) @@ -353,6 +355,7 @@ var multiWordSpecTemplate string // Tests both single and multiple word responses - // i.e. both fulfillOracleRequest2 and fulfillOracleRequest. func TestIntegration_DirectRequest(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1761") t.Parallel() tests := []struct { @@ -501,6 +504,7 @@ func setupAppForEthTx(t *testing.T, operatorContracts OperatorContracts) (app *c } func TestIntegration_AsyncEthTx(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1767") t.Parallel() operatorContracts := setupOperatorContracts(t) @@ -1266,6 +1270,7 @@ observationSource = """ func TestIntegration_BlockHistoryEstimator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var initialDefaultGasPrice int64 = 5_000_000_000 diff --git a/core/internal/features/ocr2/features_ocr2_test.go b/core/internal/features/ocr2/features_ocr2_test.go index d6a930c0402..3b6b27d6c1c 100644 --- a/core/internal/features/ocr2/features_ocr2_test.go +++ b/core/internal/features/ocr2/features_ocr2_test.go @@ -28,6 +28,7 @@ import ( confighelper2 "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" ocrtypes2 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/keys" "github.com/smartcontractkit/chainlink-evm/pkg/transmitter" @@ -43,11 +44,13 @@ import ( func TestIntegration_OCR2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") RunTestIntegrationOCR2(t) } func TestIntegration_OCR2_ForwarderFlow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") owner, b, ocrContractAddress, ocrContract, nodeConfig := SetupOCR2Contracts(t) lggr := logger.TestLogger(t) diff --git a/core/internal/testutils/pgtest/txdb_test.go b/core/internal/testutils/pgtest/txdb_test.go index 37339bf28be..fe38e1f58ca 100644 --- a/core/internal/testutils/pgtest/txdb_test.go +++ b/core/internal/testutils/pgtest/txdb_test.go @@ -9,10 +9,12 @@ import ( "github.com/jmoiron/sqlx" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestTxDBDriver(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := NewSqlxDB(t) dropTable := func() error { _, err := db.Exec(`DROP TABLE IF EXISTS txdb_test`) diff --git a/core/logger/audit/audit_logger_test.go b/core/logger/audit/audit_logger_test.go index f3a41821b85..071c5d177a2 100644 --- a/core/logger/audit/audit_logger_test.go +++ b/core/logger/audit/audit_logger_test.go @@ -13,6 +13,7 @@ import ( "github.com/urfave/cli" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -84,6 +85,7 @@ func (c Config) JsonWrapperKey() string { func TestCheckLoginAuditLog(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // Create a channel that will be used instead of an HTTP client loggingChannel := make(chan MockedHTTPEvent, 2048) diff --git a/core/logger/disk_stats_test.go b/core/logger/disk_stats_test.go index ee0e5bbf99a..d2cd3b8cd95 100644 --- a/core/logger/disk_stats_test.go +++ b/core/logger/disk_stats_test.go @@ -4,10 +4,13 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_diskSpaceAvailable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") size, err := diskSpaceAvailable(".") assert.NoError(t, err) diff --git a/core/logger/fields_test.go b/core/logger/fields_test.go index 511756cfc13..83b4bceec91 100644 --- a/core/logger/fields_test.go +++ b/core/logger/fields_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestFields_Merge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") f1 := make(logger.Fields) f1["key1"] = "value1" @@ -38,6 +40,7 @@ func TestFields_Merge(t *testing.T) { func TestFields_Slice(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") f := make(logger.Fields) f["str"] = "foo" @@ -64,6 +67,7 @@ func TestFields_Slice(t *testing.T) { func TestFields_With(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") f := make(logger.Fields) f["str"] = "foo" diff --git a/core/logger/internal/colortest/prettyconsole_test.go b/core/logger/internal/colortest/prettyconsole_test.go index 125f5a2ea50..a472cfed3bf 100644 --- a/core/logger/internal/colortest/prettyconsole_test.go +++ b/core/logger/internal/colortest/prettyconsole_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -13,6 +14,7 @@ func init() { } func TestPrettyConsole_Write(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input string diff --git a/core/logger/logger_test.go b/core/logger/logger_test.go index db0bf5073c3..f76af060756 100644 --- a/core/logger/logger_test.go +++ b/core/logger/logger_test.go @@ -9,9 +9,11 @@ import ( "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink-common/pkg/logger/otelzap" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // no sampling assert.Nil(t, newZapConfigBase().Sampling) assert.Nil(t, newZapConfigProd(false, false).Sampling) @@ -22,6 +24,7 @@ func TestConfig(t *testing.T) { } func TestStderrWriter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sw := stderrWriter{} // Test Write @@ -35,6 +38,7 @@ func TestStderrWriter(t *testing.T) { } func TestOtelCore(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string enableOtel bool diff --git a/core/logger/null_logger_test.go b/core/logger/null_logger_test.go index 6df99942647..fe90813be5b 100644 --- a/core/logger/null_logger_test.go +++ b/core/logger/null_logger_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestNullLogger(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("names", func(t *testing.T) { t.Parallel() diff --git a/core/logger/passthrough_test.go b/core/logger/passthrough_test.go index b56880ccd45..f517b366abf 100644 --- a/core/logger/passthrough_test.go +++ b/core/logger/passthrough_test.go @@ -8,12 +8,15 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var errTest = errors.New("error") func TestLogger_Passthrough(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/logger/prometheus_test.go b/core/logger/prometheus_test.go index e1763678122..bf7078d53a6 100644 --- a/core/logger/prometheus_test.go +++ b/core/logger/prometheus_test.go @@ -9,10 +9,13 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" io_prometheus_client "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPrometheusLogger_Counters(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") createRandomNameCounter := func() prometheus.Counter { name := fmt.Sprintf("test_counter_%d", rand.Int31n(999999)) diff --git a/core/logger/sentry_test.go b/core/logger/sentry_test.go index 6d9e8fe0f1c..e7248a5828a 100644 --- a/core/logger/sentry_test.go +++ b/core/logger/sentry_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_toMap(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("with even number of keys/values", func(t *testing.T) { keysAndValues := []any{ "foo", 1, "bar", 42.43, "boggly", "str", diff --git a/core/logger/test_logger_test.go b/core/logger/test_logger_test.go index fdc059132d1..634565b0e20 100644 --- a/core/logger/test_logger_test.go +++ b/core/logger/test_logger_test.go @@ -8,6 +8,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap" "go.uber.org/zap/zapcore" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func init() { @@ -15,6 +17,7 @@ func init() { } func TestTestLogger(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lgr, observed := TestLoggerObserved(t, zapcore.DebugLevel) const ( diff --git a/core/logger/trace_noop_test.go b/core/logger/trace_noop_test.go index 0a261290a7c..42233a566c1 100644 --- a/core/logger/trace_noop_test.go +++ b/core/logger/trace_noop_test.go @@ -7,9 +7,12 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTrace(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lgr, observed := TestLoggerObserved(t, zapcore.InfoLevel) const ( diff --git a/core/logger/zap_test.go b/core/logger/zap_test.go index 655341efcd3..125d62aec79 100644 --- a/core/logger/zap_test.go +++ b/core/logger/zap_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func newTestLogger(t *testing.T, cfg Config) Logger { @@ -23,6 +25,7 @@ func newTestLogger(t *testing.T, cfg Config) Logger { } func TestZapLogger_OutOfDiskSpace(t *testing.T) { + tests.BelongsToCISuite(t, "unit") maxSize := utils.FileSize(5 * utils.MB) logsDir := t.TempDir() @@ -207,6 +210,7 @@ func TestZapLogger_OutOfDiskSpace(t *testing.T) { } func TestZapLogger_LogCaller(t *testing.T) { + tests.BelongsToCISuite(t, "unit") maxSize := utils.FileSize(5 * utils.MB) logsDir := t.TempDir() @@ -259,6 +263,7 @@ func TestZapLogger_LogCaller(t *testing.T) { } func TestZapLogger_Name(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cfg := Config{} lggr := newTestLogger(t, cfg) require.Empty(t, lggr.Name()) diff --git a/core/monitoring/utils_test.go b/core/monitoring/utils_test.go index 878f927890c..e67b4f9ed68 100644 --- a/core/monitoring/utils_test.go +++ b/core/monitoring/utils_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/attribute" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestKvMapToOtelAttributes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input map[string]string diff --git a/core/null/int64_test.go b/core/null/int64_test.go index a3cbadf4357..218e455e764 100644 --- a/core/null/int64_test.go +++ b/core/null/int64_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/null" ) func TestInt64From(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { input int64 }{ @@ -30,6 +32,7 @@ func TestInt64From(t *testing.T) { } func TestUnmarshalInt64_Valid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -49,6 +52,7 @@ func TestUnmarshalInt64_Valid(t *testing.T) { } func TestUnmarshalInt64_Invalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -67,6 +71,7 @@ func TestUnmarshalInt64_Invalid(t *testing.T) { } func TestUnmarshalInt64_Error(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -86,6 +91,7 @@ func TestUnmarshalInt64_Error(t *testing.T) { } func TestUnmarshalUint64Overflow(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Max int64 should decode successfully var i null.Int64 err := json.Unmarshal([]byte(strconv.FormatInt(math.MaxInt64, 10)), &i) @@ -97,6 +103,7 @@ func TestUnmarshalUint64Overflow(t *testing.T) { } func TestTextUnmarshalInt64_Valid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var i null.Int64 err := i.UnmarshalText([]byte("12345")) require.NoError(t, err) @@ -105,6 +112,7 @@ func TestTextUnmarshalInt64_Valid(t *testing.T) { } func TestTextUnmarshalInt64_Invalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -123,6 +131,7 @@ func TestTextUnmarshalInt64_Invalid(t *testing.T) { } func TestMarshalInt64(t *testing.T) { + tests.BelongsToCISuite(t, "unit") i := null.Int64From(12345) data, err := json.Marshal(i) require.NoError(t, err) @@ -136,6 +145,7 @@ func TestMarshalInt64(t *testing.T) { } func TestMarshalInt64Text(t *testing.T) { + tests.BelongsToCISuite(t, "unit") i := null.Int64From(12345) data, err := i.MarshalText() require.NoError(t, err) @@ -149,6 +159,7 @@ func TestMarshalInt64Text(t *testing.T) { } func TestInt64SetValid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") change := null.NewInt64(0, false) change.SetValid(12345) assert.True(t, change.Valid) @@ -156,6 +167,7 @@ func TestInt64SetValid(t *testing.T) { } func TestInt64Scan(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var i null.Int64 err := i.Scan(int(12345)) require.NoError(t, err) diff --git a/core/null/uint32_test.go b/core/null/uint32_test.go index 45a9cc223f1..32f6a9c74e9 100644 --- a/core/null/uint32_test.go +++ b/core/null/uint32_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/null" ) func TestUint32From(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { input uint32 }{ @@ -30,6 +32,7 @@ func TestUint32From(t *testing.T) { } func TestUnmarshalUint32_Valid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -49,6 +52,7 @@ func TestUnmarshalUint32_Valid(t *testing.T) { } func TestUnmarshalUint32_Invalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -67,6 +71,7 @@ func TestUnmarshalUint32_Invalid(t *testing.T) { } func TestUnmarshalUint32_Error(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -86,6 +91,7 @@ func TestUnmarshalUint32_Error(t *testing.T) { } func TestUnmarshalUint32Overflow(t *testing.T) { + tests.BelongsToCISuite(t, "unit") maxUint32 := uint64(math.MaxUint32) // Max uint32 should decode successfully @@ -99,6 +105,7 @@ func TestUnmarshalUint32Overflow(t *testing.T) { } func TestTextUnmarshalInt_Valid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var i null.Uint32 err := i.UnmarshalText([]byte("12345")) require.NoError(t, err) @@ -107,6 +114,7 @@ func TestTextUnmarshalInt_Valid(t *testing.T) { } func TestTextUnmarshalInt_Invalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name, input string }{ @@ -125,6 +133,7 @@ func TestTextUnmarshalInt_Invalid(t *testing.T) { } func TestMarshalInt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") i := null.Uint32From(12345) data, err := json.Marshal(i) require.NoError(t, err) @@ -138,6 +147,7 @@ func TestMarshalInt(t *testing.T) { } func TestMarshalIntText(t *testing.T) { + tests.BelongsToCISuite(t, "unit") i := null.Uint32From(12345) data, err := i.MarshalText() require.NoError(t, err) @@ -151,6 +161,7 @@ func TestMarshalIntText(t *testing.T) { } func TestUint32SetValid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") change := null.NewUint32(0, false) change.SetValid(12345) assert.True(t, change.Valid) @@ -158,6 +169,7 @@ func TestUint32SetValid(t *testing.T) { } func TestUint32Scan(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var i null.Uint32 err := i.Scan(12345) require.NoError(t, err) diff --git a/core/services/blockhashstore/bhs_test.go b/core/services/blockhashstore/bhs_test.go index 6effae4c914..9398b2d5b3f 100644 --- a/core/services/blockhashstore/bhs_test.go +++ b/core/services/blockhashstore/bhs_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/blockhash_store" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -24,6 +25,7 @@ import ( ) func TestStoreRotatesFromAddresses(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) ethClient := clienttest.NewClientWithDefaultChainID(t) diff --git a/core/services/blockhashstore/feeder_test.go b/core/services/blockhashstore/feeder_test.go index 736e4abe92d..21ea3795096 100644 --- a/core/services/blockhashstore/feeder_test.go +++ b/core/services/blockhashstore/feeder_test.go @@ -361,6 +361,7 @@ type testCase struct { } func TestFeeder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range tests { t.Run(test.name, test.testFeeder) } @@ -398,6 +399,7 @@ func (test testCase) testFeeder(t *testing.T) { } func TestFeederWithLogPollerVRFv1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range tests { t.Run(test.name, test.testFeederWithLogPollerVRFv1) } @@ -492,6 +494,7 @@ func (test testCase) testFeederWithLogPollerVRFv1(t *testing.T) { } func TestFeederWithLogPollerVRFv2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range tests { t.Run(test.name, test.testFeederWithLogPollerVRFv2) } @@ -590,6 +593,7 @@ func (test testCase) testFeederWithLogPollerVRFv2(t *testing.T) { } func TestFeederWithLogPollerVRFv2Plus(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range tests { t.Run(test.name, test.testFeederWithLogPollerVRFv2Plus) } @@ -688,6 +692,7 @@ func (test testCase) testFeederWithLogPollerVRFv2Plus(t *testing.T) { } func TestFeeder_CachesStoredBlocks(t *testing.T) { + tests.BelongsToCISuite(t, "unit") coordinator := &TestCoordinator{ RequestEvents: []Event{{Block: 100, ID: "1000"}}, } diff --git a/core/services/blockhashstore/validate_test.go b/core/services/blockhashstore/validate_test.go index 8dea0a6f2fa..a4a64afc878 100644 --- a/core/services/blockhashstore/validate_test.go +++ b/core/services/blockhashstore/validate_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") v1Coordinator := types.EIP55Address("0x1F72B4A5DCf7CC6d2E38423bF2f4BFA7db97d139") v2Coordinator := types.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") fromAddresses := []types.EIP55Address{("0x469aA2CD13e037DC5236320783dCfd0e641c0559")} diff --git a/core/services/blockheaderfeeder/block_header_feeder_test.go b/core/services/blockheaderfeeder/block_header_feeder_test.go index 3b6d1939c4e..6ea3e14d1cb 100644 --- a/core/services/blockheaderfeeder/block_header_feeder_test.go +++ b/core/services/blockheaderfeeder/block_header_feeder_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -35,6 +36,7 @@ type testCase struct { } func TestFeeder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []testCase{ { name: "single missing block", @@ -233,6 +235,7 @@ func (test testCase) testFeeder(t *testing.T) { } func TestFeeder_CachesStoredBlocks(t *testing.T) { + tests.BelongsToCISuite(t, "unit") coordinator := &blockhashstore.TestCoordinator{ RequestEvents: []blockhashstore.Event{{Block: 74, ID: "request"}}, } diff --git a/core/services/blockheaderfeeder/validate_test.go b/core/services/blockheaderfeeder/validate_test.go index dd48ad9face..c9415a5c91c 100644 --- a/core/services/blockheaderfeeder/validate_test.go +++ b/core/services/blockheaderfeeder/validate_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") v1Coordinator := types.EIP55Address("0x1F72B4A5DCf7CC6d2E38423bF2f4BFA7db97d139") v2Coordinator := types.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") v2PlusCoordinator := types.EIP55Address("0x92B5e28Ac583812874e4271380c7d070C5FB6E6b") diff --git a/core/services/ccip/observability_test.go b/core/services/ccip/observability_test.go index 2e8809fcbc0..3615d701a8b 100644 --- a/core/services/ccip/observability_test.go +++ b/core/services/ccip/observability_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -18,6 +19,7 @@ import ( ) func Test_MetricsAreTrackedForAllMethods(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) ccipORM, err := NewObservedORM(db, logger.TestLogger(t)) diff --git a/core/services/chainlink/config_audit_logger_test.go b/core/services/chainlink/config_audit_logger_test.go index 482968a14bc..9990625a73e 100644 --- a/core/services/chainlink/config_audit_logger_test.go +++ b/core/services/chainlink/config_audit_logger_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestAuditLoggerConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_auto_pprof_test.go b/core/services/chainlink/config_auto_pprof_test.go index ac3024c27db..ede38220a3a 100644 --- a/core/services/chainlink/config_auto_pprof_test.go +++ b/core/services/chainlink/config_auto_pprof_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestAutoPprofTest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_capabilities_test.go b/core/services/chainlink/config_capabilities_test.go index 7ff3f3fed08..5bec83c0a2c 100644 --- a/core/services/chainlink/config_capabilities_test.go +++ b/core/services/chainlink/config_capabilities_test.go @@ -8,9 +8,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/libocr/commontypes" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestCapabilitiesConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_ccv_test.go b/core/services/chainlink/config_ccv_test.go index 342f2476bf7..4e3baf38a34 100644 --- a/core/services/chainlink/config_ccv_test.go +++ b/core/services/chainlink/config_ccv_test.go @@ -4,6 +4,8 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const ( @@ -25,6 +27,7 @@ APISecret = "indexer-api-secret" ) func TestCCVConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ SecretsStrings: []string{secretsCCV}, } diff --git a/core/services/chainlink/config_cre_test.go b/core/services/chainlink/config_cre_test.go index e39aa12b78f..59cdf44dfdb 100644 --- a/core/services/chainlink/config_cre_test.go +++ b/core/services/chainlink/config_cre_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/toml" ) @@ -34,6 +35,7 @@ URL = "file:///path/to/workflows" ) func TestCREConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ SecretsStrings: []string{secretsCRE}, ConfigStrings: []string{configCRE}, @@ -55,6 +57,7 @@ func TestCREConfig(t *testing.T) { } func TestCREConfigWithFileURL(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{configCREWithFileURL}, } @@ -68,6 +71,7 @@ func TestCREConfigWithFileURL(t *testing.T) { } func TestEmptyCREConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cfg := creConfig{s: toml.CreSecrets{}, c: toml.CreConfig{}} assert.Empty(t, cfg.StreamsAPIKey()) assert.Empty(t, cfg.StreamsAPISecret()) @@ -81,6 +85,7 @@ func TestEmptyCREConfig(t *testing.T) { } func TestWorkflowFetcherConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string config string diff --git a/core/services/chainlink/config_database_test.go b/core/services/chainlink/config_database_test.go index aff1f57a8b8..deffc37a1b2 100644 --- a/core/services/chainlink/config_database_test.go +++ b/core/services/chainlink/config_database_test.go @@ -9,10 +9,12 @@ import ( pgcommon "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" ) func TestDatabaseConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, SecretsStrings: []string{`[Database] diff --git a/core/services/chainlink/config_feature_test.go b/core/services/chainlink/config_feature_test.go index 8fa5884450a..0436bf5e0fc 100644 --- a/core/services/chainlink/config_feature_test.go +++ b/core/services/chainlink/config_feature_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestFeatureConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_flux_monitor_test.go b/core/services/chainlink/config_flux_monitor_test.go index 673c4465db7..b3d79f848c8 100644 --- a/core/services/chainlink/config_flux_monitor_test.go +++ b/core/services/chainlink/config_flux_monitor_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestFluxMonitorConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_general_test.go b/core/services/chainlink/config_general_test.go index e610b7a6921..a5002ed138e 100644 --- a/core/services/chainlink/config_general_test.go +++ b/core/services/chainlink/config_general_test.go @@ -15,11 +15,13 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/config/toml" ) func TestTOMLGeneralConfig_Defaults(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config, err := GeneralConfigOpts{}.New() require.NoError(t, err) assert.Equal(t, (*url.URL)(nil), config.WebServer().BridgeResponseURL()) @@ -35,6 +37,7 @@ func TestTOMLGeneralConfig_Defaults(t *testing.T) { func TestTOMLGeneralConfig_InsecureConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("all insecure configs are false by default", func(t *testing.T) { config, err := GeneralConfigOpts{}.New() @@ -83,6 +86,7 @@ func TestTOMLGeneralConfig_InsecureConfig(t *testing.T) { } func TestValidateDB(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Setenv(string(env.Config), "") t.Run("unset db url", func(t *testing.T) { @@ -118,6 +122,7 @@ func TestValidateDB(t *testing.T) { } func TestConfig_LogSQL(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config, err := GeneralConfigOpts{}.New() require.NoError(t, err) @@ -156,6 +161,7 @@ var WebServerLDAPSecretsTOML string var WebServerOIDCSecretsTOML string func TestConfig_SecretsMerging(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("verify secrets merging in GeneralConfigOpts.New()", func(t *testing.T) { databaseSecrets, err := parseSecrets(databaseSecretsTOML) require.NoErrorf(t, err, "error: %s", err) diff --git a/core/services/chainlink/config_insecure_test.go b/core/services/chainlink/config_insecure_test.go index 72f1cf28bb8..d2bd3adad36 100644 --- a/core/services/chainlink/config_insecure_test.go +++ b/core/services/chainlink/config_insecure_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestInsecureConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_job_distributor_test.go b/core/services/chainlink/config_job_distributor_test.go index 423b3b4ca00..719835ec248 100644 --- a/core/services/chainlink/config_job_distributor_test.go +++ b/core/services/chainlink/config_job_distributor_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestJobDistributorConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_job_pipeline_test.go b/core/services/chainlink/config_job_pipeline_test.go index 9a865569eb3..3a92ceef637 100644 --- a/core/services/chainlink/config_job_pipeline_test.go +++ b/core/services/chainlink/config_job_pipeline_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/require" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestJobPipelineConfigTest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_keeper_test.go b/core/services/chainlink/config_keeper_test.go index 7fd571c8880..220367116b6 100644 --- a/core/services/chainlink/config_keeper_test.go +++ b/core/services/chainlink/config_keeper_test.go @@ -6,9 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestKeeperConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_log_test.go b/core/services/chainlink/config_log_test.go index bc5828a2056..9c49f4853f1 100644 --- a/core/services/chainlink/config_log_test.go +++ b/core/services/chainlink/config_log_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestLogConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_mercury_test.go b/core/services/chainlink/config_mercury_test.go index 1ae8dc0ba2e..8f9bc402a58 100644 --- a/core/services/chainlink/config_mercury_test.go +++ b/core/services/chainlink/config_mercury_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/toml" ) @@ -26,6 +27,7 @@ Password = "password2" ) func TestMercuryConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ SecretsStrings: []string{secretsMercury}, } @@ -38,6 +40,7 @@ func TestMercuryConfig(t *testing.T) { } func TestMercuryTLS(t *testing.T) { + tests.BelongsToCISuite(t, "unit") certPath := "/path/to/cert.pem" transmission := toml.Mercury{ TLS: toml.MercuryTLS{ diff --git a/core/services/chainlink/config_ocr2_test.go b/core/services/chainlink/config_ocr2_test.go index ebaef4e7f0b..b6207ef4e32 100644 --- a/core/services/chainlink/config_ocr2_test.go +++ b/core/services/chainlink/config_ocr2_test.go @@ -5,9 +5,12 @@ import ( "time" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCR2Config(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_ocr_test.go b/core/services/chainlink/config_ocr_test.go index 0a3038f1d34..be603c0e657 100644 --- a/core/services/chainlink/config_ocr_test.go +++ b/core/services/chainlink/config_ocr_test.go @@ -5,9 +5,12 @@ import ( "time" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCRConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_p2p_test.go b/core/services/chainlink/config_p2p_test.go index 12ee01b85d7..d6da4f5fab6 100644 --- a/core/services/chainlink/config_p2p_test.go +++ b/core/services/chainlink/config_p2p_test.go @@ -8,9 +8,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/libocr/commontypes" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestP2PConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_password_test.go b/core/services/chainlink/config_password_test.go index fddcea0936b..c73cada995e 100644 --- a/core/services/chainlink/config_password_test.go +++ b/core/services/chainlink/config_password_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPasswordConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_prometheus_test.go b/core/services/chainlink/config_prometheus_test.go index 654a07e1824..b9fee806946 100644 --- a/core/services/chainlink/config_prometheus_test.go +++ b/core/services/chainlink/config_prometheus_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPrometheusConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_pyroscope_test.go b/core/services/chainlink/config_pyroscope_test.go index 33078f41621..4b7055eccc0 100644 --- a/core/services/chainlink/config_pyroscope_test.go +++ b/core/services/chainlink/config_pyroscope_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPyroscopeConfigTest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, SecretsStrings: []string{secretsFullTOML}, diff --git a/core/services/chainlink/config_telemetry_ingress_test.go b/core/services/chainlink/config_telemetry_ingress_test.go index 2bcdf3c80b1..109a719ff38 100644 --- a/core/services/chainlink/config_telemetry_ingress_test.go +++ b/core/services/chainlink/config_telemetry_ingress_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/toml" ) func TestTelemetryIngressConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } @@ -36,6 +38,7 @@ func TestTelemetryIngressConfig(t *testing.T) { } func TestTelemetryIngressConfig_ChipIngressEnabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("returns false when ChipIngressEnabled is explicitly false", func(t *testing.T) { falseVal := false config := &telemetryIngressConfig{ diff --git a/core/services/chainlink/config_telemetry_test.go b/core/services/chainlink/config_telemetry_test.go index 6fbeabf2c62..507e5842f56 100644 --- a/core/services/chainlink/config_telemetry_test.go +++ b/core/services/chainlink/config_telemetry_test.go @@ -8,11 +8,13 @@ import ( "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/static" ) func TestTelemetryConfig_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") trueVal := true falseVal := false @@ -34,6 +36,7 @@ func TestTelemetryConfig_Enabled(t *testing.T) { } func TestTelemetryConfig_InsecureConnection(t *testing.T) { + tests.BelongsToCISuite(t, "unit") trueVal := true falseVal := false @@ -55,6 +58,7 @@ func TestTelemetryConfig_InsecureConnection(t *testing.T) { } func TestTelemetryConfig_CACertFile(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -73,6 +77,7 @@ func TestTelemetryConfig_CACertFile(t *testing.T) { } func TestTelemetryConfig_OtelExporterGRPCEndpoint(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -91,6 +96,7 @@ func TestTelemetryConfig_OtelExporterGRPCEndpoint(t *testing.T) { } func TestTelemetryConfig_ResourceAttributes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -128,6 +134,7 @@ func TestTelemetryConfig_ResourceAttributes(t *testing.T) { } func TestTelemetryConfig_TraceSampleRatio(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -145,6 +152,7 @@ func TestTelemetryConfig_TraceSampleRatio(t *testing.T) { } func TestTelemetryConfig_EmitterBatchProcessor(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -163,6 +171,7 @@ func TestTelemetryConfig_EmitterBatchProcessor(t *testing.T) { } func TestTelemetryConfig_EmitterExportTimeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -182,6 +191,7 @@ func TestTelemetryConfig_EmitterExportTimeout(t *testing.T) { } func TestTelemetryConfig_ChipIngressEndpoint(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -201,6 +211,7 @@ func TestTelemetryConfig_ChipIngressEndpoint(t *testing.T) { } func TestTelemetryConfig_ChipIngressInsecureConnection(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -227,6 +238,7 @@ func ptrFloat(f float64) *float64 { } func TestTelemetryConfig_HeartbeatInterval(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -246,6 +258,7 @@ func TestTelemetryConfig_HeartbeatInterval(t *testing.T) { } func TestTelemetryConfig_LogStreamingEnabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -264,6 +277,7 @@ func TestTelemetryConfig_LogStreamingEnabled(t *testing.T) { } func TestTelemetryConfig_LogLevel(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -286,6 +300,7 @@ func TestTelemetryConfig_LogLevel(t *testing.T) { } func TestTelemetryConfig_LogBatchProcessor(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -305,6 +320,7 @@ func TestTelemetryConfig_LogBatchProcessor(t *testing.T) { } func TestTelemetryConfig_LogExportTimeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -322,6 +338,7 @@ func TestTelemetryConfig_LogExportTimeout(t *testing.T) { } } func TestTelemetryConfig_LogExportMaxBatchSize(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -344,6 +361,7 @@ func ptrInt(i int) *int { } func TestTelemetryConfig_LogExportInterval(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry @@ -362,6 +380,7 @@ func TestTelemetryConfig_LogExportInterval(t *testing.T) { } func TestTelemetryConfig_LogMaxQueueSize(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string telemetry toml.Telemetry diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index c6a5fa5f770..0776374a561 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -33,6 +33,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -221,6 +222,7 @@ var ( ) func TestConfig_Marshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") zeroSeconds := *commoncfg.MustNewDuration(time.Second * 0) second := *commoncfg.MustNewDuration(time.Second) minute := *commoncfg.MustNewDuration(time.Minute) @@ -1471,6 +1473,7 @@ ReaperMaxAge = '678h0m0s' } func TestConfig_full(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var got Config require.NoError(t, commoncfg.DecodeTOML(strings.NewReader(fullTOML), &got)) // Except for some EVM node fields. @@ -1551,6 +1554,7 @@ func TestConfig_full(t *testing.T) { var invalidTOML string func TestConfig_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tt := range []struct { name string toml string @@ -1706,6 +1710,7 @@ var ( ) func Test_generalConfig_LogConfiguration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") const ( secrets = "# Secrets:\n" input = "# Input Configuration:\n" @@ -1778,6 +1783,7 @@ func Test_generalConfig_LogConfiguration(t *testing.T) { } func TestNewGeneralConfig_ParsingError_InvalidSyntax(t *testing.T) { + tests.BelongsToCISuite(t, "unit") invalidTOML := "{ bad syntax {" opts := GeneralConfigOpts{ ConfigStrings: []string{invalidTOML}, @@ -1788,6 +1794,7 @@ func TestNewGeneralConfig_ParsingError_InvalidSyntax(t *testing.T) { } func TestNewGeneralConfig_ParsingError_DuplicateField(t *testing.T) { + tests.BelongsToCISuite(t, "unit") invalidTOML := `Dev = false Dev = true` opts := GeneralConfigOpts{ @@ -1799,6 +1806,7 @@ Dev = true` } func TestNewGeneralConfig_SecretsOverrides(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Provide a keystore password file and an env var with DB URL const PWD_OVERRIDE = "great_password" const DBURL_OVERRIDE = "http://user@db" @@ -1819,6 +1827,7 @@ func TestNewGeneralConfig_SecretsOverrides(t *testing.T) { } func TestSecrets_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tt := range []struct { name string toml string @@ -1838,25 +1847,25 @@ BackupURL = "foo-bar?password=asdf" AllowSimplePasswords = false`, exp: `invalid secrets: 2 errors: - Database: 2 errors: - - URL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: + - URL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - - - BackupURL: invalid value (*****): missing or insufficiently complex password: + + - BackupURL: invalid value (*****): missing or insufficiently complex password: Expected password complexity: Must be at least 16 characters long Must not comprise: Leading or trailing whitespace A user's API email - + Faults: password is less than 16 characters long - . Database should be secured by a password matching the following complexity requirements: + . Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - + - Password.Keystore: empty: must be provided and non-empty`}, {name: "invalid-urls-allowed", @@ -1883,6 +1892,7 @@ func assertValidationError(t *testing.T, invalid interface{ Validate() error }, } func TestConfig_setDefaults(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var c Config c.EVM = evmcfg.EVMConfigs{{ChainID: ubig.NewI(99999133712345)}} c.Cosmos = RawConfigs{{"ChainID": ptr("unknown cosmos chain")}} @@ -1897,6 +1907,7 @@ func TestConfig_setDefaults(t *testing.T) { } func Test_validateEnv(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Setenv("LOG_LEVEL", "warn") t.Setenv("DATABASE_URL", "foo") assert.ErrorContains(t, validateEnv(), `invalid environment: 2 errors: @@ -1914,6 +1925,7 @@ func Test_validateEnv(t *testing.T) { func TestConfig_SetFrom(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") for _, tt := range []struct { name string exp string @@ -1941,6 +1953,7 @@ func TestConfig_SetFrom(t *testing.T) { } func TestConfig_warnings(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string config Config @@ -1989,6 +2002,7 @@ func mustHexToBig(t *testing.T, hx string) *big.Int { } func TestRawConfig_IsEnabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.True(t, RawConfig{"Enabled": true}.IsEnabled()) assert.True(t, RawConfig{"Enabled": nil}.IsEnabled()) assert.True(t, RawConfig{}.IsEnabled()) @@ -1998,6 +2012,7 @@ func TestRawConfig_IsEnabled(t *testing.T) { } func TestRawConfig_SetDefaults(t *testing.T) { + tests.BelongsToCISuite(t, "unit") c := RawConfig{"Enabled": true} c.SetDefaults() require.NotContains(t, c, "Enabled") diff --git a/core/services/chainlink/config_threshold_test.go b/core/services/chainlink/config_threshold_test.go index d847f65e3ed..9c6503c600e 100644 --- a/core/services/chainlink/config_threshold_test.go +++ b/core/services/chainlink/config_threshold_test.go @@ -5,6 +5,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const ( @@ -15,6 +17,7 @@ ThresholdKeyShare = "something" ) func TestThresholdConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ SecretsStrings: []string{thresholdSecrets}, } diff --git a/core/services/chainlink/config_tracing_test.go b/core/services/chainlink/config_tracing_test.go index 37653729cf3..1e08dc5a4e8 100644 --- a/core/services/chainlink/config_tracing_test.go +++ b/core/services/chainlink/config_tracing_test.go @@ -5,10 +5,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/toml" ) func TestTracing_Config(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Test when all fields are non-nil enabled := true collectorTarget := "http://localhost:9000" diff --git a/core/services/chainlink/config_web_server_test.go b/core/services/chainlink/config_web_server_test.go index d96e6c05d5e..8db1f993a74 100644 --- a/core/services/chainlink/config_web_server_test.go +++ b/core/services/chainlink/config_web_server_test.go @@ -8,9 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestWebServerConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") opts := GeneralConfigOpts{ ConfigStrings: []string{fullTOML}, } diff --git a/core/services/chainlink/config_workflows_test.go b/core/services/chainlink/config_workflows_test.go index 6912b409b25..e8df93403d1 100644 --- a/core/services/chainlink/config_workflows_test.go +++ b/core/services/chainlink/config_workflows_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestWorkflowsConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") workflowsTOML := `[Workflows] [Workflows.Limits] Global = 200 diff --git a/core/services/chainlink/heartbeat_test.go b/core/services/chainlink/heartbeat_test.go index c494b3f9094..9d8fc4e545b 100644 --- a/core/services/chainlink/heartbeat_test.go +++ b/core/services/chainlink/heartbeat_test.go @@ -15,12 +15,14 @@ import ( "go.opentelemetry.io/otel/metric/noop" "github.com/smartcontractkit/chainlink-common/pkg/beholder" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) func TestNewHeartbeat_ConfiguresHeartbeatInterval(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -52,6 +54,7 @@ func TestNewHeartbeat_ConfiguresHeartbeatInterval(t *testing.T) { } func TestHeartbeat_MeterEvents(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) // Use a thread-safe byte collector diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index 6bfe29050d7..3217172440a 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -33,6 +34,7 @@ import ( ) func TestCoreRelayerChainInteroperators(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") evmChainID1, evmChainID2 := ubig.New(big.NewInt(1)), ubig.New(big.NewInt(2)) solanaChainID1, solanaChainID2 := "solana-id-1", "solana-id-2" diff --git a/core/services/chainlink/secret_generator_test.go b/core/services/chainlink/secret_generator_test.go index 115884d7901..678d8ecef18 100644 --- a/core/services/chainlink/secret_generator_test.go +++ b/core/services/chainlink/secret_generator_test.go @@ -4,10 +4,13 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestFilePersistedSecretGenerator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") rootDir := t.TempDir() var secretGenerator FilePersistedSecretGenerator diff --git a/core/services/cresettings/validate_test.go b/core/services/cresettings/validate_test.go index cd9a71eec4b..090463d672b 100644 --- a/core/services/cresettings/validate_test.go +++ b/core/services/cresettings/validate_test.go @@ -7,10 +7,12 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestValidatedCRESettingsSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") settingsString := `Foo = "bar" ` noHash := fmt.Sprintf(`type = "cresettings" diff --git a/core/services/cron/cron_test.go b/core/services/cron/cron_test.go index 38684e982d9..701d04c8512 100644 --- a/core/services/cron/cron_test.go +++ b/core/services/cron/cron_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -21,6 +22,7 @@ import ( ) func TestCronV2Pipeline(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") runner := pipelinemocks.NewRunner(t) cfg := configtest.NewTestGeneralConfig(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/directrequest/delegate_test.go b/core/services/directrequest/delegate_test.go index e2b4f0c54eb..418f02b7560 100644 --- a/core/services/directrequest/delegate_test.go +++ b/core/services/directrequest/delegate_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/operatorforwarder/generated/operator" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/log" @@ -40,6 +41,7 @@ import ( ) func TestDelegate_ServicesForSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ethClient := clienttest.NewClientWithDefaultChainID(t) runner := pipeline_mocks.NewRunner(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/directrequest/validate_test.go b/core/services/directrequest/validate_test.go index 91cd7ece712..825e523ec6c 100644 --- a/core/services/directrequest/validate_test.go +++ b/core/services/directrequest/validate_test.go @@ -6,10 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidatedDirectRequestSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") toml := ` type = "directrequest" @@ -39,6 +42,7 @@ observationSource = """ func TestValidatedDirectRequestSpec_MinIncomingConfirmations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("no minIncomingConfirmations specified", func(t *testing.T) { t.Parallel() diff --git a/core/services/feeds/connection_manager_test.go b/core/services/feeds/connection_manager_test.go index b2d592983af..b0b9ffd7cd0 100644 --- a/core/services/feeds/connection_manager_test.go +++ b/core/services/feeds/connection_manager_test.go @@ -2,9 +2,12 @@ package feeds import ( "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_connectionsManager_IsConnected(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { connections map[int64]*connection } diff --git a/core/services/feeds/models_test.go b/core/services/feeds/models_test.go index 908751d6d8e..07947c31e91 100644 --- a/core/services/feeds/models_test.go +++ b/core/services/feeds/models_test.go @@ -7,10 +7,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_NewChainType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -60,6 +63,7 @@ func Test_NewChainType(t *testing.T) { func Test_ToPluginType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pt, err := ToPluginType("commit") require.NoError(t, err) @@ -89,6 +93,7 @@ func Test_ToPluginType(t *testing.T) { func Test_FromPluginType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") assert.Equal(t, "commit", FromPluginTypeInput(PluginTypeCommit)) assert.Equal(t, "execute", FromPluginTypeInput(PluginTypeExecute)) @@ -100,6 +105,7 @@ func Test_FromPluginType(t *testing.T) { func Test_FluxMonitorConfig_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") cfg := FluxMonitorConfig{Enabled: true} want := `{"enabled":true}` @@ -115,6 +121,7 @@ func Test_FluxMonitorConfig_Value(t *testing.T) { func Test_FluxMonitorConfig_Scan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( give = `{"enabled":true}` @@ -130,6 +137,7 @@ func Test_FluxMonitorConfig_Scan(t *testing.T) { func Test_OCR1Config_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( multiaddr = "multiaddr" @@ -192,6 +200,7 @@ func Test_OCR1Config_Value(t *testing.T) { func Test_OCR1Config_Scan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( multiaddr = "multiaddr" @@ -252,6 +261,7 @@ func Test_OCR1Config_Scan(t *testing.T) { func Test_Plugins_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( give = Plugins{ @@ -275,6 +285,7 @@ func Test_Plugins_Value(t *testing.T) { func Test_Plugins_Scan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( give = `{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":false}` @@ -296,6 +307,7 @@ func Test_Plugins_Scan(t *testing.T) { func Test_OCR2Config_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( give = OCR2ConfigModel{ @@ -327,6 +339,7 @@ func Test_OCR2Config_Value(t *testing.T) { func Test_OCR2Config_Scan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( give = `{"enabled":true,"is_bootstrap":false,"multiaddr":"multiaddr","forwarder_address":"forwarderaddress","p2p_peer_id":"peerid","key_bundle_id":"ocrkeyid","plugins":{"commit":true,"execute":true,"median":false,"mercury":true,"rebalancer":false}}` @@ -356,6 +369,7 @@ func Test_OCR2Config_Scan(t *testing.T) { func Test_JobProposal_CanEditDefinition(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -397,6 +411,7 @@ func Test_JobProposal_CanEditDefinition(t *testing.T) { // Test_toMetrics tests the toMetrics method func Test_toMetrics(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") jpCounts := JobProposalCounts{ Cancelled: 0, diff --git a/core/services/feeds/orm_test.go b/core/services/feeds/orm_test.go index bb2009399a6..c4cfd5e3ec2 100644 --- a/core/services/feeds/orm_test.go +++ b/core/services/feeds/orm_test.go @@ -12,6 +12,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -54,6 +55,7 @@ func setupORM(t *testing.T) *TestORM { func Test_ORM_CreateManager_CountManagers(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -81,6 +83,7 @@ func Test_ORM_CreateManager_CountManagers(t *testing.T) { func Test_ORM_CreateManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -108,6 +111,7 @@ func Test_ORM_CreateManager(t *testing.T) { func Test_ORM_GetManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -137,6 +141,7 @@ func Test_ORM_GetManager(t *testing.T) { func Test_ORM_ListManagers(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -165,6 +170,7 @@ func Test_ORM_ListManagers(t *testing.T) { func Test_ORM_ListManagersByIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -193,6 +199,7 @@ func Test_ORM_ListManagersByIDs(t *testing.T) { func Test_ORM_UpdateManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -227,6 +234,7 @@ func Test_ORM_UpdateManager(t *testing.T) { func Test_ORM_EnableAndDisableManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -257,6 +265,7 @@ func Test_ORM_EnableAndDisableManager(t *testing.T) { func Test_ORM_CreateChainConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -307,6 +316,7 @@ func Test_ORM_CreateChainConfig(t *testing.T) { func Test_ORM_CreateBatchChainConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -371,6 +381,7 @@ func Test_ORM_CreateBatchChainConfig(t *testing.T) { func Test_ORM_DeleteChainConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -401,6 +412,7 @@ func Test_ORM_DeleteChainConfig(t *testing.T) { func Test_ORM_ListChainConfigsByManagerIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -452,6 +464,7 @@ func Test_ORM_ListChainConfigsByManagerIDs(t *testing.T) { func Test_ORM_UpdateChainConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -515,6 +528,7 @@ func Test_ORM_UpdateChainConfig(t *testing.T) { func Test_ORM_CreateJobProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -549,6 +563,7 @@ func Test_ORM_CreateJobProposal(t *testing.T) { func Test_ORM_GetJobProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -614,6 +629,7 @@ func Test_ORM_GetJobProposal(t *testing.T) { func Test_ORM_CountJobProposalsByStatus(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string @@ -808,6 +824,7 @@ func Test_ORM_CountJobProposalsByStatus(t *testing.T) { func Test_ORM_ListJobProposalByManagersIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -841,6 +858,7 @@ func Test_ORM_ListJobProposalByManagersIDs(t *testing.T) { func Test_ORM_UpdateJobProposalStatus(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -863,6 +881,7 @@ func Test_ORM_UpdateJobProposalStatus(t *testing.T) { func Test_ORM_UpsertJobProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -981,6 +1000,7 @@ func Test_ORM_UpsertJobProposal(t *testing.T) { func Test_ORM_ApproveSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1023,6 +1043,7 @@ func Test_ORM_ApproveSpec(t *testing.T) { func Test_ORM_CancelSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string @@ -1096,6 +1117,7 @@ func Test_ORM_CancelSpec(t *testing.T) { func Test_ORM_DeleteProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string @@ -1251,6 +1273,7 @@ func Test_ORM_DeleteProposal(t *testing.T) { func Test_ORM_RevokeSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string @@ -1371,6 +1394,7 @@ func Test_ORM_RevokeSpec(t *testing.T) { func Test_ORM_ExistsSpecByJobProposalIDAndVersion(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1392,6 +1416,7 @@ func Test_ORM_ExistsSpecByJobProposalIDAndVersion(t *testing.T) { func Test_ORM_GetSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1412,6 +1437,7 @@ func Test_ORM_GetSpec(t *testing.T) { func Test_ORM_GetApprovedSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1448,6 +1474,7 @@ func Test_ORM_GetApprovedSpec(t *testing.T) { func Test_ORM_GetLatestSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1477,6 +1504,7 @@ func Test_ORM_GetLatestSpec(t *testing.T) { func Test_ORM_ListSpecsByJobProposalIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1512,6 +1540,7 @@ func Test_ORM_ListSpecsByJobProposalIDs(t *testing.T) { func Test_ORM_RejectSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string @@ -1620,6 +1649,7 @@ func Test_ORM_RejectSpec(t *testing.T) { func Test_ORM_UpdateSpecDefinition(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1651,6 +1681,7 @@ func Test_ORM_UpdateSpecDefinition(t *testing.T) { func Test_ORM_IsJobManaged(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -1685,6 +1716,7 @@ func Test_ORM_IsJobManaged(t *testing.T) { func Test_ORM_IsJobManagedByFeedsManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( diff --git a/core/services/feeds/rpc_handlers_test.go b/core/services/feeds/rpc_handlers_test.go index a9c8f680d8d..a4063a584ae 100644 --- a/core/services/feeds/rpc_handlers_test.go +++ b/core/services/feeds/rpc_handlers_test.go @@ -7,6 +7,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" pb "github.com/smartcontractkit/chainlink-protos/orchestrator/feedsmanager" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -36,6 +37,7 @@ func setupTestHandlers(t *testing.T) *TestRPCHandlers { } func Test_RPCHandlers_ProposeJob(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) jobID = uuid.New() @@ -63,6 +65,7 @@ func Test_RPCHandlers_ProposeJob(t *testing.T) { } func Test_RPCHandlers_DeleteJob(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) jobID = uuid.New() @@ -83,6 +86,7 @@ func Test_RPCHandlers_DeleteJob(t *testing.T) { } func Test_RPCHandlers_RevokeJob(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) jobID = uuid.New() @@ -103,6 +107,7 @@ func Test_RPCHandlers_RevokeJob(t *testing.T) { } func Test_RPCHandlers_GetJobRuns(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) jobID = uuid.New() @@ -158,6 +163,7 @@ func Test_RPCHandlers_GetJobRuns(t *testing.T) { } func Test_RPCHandlers_GetJobRuns_InvalidUUID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) h := setupTestHandlers(t) @@ -171,6 +177,7 @@ func Test_RPCHandlers_GetJobRuns_InvalidUUID(t *testing.T) { } func Test_RPCHandlers_GetJobRuns_DefaultLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) jobID = uuid.New() @@ -193,6 +200,7 @@ func Test_RPCHandlers_GetJobRuns_DefaultLimit(t *testing.T) { } func Test_RPCHandlers_GetJobRuns_ExceedsMaxLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) jobID = uuid.New() diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index a731c03a1a7..5854918d5c0 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -33,6 +33,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/types" evmbig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -273,6 +274,7 @@ func setupTestServiceCfg( func Test_Service_RegisterManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = int64(1) @@ -320,6 +322,7 @@ func Test_Service_RegisterManager(t *testing.T) { func Test_Service_RegisterManager_MultiFeedsManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = int64(1) @@ -371,6 +374,7 @@ func Test_Service_RegisterManager_MultiFeedsManager(t *testing.T) { func Test_Service_RegisterManager_InvalidCreateManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( id = int64(1) @@ -414,6 +418,7 @@ func Test_Service_RegisterManager_InvalidCreateManager(t *testing.T) { func Test_Service_RegisterManager_DuplicateFeedsManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pubKeyHex := "0f17c3bf72de8beef6e2d17a14c0a972f5d7e0e66e70722373f12b88382d40f9" var pubKey crypto.PublicKey @@ -451,6 +456,7 @@ func Test_Service_RegisterManager_DuplicateFeedsManager(t *testing.T) { func Test_Service_ListManagers(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -470,6 +476,7 @@ func Test_Service_ListManagers(t *testing.T) { func Test_Service_GetManager(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -489,6 +496,7 @@ func Test_Service_GetManager(t *testing.T) { } func Test_Service_UpdateFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") mgr := feeds.FeedsManager{ID: 1} svc := setupTestService(t) diff --git a/core/services/fluxmonitorv2/contract_submitter_test.go b/core/services/fluxmonitorv2/contract_submitter_test.go index 7dfd92e5acd..1601681bc3c 100644 --- a/core/services/fluxmonitorv2/contract_submitter_test.go +++ b/core/services/fluxmonitorv2/contract_submitter_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2" @@ -16,6 +17,7 @@ import ( func TestFluxAggregatorContractSubmitter_Submit(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( fluxAggregator = mocks.NewFluxAggregator(t) orm = fmmocks.NewORM(t) diff --git a/core/services/fluxmonitorv2/deviation_checker_test.go b/core/services/fluxmonitorv2/deviation_checker_test.go index 66b813daa1b..933bb93b78a 100644 --- a/core/services/fluxmonitorv2/deviation_checker_test.go +++ b/core/services/fluxmonitorv2/deviation_checker_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/quarantine" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2" ) @@ -29,6 +30,7 @@ func (o outsideDeviationRow) String() string { } func TestDeviationChecker_OutsideDeviation(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1856") t.Parallel() diff --git a/core/services/fluxmonitorv2/flags_test.go b/core/services/fluxmonitorv2/flags_test.go index 33f8f8781cd..ac12d63163b 100644 --- a/core/services/fluxmonitorv2/flags_test.go +++ b/core/services/fluxmonitorv2/flags_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -15,6 +16,7 @@ import ( func TestFlags_IsLowered(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string diff --git a/core/services/fluxmonitorv2/flux_monitor_test.go b/core/services/fluxmonitorv2/flux_monitor_test.go index 3745eeab688..d5e95eb4d0a 100644 --- a/core/services/fluxmonitorv2/flux_monitor_test.go +++ b/core/services/fluxmonitorv2/flux_monitor_test.go @@ -294,6 +294,7 @@ func setupFullDBWithKey(t *testing.T) (*sqlx.DB, common.Address) { func TestFluxMonitor_PollIfEligible(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string eligible bool @@ -502,6 +503,7 @@ func TestFluxMonitor_PollIfEligible(t *testing.T) { // incorrect address) then the pollIfEligible method should create a JobErr record func TestFluxMonitor_PollIfEligible_Creates_JobErr(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db, nodeAddr := setupStoreWithKey(t) oracles := []common.Address{nodeAddr, testutils.NewAddress()} @@ -534,6 +536,7 @@ func TestFluxMonitor_PollIfEligible_Creates_JobErr(t *testing.T) { func TestPollingDeviationChecker_BuffersLogs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db, nodeAddr := setupStoreWithKey(t) oracles := []common.Address{nodeAddr, testutils.NewAddress()} @@ -734,6 +737,7 @@ func TestPollingDeviationChecker_BuffersLogs(t *testing.T) { func TestFluxMonitor_TriggerIdleTimeThreshold(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) testCases := []struct { @@ -825,6 +829,7 @@ func TestFluxMonitor_TriggerIdleTimeThreshold(t *testing.T) { func TestFluxMonitor_HibernationTickerFiresMultipleTimes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) db, nodeAddr := setupStoreWithKey(t) @@ -909,6 +914,7 @@ func TestFluxMonitor_HibernationTickerFiresMultipleTimes(t *testing.T) { } func TestFluxMonitor_HibernationIsEnteredAndRetryTickerStopped(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1806") t.Parallel() db, nodeAddr := setupFullDBWithKey(t) @@ -1029,6 +1035,7 @@ func TestFluxMonitor_HibernationIsEnteredAndRetryTickerStopped(t *testing.T) { } func TestFluxMonitor_IdleTimerResetsOnNewRound(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1857") t.Parallel() @@ -1135,6 +1142,7 @@ func TestFluxMonitor_IdleTimerResetsOnNewRound(t *testing.T) { func TestFluxMonitor_RoundTimeoutCausesPoll_timesOutAtZero(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) db, nodeAddr := setupStoreWithKey(t) @@ -1181,6 +1189,7 @@ func TestFluxMonitor_RoundTimeoutCausesPoll_timesOutAtZero(t *testing.T) { } func TestFluxMonitor_UsesPreviousRoundStateOnStartup_RoundTimeout(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1845") t.Parallel() g := gomega.NewWithT(t) @@ -1244,6 +1253,7 @@ func TestFluxMonitor_UsesPreviousRoundStateOnStartup_RoundTimeout(t *testing.T) func TestFluxMonitor_UsesPreviousRoundStateOnStartup_IdleTimer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) db, nodeAddr := setupStoreWithKey(t) @@ -1321,6 +1331,7 @@ func TestFluxMonitor_UsesPreviousRoundStateOnStartup_IdleTimer(t *testing.T) { func TestFluxMonitor_RoundTimeoutCausesPoll_timesOutNotZero(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) db, nodeAddr := setupStoreWithKey(t) @@ -1396,6 +1407,7 @@ func TestFluxMonitor_RoundTimeoutCausesPoll_timesOutNotZero(t *testing.T) { func TestFluxMonitor_ConsumeLogBroadcast(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) fm, tm := setup(t, db) @@ -1415,6 +1427,7 @@ func TestFluxMonitor_ConsumeLogBroadcast(t *testing.T) { func TestFluxMonitor_ConsumeLogBroadcast_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string @@ -1442,6 +1455,7 @@ func TestFluxMonitor_ConsumeLogBroadcast_Error(t *testing.T) { func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("when NewRound log arrives, then poll ticker fires", func(t *testing.T) { db, nodeAddr := setupStoreWithKey(t) oracles := []common.Address{nodeAddr, testutils.NewAddress()} @@ -1819,6 +1833,7 @@ func TestFluxMonitor_DoesNotDoubleSubmit(t *testing.T) { // with the same unexpected call). func TestFluxMonitor_DrumbeatTicker(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db, nodeAddr := setupStoreWithKey(t) oracles := []common.Address{nodeAddr, testutils.NewAddress()} diff --git a/core/services/fluxmonitorv2/integrations_test.go b/core/services/fluxmonitorv2/integrations_test.go index dee82f72e55..037f97360e4 100644 --- a/core/services/fluxmonitorv2/integrations_test.go +++ b/core/services/fluxmonitorv2/integrations_test.go @@ -436,6 +436,7 @@ func checkLogWasConsumed(t *testing.T, fa fluxAggregatorUniverse, ds sqlutil.Dat } func TestFluxMonitor_Deviation(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1763") tests := []struct { name string @@ -621,6 +622,7 @@ func TestFluxMonitor_Deviation(t *testing.T) { } func TestFluxMonitor_NewRound(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1865") g := gomega.NewWithT(t) fa := setupFluxAggregatorUniverse(t) @@ -733,6 +735,7 @@ ds1 -> ds1_parse } func TestFluxMonitor_HibernationMode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) fa := setupFluxAggregatorUniverse(t) @@ -849,6 +852,7 @@ ds1 -> ds1_parse } func TestFluxMonitor_InvalidSubmission(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // 8 decimals places used for prices. fa := setupFluxAggregatorUniverse(t, WithMinMaxSubmission( big.NewInt(100000000), // 1 * 10^8 @@ -927,6 +931,7 @@ ds1 -> ds1_parse } func TestFluxMonitorAntiSpamLogic(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // - deploy a brand new FM contract fa := setupFluxAggregatorUniverse(t) diff --git a/core/services/fluxmonitorv2/key_store_test.go b/core/services/fluxmonitorv2/key_store_test.go index 78804343981..d28368158d8 100644 --- a/core/services/fluxmonitorv2/key_store_test.go +++ b/core/services/fluxmonitorv2/key_store_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -13,6 +14,7 @@ import ( func TestKeyStore_EnabledKeysForChain(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) @@ -42,6 +44,7 @@ func TestKeyStore_EnabledKeysForChain(t *testing.T) { func TestKeyStore_GetRoundRobinAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) diff --git a/core/services/fluxmonitorv2/orm_test.go b/core/services/fluxmonitorv2/orm_test.go index 63aa0638106..9eb18752de7 100644 --- a/core/services/fluxmonitorv2/orm_test.go +++ b/core/services/fluxmonitorv2/orm_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" txmmocks "github.com/smartcontractkit/chainlink/v2/common/txmgr/mocks" @@ -29,6 +30,7 @@ import ( func TestORM_MostRecentFluxMonitorRoundID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() db := pgtest.NewSqlxDB(t) @@ -84,6 +86,7 @@ func TestORM_MostRecentFluxMonitorRoundID(t *testing.T) { func TestORM_UpdateFluxMonitorRoundStats(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() cfg := configtest.NewGeneralConfig(t, nil) @@ -170,6 +173,7 @@ func makeJob(t *testing.T) *job.Job { func TestORM_CreateEthTransaction(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() diff --git a/core/services/fluxmonitorv2/payment_checker_test.go b/core/services/fluxmonitorv2/payment_checker_test.go index 089ebcc4004..7776b3c16da 100644 --- a/core/services/fluxmonitorv2/payment_checker_test.go +++ b/core/services/fluxmonitorv2/payment_checker_test.go @@ -7,11 +7,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2" ) func TestPaymentChecker_SufficientFunds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( checker = fluxmonitorv2.NewPaymentChecker(nil, nil) payment = 100 @@ -45,6 +47,7 @@ func TestPaymentChecker_SufficientFunds(t *testing.T) { func TestPaymentChecker_SufficientPayment(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( payment int64 = 10 eq = payment diff --git a/core/services/fluxmonitorv2/poll_manager_test.go b/core/services/fluxmonitorv2/poll_manager_test.go index dcf3527ee9e..5aadbf306af 100644 --- a/core/services/fluxmonitorv2/poll_manager_test.go +++ b/core/services/fluxmonitorv2/poll_manager_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/flux_aggregator_wrapper" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2" @@ -85,6 +86,7 @@ func watchTicks(t *testing.T, pm *fluxmonitorv2.PollManager, waitDuration time.D func TestPollManager_PollTicker(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm, err := fluxmonitorv2.NewPollManager(fluxmonitorv2.PollManagerConfig{ PollTickerInterval: pollTickerDefaultDuration, PollTickerDisabled: false, @@ -106,6 +108,7 @@ func TestPollManager_PollTicker(t *testing.T) { func TestPollManager_IdleTimer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm, err := fluxmonitorv2.NewPollManager(fluxmonitorv2.PollManagerConfig{ PollTickerInterval: 100 * time.Millisecond, PollTickerDisabled: true, @@ -129,6 +132,7 @@ func TestPollManager_IdleTimer(t *testing.T) { func TestPollManager_RoundTimer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm, err := fluxmonitorv2.NewPollManager(fluxmonitorv2.PollManagerConfig{ PollTickerInterval: pollTickerDefaultDuration, PollTickerDisabled: true, @@ -153,6 +157,7 @@ func TestPollManager_RoundTimer(t *testing.T) { func TestPollManager_RetryTimer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm, err := fluxmonitorv2.NewPollManager(fluxmonitorv2.PollManagerConfig{ PollTickerInterval: pollTickerDefaultDuration, PollTickerDisabled: true, @@ -190,6 +195,7 @@ func TestPollManager_RetryTimer(t *testing.T) { func TestPollManager_InitialPoll(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) pm.Start(false, flux_aggregator_wrapper.OracleRoundState{}) @@ -199,6 +205,7 @@ func TestPollManager_InitialPoll(t *testing.T) { func TestPollManager_HibernationTimer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm, err := fluxmonitorv2.NewPollManager(fluxmonitorv2.PollManagerConfig{ PollTickerInterval: pollTickerDefaultDuration, PollTickerDisabled: true, @@ -221,6 +228,7 @@ func TestPollManager_HibernationTimer(t *testing.T) { func TestPollManager_HibernationOnStartThenAwaken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm, err := fluxmonitorv2.NewPollManager(fluxmonitorv2.PollManagerConfig{ PollTickerInterval: pollTickerDefaultDuration, PollTickerDisabled: false, @@ -256,6 +264,7 @@ func TestPollManager_HibernationOnStartThenAwaken(t *testing.T) { func TestPollManager_AwakeOnStartThenHibernate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) pm.Start(false, flux_aggregator_wrapper.OracleRoundState{ @@ -281,6 +290,7 @@ func TestPollManager_AwakeOnStartThenHibernate(t *testing.T) { func TestPollManager_ShouldPerformInitialPoll(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string pollTickerDisabled bool @@ -346,6 +356,7 @@ func TestPollManager_ShouldPerformInitialPoll(t *testing.T) { func TestPollManager_Stop(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) pm.Start(false, flux_aggregator_wrapper.OracleRoundState{ @@ -370,6 +381,7 @@ func TestPollManager_Stop(t *testing.T) { func TestPollManager_ResetIdleTimer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) // Start again in awake mode @@ -391,6 +403,7 @@ func TestPollManager_ResetIdleTimer(t *testing.T) { func TestPollManager_ResetIdleTimerWhenHibernating(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) // Start in hibernation @@ -412,6 +425,7 @@ func TestPollManager_ResetIdleTimerWhenHibernating(t *testing.T) { func TestPollManager_Reset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) // Start again in awake mode @@ -440,6 +454,7 @@ func TestPollManager_Reset(t *testing.T) { func TestPollManager_ResetWhenHibernating(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") pm := newPollManager(t) // Start in hibernation diff --git a/core/services/fluxmonitorv2/submission_checker_test.go b/core/services/fluxmonitorv2/submission_checker_test.go index 4417a043ba9..8aca9c6c80b 100644 --- a/core/services/fluxmonitorv2/submission_checker_test.go +++ b/core/services/fluxmonitorv2/submission_checker_test.go @@ -7,11 +7,13 @@ import ( "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2" ) func TestSubmissionChecker_IsValid(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string answer decimal.Decimal diff --git a/core/services/fluxmonitorv2/validate_test.go b/core/services/fluxmonitorv2/validate_test.go index c3131592620..7d3ef23b932 100644 --- a/core/services/fluxmonitorv2/validate_test.go +++ b/core/services/fluxmonitorv2/validate_test.go @@ -13,6 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type testcfg struct{} @@ -22,6 +24,7 @@ func (testcfg) DefaultHTTPTimeout() commonconfig.Duration { } func TestValidate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1852") t.Parallel() var tt = []struct { diff --git a/core/services/functions/connector_handler_test.go b/core/services/functions/connector_handler_test.go index 0381261b581..4c7c4f0f34f 100644 --- a/core/services/functions/connector_handler_test.go +++ b/core/services/functions/connector_handler_test.go @@ -36,6 +36,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func newOffchainRequest(t *testing.T, sender []byte, ageSec uint64) (*api.Message, functions.RequestID) { @@ -66,6 +68,7 @@ func newOffchainRequest(t *testing.T, sender []byte, ageSec uint64) (*api.Messag func TestFunctionsConnectorHandler(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") logger := logger.TestLogger(t) privateKey, addr := testutils.NewPrivateKeyAndAddress(t) diff --git a/core/services/functions/external_adapter_client_test.go b/core/services/functions/external_adapter_client_test.go index ba3cc06e1a0..f8bb44b33f1 100644 --- a/core/services/functions/external_adapter_client_test.go +++ b/core/services/functions/external_adapter_client_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/functions" ) @@ -65,6 +66,7 @@ func runRequestTest(t *testing.T, adapterJSONResponse, expectedUserResult, expec } func TestFetchEncryptedSecrets_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "success", "data": { @@ -76,6 +78,7 @@ func TestFetchEncryptedSecrets_Success(t *testing.T) { } func TestFetchEncryptedSecrets_UserError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "error", "data": { @@ -87,6 +90,7 @@ func TestFetchEncryptedSecrets_UserError(t *testing.T) { } func TestFetchEncryptedSecrets_UnexpectedResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "invalid": "invalid", "statusCode": 200 @@ -94,6 +98,7 @@ func TestFetchEncryptedSecrets_UnexpectedResponse(t *testing.T) { } func TestFetchEncryptedSecrets_FailedStatusCode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "success", "data": { @@ -105,6 +110,7 @@ func TestFetchEncryptedSecrets_FailedStatusCode(t *testing.T) { } func TestFetchEncryptedSecrets_MissingData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "success", "statusCode": 200 @@ -112,6 +118,7 @@ func TestFetchEncryptedSecrets_MissingData(t *testing.T) { } func TestFetchEncryptedSecrets_InvalidResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "success", "data": { @@ -123,6 +130,7 @@ func TestFetchEncryptedSecrets_InvalidResponse(t *testing.T) { } func TestFetchEncryptedSecrets_InvalidUserError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "error", "data": { @@ -134,6 +142,7 @@ func TestFetchEncryptedSecrets_InvalidUserError(t *testing.T) { } func TestFetchEncryptedSecrets_UnexpectedResult(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runFetcherTest(t, `{ "result": "unexpected", "data": { @@ -145,10 +154,12 @@ func TestFetchEncryptedSecrets_UnexpectedResult(t *testing.T) { } func TestRunComputation_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runRequestTest(t, runComputationSuccessResponse, "abcdef", "", []string{"domain1", "domain2"}, nil) } func TestRunComputation_MissingData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runRequestTest(t, `{ "result": "success", "statusCode": 200 @@ -156,6 +167,7 @@ func TestRunComputation_MissingData(t *testing.T) { } func TestRunComputation_CorrectAdapterRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(r.Body) assert.NoError(t, err) @@ -184,6 +196,7 @@ func TestRunComputation_CorrectAdapterRequest(t *testing.T) { } func TestRunComputation_HTTP500(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusInternalServerError) })) @@ -198,6 +211,7 @@ func TestRunComputation_HTTP500(t *testing.T) { } func TestRunComputation_ContextRespected(t *testing.T) { + tests.BelongsToCISuite(t, "unit") done := make(chan struct{}) ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { <-done @@ -216,6 +230,7 @@ func TestRunComputation_ContextRespected(t *testing.T) { } func TestRunComputationRetrial(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("OK-retry_succeeds_after_one_failure", func(t *testing.T) { counter := 0 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/core/services/functions/listener_test.go b/core/services/functions/listener_test.go index 0d4ec259226..11c0b727c54 100644 --- a/core/services/functions/listener_test.go +++ b/core/services/functions/listener_test.go @@ -25,6 +25,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" evmconfig "github.com/smartcontractkit/chainlink-evm/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" log_mocks "github.com/smartcontractkit/chainlink/v2/common/log/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -165,6 +166,7 @@ func packFlags(requestSizeTier int, secretSizeTier int) [32]byte { } func TestFunctionsListener_HandleOracleRequestV1_Success(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -193,6 +195,7 @@ func TestFunctionsListener_HandleOracleRequestV1_Success(t *testing.T) { } func TestFunctionsListener_HandleOffchainRequest_Success(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -215,6 +218,7 @@ func TestFunctionsListener_HandleOffchainRequest_Success(t *testing.T) { } func TestFunctionsListener_HandleOffchainRequest_Invalid(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() uni := NewFunctionsListenerUniverse(t, 0, 1_000_000) @@ -239,6 +243,7 @@ func TestFunctionsListener_HandleOffchainRequest_Invalid(t *testing.T) { } func TestFunctionsListener_HandleOffchainRequest_InternalError(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() uni := NewFunctionsListenerUniverse(t, 0, 1_000_000) @@ -259,6 +264,7 @@ func TestFunctionsListener_HandleOffchainRequest_InternalError(t *testing.T) { } func TestFunctionsListener_HandleOracleRequestV1_ComputationError(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -287,6 +293,7 @@ func TestFunctionsListener_HandleOracleRequestV1_ComputationError(t *testing.T) } func TestFunctionsListener_HandleOracleRequestV1_ThresholdDecryptedSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -328,6 +335,7 @@ func TestFunctionsListener_HandleOracleRequestV1_ThresholdDecryptedSecrets(t *te } func TestFunctionsListener_HandleOracleRequestV1_CBORTooBig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -354,6 +362,7 @@ func TestFunctionsListener_HandleOracleRequestV1_CBORTooBig(t *testing.T) { } func TestFunctionsListener_ReportSourceCodeDomains(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -394,6 +403,7 @@ func TestFunctionsListener_ReportSourceCodeDomains(t *testing.T) { } func TestFunctionsListener_PruneRequests(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -409,6 +419,7 @@ func TestFunctionsListener_PruneRequests(t *testing.T) { } func TestFunctionsListener_TimeoutRequests(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() @@ -424,6 +435,7 @@ func TestFunctionsListener_TimeoutRequests(t *testing.T) { } func TestFunctionsListener_ORMDoesNotFreezeHandlersForever(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) t.Parallel() diff --git a/core/services/functions/offchain_transmitter_test.go b/core/services/functions/offchain_transmitter_test.go index bec639bf27d..d000947a8ec 100644 --- a/core/services/functions/offchain_transmitter_test.go +++ b/core/services/functions/offchain_transmitter_test.go @@ -7,12 +7,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/functions" ) func TestOffchainTransmitter(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") transmitter := functions.NewOffchainTransmitter(1) ch := transmitter.ReportChannel() diff --git a/core/services/functions/orm_test.go b/core/services/functions/orm_test.go index e9638de845b..eb259a2ffcd 100644 --- a/core/services/functions/orm_test.go +++ b/core/services/functions/orm_test.go @@ -7,6 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -64,6 +65,7 @@ func createRequestWithTimestamp(t *testing.T, orm functions.ORM, ts time.Time) ( func TestORM_CreateRequestsAndFindByID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -105,6 +107,7 @@ func TestORM_CreateRequestsAndFindByID(t *testing.T) { func TestORM_SetResult(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -126,6 +129,7 @@ func TestORM_SetResult(t *testing.T) { func TestORM_SetError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -149,6 +153,7 @@ func TestORM_SetError(t *testing.T) { func TestORM_SetError_Internal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -169,6 +174,7 @@ func TestORM_SetError_Internal(t *testing.T) { func TestORM_SetFinalized(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -186,6 +192,7 @@ func TestORM_SetFinalized(t *testing.T) { func TestORM_SetConfirmed(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -201,6 +208,7 @@ func TestORM_SetConfirmed(t *testing.T) { func TestORM_StateTransitions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -237,6 +245,7 @@ func TestORM_StateTransitions(t *testing.T) { func TestORM_FindOldestEntriesByState(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") orm := setupORM(t) now := time.Now() @@ -276,6 +285,7 @@ func TestORM_FindOldestEntriesByState(t *testing.T) { func TestORM_TimeoutExpiredResults(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -325,6 +335,7 @@ func TestORM_TimeoutExpiredResults(t *testing.T) { func TestORM_PruneOldestRequests(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) @@ -369,6 +380,7 @@ func TestORM_PruneOldestRequests(t *testing.T) { func TestORM_PruneOldestRequests_Large(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t) diff --git a/core/services/gateway/api/jsonrpccodec_test.go b/core/services/gateway/api/jsonrpccodec_test.go index fd094960663..dba424d2eb8 100644 --- a/core/services/gateway/api/jsonrpccodec_test.go +++ b/core/services/gateway/api/jsonrpccodec_test.go @@ -8,11 +8,13 @@ import ( jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" ) func TestJsonRPCRequest_Decode_Correct(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") input := []byte(`{"jsonrpc": "2.0", "id": "aa-bb", "method": "upload", "params": {"body":{"don_id": "functions_local", "payload": {"field": 123}}}}`) codec := api.JsonRPCCodec{} @@ -34,6 +36,7 @@ func TestJsonRPCRequest_Decode_Correct(t *testing.T) { func TestJsonRPCRequest_Decode_Incorrect(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := map[string]string{ "missing params": `{"jsonrpc": "2.0", "id": "abc", "method": "upload"}`, @@ -51,6 +54,7 @@ func TestJsonRPCRequest_Decode_Incorrect(t *testing.T) { func TestJsonRPCRequest_Encode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var msg api.Message msg.Body = api.MessageBody{ @@ -71,6 +75,7 @@ func TestJsonRPCRequest_Encode(t *testing.T) { func TestJsonRPCResponse_Decode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") input := []byte(`{"jsonrpc": "2.0", "id": "aa-bb", "result": {"body": {"don_id": "functions_local", "payload": {"field": 123}}}}`) codec := api.JsonRPCCodec{} @@ -83,6 +88,7 @@ func TestJsonRPCResponse_Decode(t *testing.T) { func TestJsonRPCResponse_Encode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var msg api.Message msg.Body = api.MessageBody{ diff --git a/core/services/gateway/api/message_test.go b/core/services/gateway/api/message_test.go index 832171803ab..67d3aea8765 100644 --- a/core/services/gateway/api/message_test.go +++ b/core/services/gateway/api/message_test.go @@ -7,10 +7,12 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" ) func TestMessage_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") msg := &api.Message{ Body: api.MessageBody{ MessageId: "abcd", @@ -71,6 +73,7 @@ func TestMessage_Validate(t *testing.T) { func TestMessage_MessageSignAndValidateSignature(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") msg := &api.Message{ Body: api.MessageBody{ diff --git a/core/services/gateway/common/aggregation/common_test.go b/core/services/gateway/common/aggregation/common_test.go index 8e5ef86abd5..130a88baf04 100644 --- a/core/services/gateway/common/aggregation/common_test.go +++ b/core/services/gateway/common/aggregation/common_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestStringSet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("add and contains", func(t *testing.T) { s := make(StringSet) diff --git a/core/services/gateway/common/aggregation/response_aggregator_test.go b/core/services/gateway/common/aggregation/response_aggregator_test.go index 6fc372df8e3..7279cbd7a06 100644 --- a/core/services/gateway/common/aggregation/response_aggregator_test.go +++ b/core/services/gateway/common/aggregation/response_aggregator_test.go @@ -7,9 +7,11 @@ import ( "github.com/stretchr/testify/require" jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestIdenticalNodeResponseAggregator_CollectAndAggregate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("single node response below threshold", func(t *testing.T) { agg, err := NewIdenticalNodeResponseAggregator(2) require.NoError(t, err) @@ -196,6 +198,7 @@ func TestIdenticalNodeResponseAggregator_CollectAndAggregate(t *testing.T) { } func TestIdenticalNodeResponseAggregator_EdgeCases(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("empty response", func(t *testing.T) { agg, err := NewIdenticalNodeResponseAggregator(1) require.NoError(t, err) @@ -240,6 +243,7 @@ func TestIdenticalNodeResponseAggregator_EdgeCases(t *testing.T) { } func TestIdenticalNodeResponseAggregator_NodeChangesResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("node changes response and reaches threshold", func(t *testing.T) { agg, err := NewIdenticalNodeResponseAggregator(2) require.NoError(t, err) diff --git a/core/services/gateway/common/aggregation/workflow_metadata_aggregator_test.go b/core/services/gateway/common/aggregation/workflow_metadata_aggregator_test.go index f6459db954c..66301f8b6bd 100644 --- a/core/services/gateway/common/aggregation/workflow_metadata_aggregator_test.go +++ b/core/services/gateway/common/aggregation/workflow_metadata_aggregator_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" gateway_common "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/capabilities/v2/metrics" ) @@ -21,6 +22,7 @@ func createTestMetrics(t *testing.T) *metrics.Metrics { } func TestWorkflowMetadataAggregator_StartStop(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) testMetrics := createTestMetrics(t) agg := NewWorkflowMetadataAggregator(lggr, 2, 100*time.Millisecond, testMetrics) @@ -64,6 +66,7 @@ func createTestWorkflowMetadata(workflowID, workflowName, workflowOwner, workflo } func TestWorkflowMetadataAggregator_Collect(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) testMetrics := createTestMetrics(t) agg := NewWorkflowMetadataAggregator(lggr, 2, 10*time.Second, testMetrics) @@ -122,6 +125,7 @@ func TestWorkflowMetadataAggregator_Collect(t *testing.T) { } func TestWorkflowMetadataAggregator_CollectDifferentObservations(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) testMetrics := createTestMetrics(t) agg := NewWorkflowMetadataAggregator(lggr, 2, 10*time.Second, testMetrics) @@ -166,6 +170,7 @@ func TestWorkflowMetadataAggregator_CollectDifferentObservations(t *testing.T) { } func TestWorkflowMetadataAggregator_Aggregate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) threshold := 2 testMetrics := createTestMetrics(t) @@ -231,6 +236,7 @@ func TestWorkflowMetadataAggregator_Aggregate(t *testing.T) { } func TestWorkflowMetadataAggregator_Aggregate_ChronologicalOrder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) threshold := 2 testMetrics := createTestMetrics(t) @@ -283,6 +289,7 @@ func TestWorkflowMetadataAggregator_Aggregate_ChronologicalOrder(t *testing.T) { } func TestWorkflowMetadataAggregator_Aggregate_ChronologicalOrder_SameWorkflowNameOwnerTag(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) threshold := 2 testMetrics := createTestMetrics(t) @@ -350,6 +357,7 @@ func TestWorkflowMetadataAggregator_Aggregate_ChronologicalOrder_SameWorkflowNam } func TestWorkflowMetadataAggregator_ReapObservations(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) cleanupInterval := 1 * time.Second testMetrics := createTestMetrics(t) @@ -385,6 +393,7 @@ func TestWorkflowMetadataAggregator_ReapObservations(t *testing.T) { } func TestWorkflowMetadataAggregator_ReapObservations_UnexpiredObservation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) cleanupInterval := 1 * time.Second testMetrics := createTestMetrics(t) @@ -422,6 +431,7 @@ func TestWorkflowMetadataAggregator_ReapObservations_UnexpiredObservation(t *tes } func TestWorkflowMetadataAggregator_Collect_EdgeCases(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) t.Run("empty workflow ID", func(t *testing.T) { diff --git a/core/services/gateway/common/utils_test.go b/core/services/gateway/common/utils_test.go index 0faf0d4a7d6..df5dbf93ac2 100644 --- a/core/services/gateway/common/utils_test.go +++ b/core/services/gateway/common/utils_test.go @@ -8,11 +8,13 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/common" ) func TestUtils_BytesUint32Conversions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") val := uint32(time.Now().Unix()) data := common.Uint32ToBytes(val) @@ -21,6 +23,7 @@ func TestUtils_BytesUint32Conversions(t *testing.T) { func TestUtils_StringAlignedBytesConversions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") val := "my_string" data := common.StringToAlignedBytes(val, 40) @@ -37,6 +40,7 @@ func TestUtils_StringAlignedBytesConversions(t *testing.T) { func TestUtils_BytesSignAndValidate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") data := []byte("data_data") incorrectData := []byte("some_other_data") diff --git a/core/services/gateway/connectionmanager_test.go b/core/services/gateway/connectionmanager_test.go index 05d1186d4ce..21a4101bf99 100644 --- a/core/services/gateway/connectionmanager_test.go +++ b/core/services/gateway/connectionmanager_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway" gc "github.com/smartcontractkit/chainlink/v2/core/services/gateway/common" @@ -44,6 +45,7 @@ Address = "0x68902d681c28119f9b2531473a417088bf008e59" func TestConnectionManager_NewConnectionManager_ValidConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := parseTOMLConfig(t, defaultConfig) @@ -52,6 +54,7 @@ func TestConnectionManager_NewConnectionManager_ValidConfig(t *testing.T) { func TestConnectionManager_NewConnectionManager_InvalidConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") invalidCases := map[string]string{ "duplicate DON ID": ` @@ -129,6 +132,7 @@ func signAndPackAuthHeader(t *testing.T, authHeaderElems *network.AuthHeaderElem func TestConnectionManager_StartHandshake(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config, nodes := newTestConfig(t, 4) unrelatedNode := gc.NewTestNodes(t, 1)[0] @@ -182,6 +186,7 @@ func TestConnectionManager_StartHandshake(t *testing.T) { func TestConnectionManager_FinalizeHandshake(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config, nodes := newTestConfig(t, 4) clock := clockwork.NewFakeClock() @@ -215,6 +220,7 @@ func TestConnectionManager_FinalizeHandshake(t *testing.T) { func TestConnectionManager_SendToNode_Failures(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config, nodes := newTestConfig(t, 2) clock := clockwork.NewFakeClock() @@ -231,6 +237,7 @@ func TestConnectionManager_SendToNode_Failures(t *testing.T) { func TestConnectionManager_CleanStartClose(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config, _ := newTestConfig(t, 2) config.ConnectionManagerConfig.HeartbeatIntervalSec = 1 diff --git a/core/services/gateway/connector/connector_test.go b/core/services/gateway/connector/connector_test.go index 4c1cc0d04bd..2154b40b6dc 100644 --- a/core/services/gateway/connector/connector_test.go +++ b/core/services/gateway/connector/connector_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" gatewaymocks "github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" ) @@ -56,6 +57,7 @@ func newTestConnector(t *testing.T, config *ConnectorConfig) (*gatewayConnector, func TestGatewayConnector_NewGatewayConnector_ValidConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := parseTOMLConfig(t, ` NodeAddress = "0x68902d681c28119f9b2531473a417088bf008e59" @@ -71,6 +73,7 @@ URL = "ws://localhost:8081/node" func TestGatewayConnector_NewGatewayConnector_InvalidConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") invalidCases := map[string]string{ "invalid DON ID": ` @@ -119,6 +122,7 @@ URL = "ws://localhost:8081/node" func TestGatewayConnector_CleanStartAndClose(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") connector, signer, _ := newTestConnector(t, parseTOMLConfig(t, defaultConfig)) signer.On("Sign", mock.AnythingOfType("*context.cancelCtx"), mock.Anything).Return(nil, errors.New("cannot sign")) @@ -127,6 +131,7 @@ func TestGatewayConnector_CleanStartAndClose(t *testing.T) { func TestGatewayConnector_NewAuthHeader_SignerError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") connector, signer, _ := newTestConnector(t, parseTOMLConfig(t, defaultConfig)) signer.On("Sign", mock.AnythingOfType("*context.cancelCtx"), mock.Anything).Return(nil, errors.New("cannot sign")) @@ -139,6 +144,7 @@ func TestGatewayConnector_NewAuthHeader_SignerError(t *testing.T) { func TestGatewayConnector_NewAuthHeader_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testSignature := make([]byte, network.HandshakeSignatureLen) testSignature[1] = 0xfa @@ -154,6 +160,7 @@ func TestGatewayConnector_NewAuthHeader_Success(t *testing.T) { func TestGatewayConnector_ChallengeResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testSignature := make([]byte, network.HandshakeSignatureLen) testSignature[1] = 0xfa @@ -195,6 +202,7 @@ func TestGatewayConnector_ChallengeResponse(t *testing.T) { func TestGatewayConnector_AddHandler(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") connector, _, _ := newTestConnector(t, parseTOMLConfig(t, defaultConfig)) // testMethod1 already exists diff --git a/core/services/gateway/delegate_test.go b/core/services/gateway/delegate_test.go index c255a24f657..4116c774b52 100644 --- a/core/services/gateway/delegate_test.go +++ b/core/services/gateway/delegate_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway" ) func TestDelegate_JobSpecValidator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string diff --git a/core/services/gateway/gateway_test.go b/core/services/gateway/gateway_test.go index d6a55db059f..a3578141fc7 100644 --- a/core/services/gateway/gateway_test.go +++ b/core/services/gateway/gateway_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" @@ -59,6 +60,7 @@ func newGatewayHandler(t *testing.T) gateway.HandlerFactory { func TestGateway_NewGatewayFromConfig_ValidConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := buildConfig(` [[dons]] @@ -81,6 +83,7 @@ Address = "0x0001020304050607080900010203040506070809" func TestGateway_NewGatewayFromConfig_DuplicateID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := buildConfig(` [[dons]] @@ -99,6 +102,7 @@ HandlerName = "dummy" func TestGateway_NewGatewayFromConfig_InvalidHandler(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := buildConfig(` [[dons]] @@ -113,6 +117,7 @@ HandlerName = "no_such_handler" func TestGateway_NewGatewayFromConfig_MissingID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := buildConfig(` [[dons]] @@ -127,6 +132,7 @@ SomeOtherField = "abcd" func TestGateway_NewGatewayFromConfig_InvalidNodeAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tomlConfig := buildConfig(` [[dons]] @@ -145,6 +151,7 @@ Address = "0xnot_an_address" func TestGateway_CleanStartAndClose(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) gatewayObj, err := gateway.NewGatewayFromConfig(parseTOMLConfig(t, buildConfig("")), newGatewayHandler(t), lggr, limits.Factory{Logger: lggr}) @@ -216,6 +223,7 @@ func newJSONRpcRequest(t *testing.T, requestID string, method string, payload [] func TestGateway_ProcessRequest_ParseError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, _ := newGatewayWithMockHandler(t) response, statusCode := gw.ProcessRequest(testutils.Context(t), []byte("{{}"), "") @@ -225,6 +233,7 @@ func TestGateway_ProcessRequest_ParseError(t *testing.T) { func TestGateway_ProcessRequest_MessageValidationError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, _ := newGatewayWithMockHandler(t) req := newSignedLegacyRequest(t, "abc", "request", api.NullChar, []byte{}) @@ -235,6 +244,7 @@ func TestGateway_ProcessRequest_MessageValidationError(t *testing.T) { func TestGateway_ProcessRequest_MissingDonId(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, _ := newGatewayWithMockHandler(t) req := newSignedLegacyRequest(t, "abc", "request", "", []byte{}) @@ -245,6 +255,7 @@ func TestGateway_ProcessRequest_MissingDonId(t *testing.T) { func TestGateway_ProcessRequest_IncorrectDonId(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, _ := newGatewayWithMockHandler(t) req := newSignedLegacyRequest(t, "abc", "request", "unknownDON", []byte{}) @@ -255,6 +266,7 @@ func TestGateway_ProcessRequest_IncorrectDonId(t *testing.T) { func TestGateway_LegacyRequest_HandlerResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, handler := newGatewayWithMockHandler(t) handler.On("HandleLegacyUserMessage", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { @@ -278,6 +290,7 @@ func TestGateway_LegacyRequest_HandlerResponse(t *testing.T) { func TestGateway_NewRequest_HandlerResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, handler := newGatewayWithMockHandler(t) handler.On("HandleJSONRPCUserMessage", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { @@ -305,6 +318,7 @@ func TestGateway_NewRequest_HandlerResponse(t *testing.T) { func TestGateway_ProcessRequest_HandlerTimeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, handler := newGatewayWithMockHandler(t) handler.On("HandleLegacyUserMessage", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -319,6 +333,7 @@ func TestGateway_ProcessRequest_HandlerTimeout(t *testing.T) { func TestGateway_ProcessRequest_HandlerError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") gw, handler := newGatewayWithMockHandler(t) handler.On("HandleLegacyUserMessage", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(errors.New("failure")) @@ -367,6 +382,7 @@ func newMockHandler(t *testing.T, method string) *handlermocks.Handler { } func TestGateway_Multihandler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tomlConfig := buildConfig(` [[dons]] DonId = "1" diff --git a/core/services/gateway/handlers/capabilities/handler_test.go b/core/services/gateway/handlers/capabilities/handler_test.go index 13461b4d8ba..1c79551dcbe 100644 --- a/core/services/gateway/handlers/capabilities/handler_test.go +++ b/core/services/gateway/handlers/capabilities/handler_test.go @@ -78,6 +78,7 @@ func setupHandler(t *testing.T) (*handler, *mocks.HTTPClient, *handlermocks.DON, } func TestHandler_SendHTTPMessageToClient(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, httpClient, don, nodes := setupHandler(t) ctx := testutils.Context(t) nodeAddr := nodes[0].Address @@ -260,6 +261,7 @@ func triggerRequest(t *testing.T, key *ecdsa.PrivateKey, topics []string, method } func TestHandlerReceiveHTTPMessageFromClient(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, don, nodes := setupHandler(t) ctx := testutils.Context(t) msg := triggerRequest(t, nodes[0].PrivateKey, []string{"daily_price_update"}, "", "", "") @@ -366,6 +368,7 @@ func TestHandlerReceiveHTTPMessageFromClient(t *testing.T) { } func TestHandleComputeActionMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, httpClient, don, nodes := setupHandler(t) ctx := testutils.Context(t) nodeAddr := nodes[0].Address diff --git a/core/services/gateway/handlers/capabilities/v2/http_handler_test.go b/core/services/gateway/handlers/capabilities/v2/http_handler_test.go index 16205a4e135..23eed0c5dc6 100644 --- a/core/services/gateway/handlers/capabilities/v2/http_handler_test.go +++ b/core/services/gateway/handlers/capabilities/v2/http_handler_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/ratelimit" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" gateway_common "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/config" triggermocks "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/capabilities/v2/mocks" @@ -27,6 +28,7 @@ import ( ) func TestNewGatewayHandler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("successful creation", func(t *testing.T) { cfg := serviceCfg() configBytes, err := json.Marshal(cfg) @@ -105,6 +107,7 @@ func TestNewGatewayHandler(t *testing.T) { } func TestHandleNodeMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler := createTestHandler(t) t.Run("successful node message handling", func(t *testing.T) { @@ -265,6 +268,7 @@ func TestHandleNodeMessage(t *testing.T) { } func TestServiceLifecycle(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler := createTestHandler(t) t.Run("start and stop", func(t *testing.T) { @@ -283,8 +287,10 @@ func TestServiceLifecycle(t *testing.T) { }) } func TestHandleNodeMessage_RoutesToTriggerHandler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // This test covers the case where the response ID does not contain a "/" // and should be routed to the triggerHandler.HandleNodeTriggerResponse. + mockTriggerHandler := triggermocks.NewHTTPTriggerHandler(t) handler := createTestHandler(t) handler.triggerHandler = mockTriggerHandler @@ -307,6 +313,7 @@ func TestHandleNodeMessage_RoutesToTriggerHandler(t *testing.T) { } func TestHandleNodeMessage_UnsupportedMethod(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler := createTestHandler(t) rawRes := json.RawMessage([]byte(`{}`)) resp := &jsonrpc.Response[json.RawMessage]{ @@ -321,6 +328,7 @@ func TestHandleNodeMessage_UnsupportedMethod(t *testing.T) { } func TestHandleNodeMessage_EmptyID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler := createTestHandler(t) rawRes := json.RawMessage([]byte(`{}`)) resp := &jsonrpc.Response[json.RawMessage]{ @@ -366,6 +374,7 @@ func (m *mockResponseCache) DeleteExpired(ctx context.Context) int { } func TestGatewayHandler_Start_CallsDeleteExpired(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cfg := serviceCfg() cfg.CleanUpPeriodMs = 100 // fast cleanup for test @@ -434,6 +443,7 @@ func createTestHandlerWithConfig(t *testing.T, cfg ServiceConfig) *gatewayHandle } func TestCreateHTTPRequestCallback(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) requestID := "test-request-id" @@ -536,6 +546,7 @@ func TestCreateHTTPRequestCallback(t *testing.T) { // TestMakeOutgoingRequestCachingBehavior tests the specific caching logic in makeOutgoingRequest func TestMakeOutgoingRequestCachingBehavior(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("MaxAgeMs=0 and Store=true calls Set", func(t *testing.T) { handler := createTestHandler(t) mockCache := newMockResponseCache() @@ -706,6 +717,7 @@ func expectSuccessfulRequest(mockHTTPClient *httpmocks.HTTPClient, mockDon *hand } func TestGatewayHandler_MakeOutgoingRequest_NodeRateLimiting(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("node rate limiting with AllowVerbose", func(t *testing.T) { cfg := ServiceConfig{ NodeRateLimiter: ratelimit.RateLimiterConfig{ diff --git a/core/services/gateway/handlers/capabilities/v2/http_trigger_handler_test.go b/core/services/gateway/handlers/capabilities/v2/http_trigger_handler_test.go index 9cf4e32611c..bf9468dd9ed 100644 --- a/core/services/gateway/handlers/capabilities/v2/http_trigger_handler_test.go +++ b/core/services/gateway/handlers/capabilities/v2/http_trigger_handler_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" gateway_common "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-common/pkg/workflows" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" @@ -44,6 +45,7 @@ func requireUserErrorSent(t *testing.T, payload handlers.UserCallbackPayload, er } func TestHttpTriggerHandler_HandleUserTriggerRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") triggerReq := createTestTriggerRequest(workflowID) reqBytes, err := json.Marshal(triggerReq) require.NoError(t, err) @@ -407,6 +409,7 @@ func TestHttpTriggerHandler_HandleUserTriggerRequest(t *testing.T) { } func TestHttpTriggerHandler_HandleNodeTriggerResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("successful aggregation", func(t *testing.T) { handler, mockDon := createTestTriggerHandler(t) privateKey := createTestPrivateKey(t) @@ -483,6 +486,7 @@ func TestHttpTriggerHandler_HandleNodeTriggerResponse(t *testing.T) { } func TestHttpTriggerHandler_ServiceLifecycle(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("start and stop", func(t *testing.T) { handler, _ := createTestTriggerHandler(t) @@ -527,6 +531,7 @@ func registerWorkflow(t *testing.T, handler *httpTriggerHandler, workflowID stri } func TestHttpTriggerHandler_ReapExpiredCallbacks(t *testing.T) { + tests.BelongsToCISuite(t, "unit") requestID := "test-request-id" triggerReq := gateway_common.HTTPTriggerRequest{ Workflow: gateway_common.WorkflowSelector{ @@ -605,6 +610,7 @@ func TestHttpTriggerHandler_ReapExpiredCallbacks(t *testing.T) { } func TestIsValidJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input []byte @@ -651,6 +657,7 @@ func TestIsValidJSON(t *testing.T) { } func TestHttpTriggerHandler_HandleUserTriggerRequest_Retries(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) cfg := ServiceConfig{ MaxTriggerRequestDurationMs: 2000, // 2 seconds for test @@ -712,6 +719,7 @@ func TestHttpTriggerHandler_HandleUserTriggerRequest_Retries(t *testing.T) { } func TestHttpTriggerHandler_HandleUserTriggerRequest_JWTAuthorization(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, mockDon := createTestTriggerHandler(t) ctx := testutils.Context(t) @@ -857,6 +865,7 @@ func TestHttpTriggerHandler_HandleUserTriggerRequest_JWTAuthorization(t *testing } func TestHttpTriggerHandler_HandleUserTriggerRequest_WorkflowLookup(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, mockDon := createTestTriggerHandler(t) ctx := testutils.Context(t) @@ -1059,6 +1068,7 @@ func TestHttpTriggerHandler_HandleUserTriggerRequest_WorkflowLookup(t *testing.T }) } func TestHttpTriggerHandler_HandleUserTriggerRequest_Validation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, mockDon := createTestTriggerHandler(t) t.Run("workflowID uppercase", func(t *testing.T) { @@ -1573,6 +1583,7 @@ func createTestTriggerHandlerWithConfig(t *testing.T, cfg ServiceConfig) (*httpT } func TestHttpTriggerHandler_HandleUserTriggerRequest_RateLimiting(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cfg := ServiceConfig{ CleanUpPeriodMs: 60000, MaxTriggerRequestDurationMs: 300000, @@ -1685,6 +1696,7 @@ func TestHttpTriggerHandler_HandleUserTriggerRequest_RateLimiting(t *testing.T) } func TestHttpTriggerHandler_HandleUserTriggerRequest_StopsRetriesOnQuorum(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) cfg := WithDefaults(ServiceConfig{}) diff --git a/core/services/gateway/handlers/capabilities/v2/metrics/metrics_test.go b/core/services/gateway/handlers/capabilities/v2/metrics/metrics_test.go index 6e19b92674c..c014c25de96 100644 --- a/core/services/gateway/handlers/capabilities/v2/metrics/metrics_test.go +++ b/core/services/gateway/handlers/capabilities/v2/metrics/metrics_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/config" ) func TestNewMetrics(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") donConfig := &config.DONConfig{ Members: []config.NodeConfig{ diff --git a/core/services/gateway/handlers/capabilities/v2/response_cache_test.go b/core/services/gateway/handlers/capabilities/v2/response_cache_test.go index e913bbf19fd..77e5c5c4407 100644 --- a/core/services/gateway/handlers/capabilities/v2/response_cache_test.go +++ b/core/services/gateway/handlers/capabilities/v2/response_cache_test.go @@ -8,6 +8,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" gateway_common "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/capabilities/v2/metrics" ) @@ -43,6 +44,7 @@ func createTestResponse(statusCode int, body string) gateway_common.OutboundHTTP } func TestIsCacheableStatusCode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string statusCode int @@ -87,6 +89,7 @@ func TestIsCacheableStatusCode(t *testing.T) { } func TestRequestHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") req := createTestRequest("GET", "https://example.com") t.Run("generates consistent hash", func(t *testing.T) { @@ -171,6 +174,7 @@ func TestRequestHash(t *testing.T) { } func TestIsExpiredOrNotCached(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testMetrics := createCacheTestMetrics(t) cache := newResponseCache(logger.Test(t), 1000, testMetrics) // 1 second TTL workflowID := "workflow-123" @@ -203,6 +207,7 @@ func TestIsExpiredOrNotCached(t *testing.T) { } func TestFetch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testMetrics := createCacheTestMetrics(t) cache := newResponseCache(logger.Test(t), 10000, testMetrics) // 10 seconds TTL workflowID := "workflow-123" @@ -318,6 +323,7 @@ func TestFetch(t *testing.T) { } func TestSet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testMetrics := createCacheTestMetrics(t) cache := newResponseCache(logger.Test(t), 10000, testMetrics) workflowID := "workflow-123" @@ -376,6 +382,7 @@ func TestSet(t *testing.T) { } func TestDeleteExpired(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testMetrics := createCacheTestMetrics(t) cache := newResponseCache(logger.Test(t), 1000, testMetrics) @@ -419,6 +426,7 @@ func TestDeleteExpired(t *testing.T) { } func TestEdgeCases(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("zero TTL cache", func(t *testing.T) { testMetrics := createCacheTestMetrics(t) cache := newResponseCache(logger.Test(t), 0, testMetrics) diff --git a/core/services/gateway/handlers/capabilities/v2/workflow_metadata_handler_test.go b/core/services/gateway/handlers/capabilities/v2/workflow_metadata_handler_test.go index 19b9f085d1c..63d4eaab721 100644 --- a/core/services/gateway/handlers/capabilities/v2/workflow_metadata_handler_test.go +++ b/core/services/gateway/handlers/capabilities/v2/workflow_metadata_handler_test.go @@ -14,6 +14,7 @@ import ( jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" "github.com/smartcontractkit/chainlink-common/pkg/logger" gateway_common "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-common/pkg/workflows" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/config" @@ -57,6 +58,7 @@ func createTestWorkflowMetadataHandler(t *testing.T) (*WorkflowMetadataHandler, } func TestSyncMetadata(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) // Test when aggregator has no data @@ -110,6 +112,7 @@ func TestSyncMetadata(t *testing.T) { } func TestSyncMetadataMultipleWorkflows(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -162,6 +165,7 @@ func TestSyncMetadataMultipleWorkflows(t *testing.T) { } func TestSendMetadataPullRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, mockDon, donConfig := createTestWorkflowMetadataHandler(t) for _, member := range donConfig.Members { mockDon.EXPECT().SendToNode(mock.Anything, member.Address, mock.Anything).Return(nil).Once() @@ -173,6 +177,7 @@ func TestSendMetadataPullRequest(t *testing.T) { } func TestSendMetadataPullRequestWithErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, mockDon, donConfig := createTestWorkflowMetadataHandler(t) // Mock errors for some nodes @@ -195,6 +200,7 @@ func TestSendMetadataPullRequestWithErrors(t *testing.T) { } func TestSendMetadataPullRequestVerifyPayload(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, mockDon, donConfig := createTestWorkflowMetadataHandler(t) // Capture the request payload var capturedReq *jsonrpc.Request[json.RawMessage] @@ -214,6 +220,7 @@ func TestSendMetadataPullRequestVerifyPayload(t *testing.T) { } func TestOnMetadataPush(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -258,6 +265,7 @@ func TestOnMetadataPush(t *testing.T) { } func TestOnMetadataPushInvalidJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -272,6 +280,7 @@ func TestOnMetadataPushInvalidJSON(t *testing.T) { } func TestOnMetadataPullResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -369,6 +378,7 @@ func TestOnMetadataPullResponse(t *testing.T) { } func TestOnMetadataPullResponseInvalidJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -383,6 +393,7 @@ func TestOnMetadataPullResponseInvalidJSON(t *testing.T) { } func TestStartAndClose(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -400,6 +411,7 @@ func TestStartAndClose(t *testing.T) { } func TestValidateAuthMetadata(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) tests := []struct { @@ -801,6 +813,7 @@ func TestValidateAuthMetadata(t *testing.T) { } func TestOnMetadataPushWithValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -867,6 +880,7 @@ func TestOnMetadataPushWithValidation(t *testing.T) { } func TestOnMetadataPullResponseWithValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) ctx := testutils.Context(t) @@ -965,6 +979,7 @@ func TestOnMetadataPullResponseWithValidation(t *testing.T) { } func TestWorkflowMetadataHandler_Authorize(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) privateKey, err := crypto.GenerateKey() require.NoError(t, err) @@ -1154,6 +1169,7 @@ func TestWorkflowMetadataHandler_Authorize(t *testing.T) { } func TestWorkflowMetadataHandler_GetWorkflowID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) workflowOwner := testWorkflowOwner1 @@ -1197,6 +1213,7 @@ func TestWorkflowMetadataHandler_GetWorkflowID(t *testing.T) { } func TestWorkflowMetadataHandler_GetWorkflowReference(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, _, _ := createTestWorkflowMetadataHandler(t) workflowOwner := testWorkflowOwner1 diff --git a/core/services/gateway/handlers/capabilities/webapi_test.go b/core/services/gateway/handlers/capabilities/webapi_test.go index 2030c898053..7e74d102379 100644 --- a/core/services/gateway/handlers/capabilities/webapi_test.go +++ b/core/services/gateway/handlers/capabilities/webapi_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestResponseValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tt := []struct { name string response Response diff --git a/core/services/gateway/handlers/common/callback_test.go b/core/services/gateway/handlers/common/callback_test.go index 0d36c6a9d37..01fb5b119d1 100644 --- a/core/services/gateway/handlers/common/callback_test.go +++ b/core/services/gateway/handlers/common/callback_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers" ) func Test_Callback(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cb := NewCallback() payload := handlers.UserCallbackPayload{RawResponse: []byte("test")} diff --git a/core/services/gateway/handlers/common/message_util_test.go b/core/services/gateway/handlers/common/message_util_test.go index e77efdce92b..c593749aab2 100644 --- a/core/services/gateway/handlers/common/message_util_test.go +++ b/core/services/gateway/handlers/common/message_util_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" ) @@ -27,6 +28,7 @@ func unsignedMessage() api.Message { } func TestValidatedMessageFromReq(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validMsg := unsignedMessage() key, err := crypto.HexToECDSA(privateKey) require.NoError(t, err) @@ -118,6 +120,7 @@ func TestValidatedMessageFromReq(t *testing.T) { } func TestValidatedMessageFromResp(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validMsg := unsignedMessage() key, err := crypto.HexToECDSA(privateKey) require.NoError(t, err) @@ -191,6 +194,7 @@ func TestValidatedMessageFromResp(t *testing.T) { } func TestValidatedResponseFromMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validMsg := unsignedMessage() t.Run("valid message", func(t *testing.T) { @@ -224,6 +228,7 @@ func TestValidatedResponseFromMessage(t *testing.T) { } func TestValidatedRequestFromMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validMsg := unsignedMessage() t.Run("valid message", func(t *testing.T) { diff --git a/core/services/gateway/handlers/common/requestcache_test.go b/core/services/gateway/handlers/common/requestcache_test.go index 41ccd497643..7e711dca9cc 100644 --- a/core/services/gateway/handlers/common/requestcache_test.go +++ b/core/services/gateway/handlers/common/requestcache_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/common" @@ -22,6 +23,7 @@ type requestState struct { func TestRequestCache_Simple(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cache := common.NewRequestCache[requestState](time.Hour, 1000) callback := common.NewCallback() @@ -52,6 +54,7 @@ func TestRequestCache_Simple(t *testing.T) { func TestRequestCache_MultiResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") nRequests := 10 nResponsesPerRequest := 100 @@ -104,6 +107,7 @@ func TestRequestCache_MultiResponse(t *testing.T) { func TestRequestCache_Timeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cache := common.NewRequestCache[requestState](time.Millisecond*10, 1000) callback := common.NewCallback() @@ -124,6 +128,7 @@ func TestRequestCache_Timeout(t *testing.T) { func TestRequestCache_MaxSize(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cache := common.NewRequestCache[requestState](time.Hour, 2) callback := common.NewCallback() diff --git a/core/services/gateway/handlers/functions/allowlist/allowlist_internal_test.go b/core/services/gateway/handlers/functions/allowlist/allowlist_internal_test.go index a27ecd460a9..93286821bbe 100644 --- a/core/services/gateway/handlers/functions/allowlist/allowlist_internal_test.go +++ b/core/services/gateway/handlers/functions/allowlist/allowlist_internal_test.go @@ -12,12 +12,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/functions/generated/functions_allow_list" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" amocks "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions/allowlist/mocks" ) func TestUpdateAllowedSendersInBatches(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("OK-simple_update_in_batches", func(t *testing.T) { ctx := context.Background() config := OnchainAllowlistConfig{ diff --git a/core/services/gateway/handlers/functions/allowlist/allowlist_test.go b/core/services/gateway/handlers/functions/allowlist/allowlist_test.go index 1431fc38b82..b2ab84ff98d 100644 --- a/core/services/gateway/handlers/functions/allowlist/allowlist_test.go +++ b/core/services/gateway/handlers/functions/allowlist/allowlist_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/codec" "github.com/smartcontractkit/chainlink-evm/pkg/config" @@ -34,6 +35,7 @@ const ( func TestUpdateAndCheck(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-with_ToS_V1.0.0", func(t *testing.T) { client := clienttest.NewClient(t) @@ -120,6 +122,7 @@ func TestUpdateAndCheck(t *testing.T) { func TestUnsupportedVersion(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") client := clienttest.NewClient(t) config := allowlist.OnchainAllowlistConfig{ @@ -135,6 +138,7 @@ func TestUnsupportedVersion(t *testing.T) { func TestUpdatePeriodically(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-with_ToS_V1.0.0", func(t *testing.T) { ctx, cancel := context.WithCancel(testutils.Context(t)) @@ -227,6 +231,7 @@ func TestUpdatePeriodically(t *testing.T) { func TestUpdateFromContract(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-fetch_complete_list_of_allowed_senders", func(t *testing.T) { ctx, cancel := context.WithCancel(testutils.Context(t)) @@ -316,6 +321,7 @@ func TestUpdateFromContract(t *testing.T) { } func TestExtractContractVersion(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type tc struct { name string versionStr string diff --git a/core/services/gateway/handlers/functions/allowlist/orm_test.go b/core/services/gateway/handlers/functions/allowlist/orm_test.go index 10c923fa7a8..3c26e9a4495 100644 --- a/core/services/gateway/handlers/functions/allowlist/orm_test.go +++ b/core/services/gateway/handlers/functions/allowlist/orm_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions/allowlist" @@ -38,6 +39,7 @@ func seedAllowedSenders(t *testing.T, orm allowlist.ORM, amount int) []common.Ad } func TestORM_GetAllowedSenders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("fetch first page", func(t *testing.T) { ctx := testutils.Context(t) orm, err := setupORM(t) @@ -63,6 +65,7 @@ func TestORM_GetAllowedSenders(t *testing.T) { func TestORM_CreateAllowedSenders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-create_an_allowed_sender", func(t *testing.T) { ctx := testutils.Context(t) @@ -141,6 +144,7 @@ func TestORM_CreateAllowedSenders(t *testing.T) { func TestORM_DeleteAllowedSenders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-delete_blocked_sender_from_allowed_list", func(t *testing.T) { ctx := testutils.Context(t) @@ -194,6 +198,7 @@ func TestORM_DeleteAllowedSenders(t *testing.T) { func TestORM_PurgeAllowedSenders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-purge_allowed_list", func(t *testing.T) { ctx := testutils.Context(t) @@ -260,6 +265,7 @@ func TestORM_PurgeAllowedSenders(t *testing.T) { } func Test_NewORM(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("OK-create_ORM", func(t *testing.T) { _, err := allowlist.NewORM(pgtest.NewSqlxDB(t), logger.Test(t), testutils.NewAddress()) require.NoError(t, err) diff --git a/core/services/gateway/handlers/functions/handler.functions_test.go b/core/services/gateway/handlers/functions/handler.functions_test.go index 1832ee90930..270e2b274db 100644 --- a/core/services/gateway/handlers/functions/handler.functions_test.go +++ b/core/services/gateway/handlers/functions/handler.functions_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/ratelimit" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" gc "github.com/smartcontractkit/chainlink/v2/core/services/gateway/common" @@ -100,6 +101,7 @@ func sendNodeReponse(t *testing.T, handler handlers.Handler, userRequestMsg api. } func TestFunctionsHandler_Minimal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, err := functions.NewFunctionsHandlerFromConfig(json.RawMessage("{}"), &config.DONConfig{}, nil, nil, nil, logger.Test(t)) require.NoError(t, err) @@ -110,6 +112,7 @@ func TestFunctionsHandler_Minimal(t *testing.T) { } func TestFunctionsHandler_CleanStartAndClose(t *testing.T) { + tests.BelongsToCISuite(t, "unit") handler, err := functions.NewFunctionsHandlerFromConfig(json.RawMessage("{}"), &config.DONConfig{}, nil, nil, nil, logger.Test(t)) require.NoError(t, err) @@ -117,6 +120,7 @@ func TestFunctionsHandler_CleanStartAndClose(t *testing.T) { } func TestFunctionsHandler_HandleUserMessage_SecretsSet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string nodeResults []bool @@ -166,6 +170,7 @@ func TestFunctionsHandler_HandleUserMessage_SecretsSet(t *testing.T) { } func TestFunctionsHandler_HandleUserMessage_Heartbeat(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string nodeResults []bool @@ -214,6 +219,7 @@ func TestFunctionsHandler_HandleUserMessage_Heartbeat(t *testing.T) { } func TestFunctionsHandler_HandleUserMessage_InvalidMethod(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nodes, user := gc.NewTestNodes(t, 4), gc.NewTestNodes(t, 1)[0] handler, _, allowlist, _ := newFunctionsHandlerForATestDON(t, nodes, time.Hour*24, user.Address) userRequestMsg := newSignedMessage(t, "1234", "secrets_reveal_all_please", "don_id", user.PrivateKey) @@ -225,6 +231,7 @@ func TestFunctionsHandler_HandleUserMessage_InvalidMethod(t *testing.T) { } func TestFunctionsHandler_HandleUserMessage_Timeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") nodes, user := gc.NewTestNodes(t, 4), gc.NewTestNodes(t, 1)[0] handler, don, allowlist, subscriptions := newFunctionsHandlerForATestDON(t, nodes, time.Millisecond*10, user.Address) userRequestMsg := newSignedMessage(t, "1234", "secrets_set", "don_id", user.PrivateKey) diff --git a/core/services/gateway/handlers/functions/subscriptions/orm_test.go b/core/services/gateway/handlers/functions/subscriptions/orm_test.go index 4780dac05bf..43d8c8d7db3 100644 --- a/core/services/gateway/handlers/functions/subscriptions/orm_test.go +++ b/core/services/gateway/handlers/functions/subscriptions/orm_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/functions/generated/functions_router" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -54,6 +55,7 @@ func seedSubscriptions(t *testing.T, orm subscriptions.ORM, amount int) []subscr func TestORM_GetSubscriptions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("fetch first page", func(t *testing.T) { ctx := testutils.Context(t) orm, err := setupORM(t) @@ -79,6 +81,7 @@ func TestORM_GetSubscriptions(t *testing.T) { func TestORM_UpsertSubscription(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("create a subscription", func(t *testing.T) { ctx := testutils.Context(t) @@ -238,6 +241,7 @@ func TestORM_UpsertSubscription(t *testing.T) { } func Test_NewORM(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("OK-create_ORM", func(t *testing.T) { _, err := subscriptions.NewORM(pgtest.NewSqlxDB(t), logger.Test(t), testutils.NewAddress()) require.NoError(t, err) diff --git a/core/services/gateway/handlers/functions/subscriptions/subscriptions_test.go b/core/services/gateway/handlers/functions/subscriptions/subscriptions_test.go index 0a2c1eeb16f..aef8e028b68 100644 --- a/core/services/gateway/handlers/functions/subscriptions/subscriptions_test.go +++ b/core/services/gateway/handlers/functions/subscriptions/subscriptions_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/functions/generated/functions_router" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -30,6 +31,7 @@ const ( func TestSubscriptions_OnePass(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") getSubscriptionCount := hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000003") getSubscriptionsInRange := hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000109e6e1b12098cc8f3a1e9719a817ec53ab9b35c000000000000000000000000000000000000000000000000000034e23f515cb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f5340f0968ee8b7dfd97e3327a6139273cc2c4fa000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000009ed925d8206a4f88a2f643b28b3035b315753cd60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001bc14b92364c75e20000000000000000000000009ed925d8206a4f88a2f643b28b3035b315753cd60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005439e5881a529f3ccbffc0e82d49f9db3950aefe") @@ -74,6 +76,7 @@ func TestSubscriptions_OnePass(t *testing.T) { func TestSubscriptions_MultiPass(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") const ncycles int32 = 5 var currentCycle atomic.Int32 getSubscriptionCount := hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000006") @@ -122,6 +125,7 @@ func TestSubscriptions_MultiPass(t *testing.T) { func TestSubscriptions_Stored(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") getSubscriptionCount := hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000003") getSubscriptionsInRange := hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000109e6e1b12098cc8f3a1e9719a817ec53ab9b35c000000000000000000000000000000000000000000000000000034e23f515cb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f5340f0968ee8b7dfd97e3327a6139273cc2c4fa000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000009ed925d8206a4f88a2f643b28b3035b315753cd60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001bc14b92364c75e20000000000000000000000009ed925d8206a4f88a2f643b28b3035b315753cd60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005439e5881a529f3ccbffc0e82d49f9db3950aefe") diff --git a/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go b/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go index 094dd0628b3..689d05b9e18 100644 --- a/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go +++ b/core/services/gateway/handlers/functions/subscriptions/user_subscriptions_test.go @@ -9,10 +9,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions/subscriptions" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestUserSubscriptions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") us := subscriptions.NewUserSubscriptions() @@ -58,6 +61,7 @@ func TestUserSubscriptions(t *testing.T) { func TestUserSubscriptions_UpdateSubscription(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("update balance", func(t *testing.T) { us := subscriptions.NewUserSubscriptions() diff --git a/core/services/gateway/handlers/handler.dummy_test.go b/core/services/gateway/handlers/handler.dummy_test.go index beb39ddcf56..a33522d1bb6 100644 --- a/core/services/gateway/handlers/handler.dummy_test.go +++ b/core/services/gateway/handlers/handler.dummy_test.go @@ -11,6 +11,7 @@ import ( jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/config" @@ -38,6 +39,7 @@ func (m *testConnManager) SendToNode(ctx context.Context, nodeAddress string, re func TestDummyHandler_BasicFlow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := config.DONConfig{ Members: []config.NodeConfig{ diff --git a/core/services/gateway/handlers/vault/aggregator_test.go b/core/services/gateway/handlers/vault/aggregator_test.go index 9d6680d0401..73c6abeb24d 100644 --- a/core/services/gateway/handlers/vault/aggregator_test.go +++ b/core/services/gateway/handlers/vault/aggregator_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" ) @@ -27,6 +28,7 @@ func makeNodes(t *testing.T, signers []string) []capabilities.Node { } func TestAggregator_Valid_Signatures(t *testing.T) { + tests.BelongsToCISuite(t, "unit") signers := []string{ "d6da96fe596705b32bc3a0e11cdefad77feaad79000000000000000000000000", "327aa349c9718cd36c877d1e90458fe1929768ad000000000000000000000000", @@ -105,6 +107,7 @@ func newMessage(t *testing.T) *jsonrpc.Response[json.RawMessage] { } func TestAggregator_Valid_FallsBackToQuorum(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // No valid signers signers := []string{ hex.EncodeToString(mustRandom(64)), @@ -137,6 +140,7 @@ func TestAggregator_Valid_FallsBackToQuorum(t *testing.T) { } func TestAggregator_Valid_FallsBackToQuorum_ExcludesSignaturesInSha(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // No valid signers signers := []string{ hex.EncodeToString(mustRandom(64)), @@ -173,6 +177,7 @@ func TestAggregator_Valid_FallsBackToQuorum_ExcludesSignaturesInSha(t *testing.T } func TestAggregator_InsufficientResponses(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mcr := &mockCapabilitiesRegistry{F: 1} agg := &baseAggregator{capabilitiesRegistry: mcr} @@ -191,6 +196,7 @@ func TestAggregator_InsufficientResponses(t *testing.T) { } func TestAggregator_QuorumUnobtainable(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // No valid signers signers := []string{ hex.EncodeToString(mustRandom(64)), diff --git a/core/services/gateway/handlers/vault/handler_test.go b/core/services/gateway/handlers/vault/handler_test.go index ace800ea90e..ee1c233ad0f 100644 --- a/core/services/gateway/handlers/vault/handler_test.go +++ b/core/services/gateway/handlers/vault/handler_test.go @@ -27,6 +27,7 @@ import ( vaultcapmocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/mocks" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/config" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers" @@ -104,6 +105,7 @@ func (m *mockCapabilitiesRegistry) DONsForCapability(_ context.Context, _ string } func TestActiveRequest_SendResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") rm := json.RawMessage([]byte(`{}`)) cb := common.NewCallback() activeRequest := &activeRequest{ @@ -128,6 +130,7 @@ func TestActiveRequest_SendResponse(t *testing.T) { } func TestVaultHandler_HandleJSONRPCUserMessage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") createSecretsRequest := &vaultcommon.CreateSecretsRequest{ RequestId: "test_request_id", EncryptedSecrets: []*vaultcommon.EncryptedSecret{ @@ -738,6 +741,7 @@ func TestVaultHandler_HandleJSONRPCUserMessage(t *testing.T) { } func TestVaultHandler_PublicKeyGet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") h, callback, don, _ := setupHandler(t) signers := []string{ "d6da96fe596705b32bc3a0e11cdefad77feaad79000000000000000000000000", diff --git a/core/services/gateway/integration_tests/gateway_integration_test.go b/core/services/gateway/integration_tests/gateway_integration_test.go index c0af374837d..440e46e4cb7 100644 --- a/core/services/gateway/integration_tests/gateway_integration_test.go +++ b/core/services/gateway/integration_tests/gateway_integration_test.go @@ -26,6 +26,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" @@ -168,6 +169,7 @@ func (*client) Close() error { func TestIntegration_Gateway_NoFullNodes_BasicConnectionAndMessage(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testWallets := common.NewTestNodes(t, 2) nodeKeys := testWallets[0] diff --git a/core/services/gateway/network/httpclient_test.go b/core/services/gateway/network/httpclient_test.go index a05274e07ae..00ede00ae38 100644 --- a/core/services/gateway/network/httpclient_test.go +++ b/core/services/gateway/network/httpclient_test.go @@ -15,10 +15,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestHTTPClient_Send(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Setup the test environment lggr := logger.Test(t) @@ -308,7 +310,7 @@ func TestHTTPClient_Send(t *testing.T) { // run on osx or on linux. func TestHTTPClient_BlocksUnallowed(t *testing.T) { t.Parallel() - + tests.BelongsToCISuite(t, "unit") // Setup the test environment lggr := logger.Test(t) // Define test cases @@ -512,6 +514,7 @@ func TestHTTPClient_BlocksUnallowed(t *testing.T) { func TestHTTPClient_AllowedIPsCIDR(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // Setup the test environment lggr := logger.Test(t) @@ -582,6 +585,7 @@ func TestHTTPClient_AllowedIPsCIDR(t *testing.T) { func Test_ConfigApplyDefaults(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("successfully overrides defaults", func(t *testing.T) { config := HTTPClientConfig{ MaxResponseBytes: 1024, @@ -606,6 +610,7 @@ func Test_ConfigApplyDefaults(t *testing.T) { func TestHTTPClient_ValidateMethod(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) tests := []struct { @@ -667,6 +672,7 @@ func TestHTTPClient_ValidateMethod(t *testing.T) { func TestHTTPClient_ValidateHeaders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) tests := []struct { @@ -749,6 +755,7 @@ func TestHTTPClient_ValidateHeaders(t *testing.T) { func TestHTTPClient_BlockedRequests_ReturnErrBlockedRequest(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) diff --git a/core/services/gateway/network/httpserver_test.go b/core/services/gateway/network/httpserver_test.go index 682808661c3..eed4a71c147 100644 --- a/core/services/gateway/network/httpserver_test.go +++ b/core/services/gateway/network/httpserver_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network/mocks" @@ -65,6 +66,7 @@ func sendRequest(t *testing.T, url string, body []byte, httpMethod string, origi func TestHTTPServer_HandleRequest_Correct(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, handler, url := startNewServer(t, 100_000, 100_000, false, nil) handler.On("ProcessRequest", mock.Anything, mock.Anything, mock.Anything).Return([]byte("response"), 200) @@ -78,6 +80,7 @@ func TestHTTPServer_HandleRequest_Correct(t *testing.T) { func TestHTTPServer_HandleRequest_RequestBodyTooBig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, _, url := startNewServer(t, 5, 100_000, false, nil) resp := sendRequest(t, url, []byte("0123456789"), http.MethodPost, nil) @@ -86,6 +89,7 @@ func TestHTTPServer_HandleRequest_RequestBodyTooBig(t *testing.T) { func TestHTTPServer_HandleHealthCheck(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, _, url := startNewServer(t, 100_000, 100_000, false, nil) url = strings.Replace(url, HTTPTestPath, network.HealthCheckPath, 1) @@ -98,6 +102,7 @@ func TestHTTPServer_HandleHealthCheck(t *testing.T) { func TestHTTPServer_HandleRequest_CORSEnabled_FromAllowedOrigin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, handler, url := startNewServer(t, 100_000, 100_000, true, []string{"https://remix.ethereum.org", "https://another.valid.origin.com"}) @@ -116,6 +121,7 @@ func TestHTTPServer_HandleRequest_CORSEnabled_FromAllowedOrigin(t *testing.T) { func TestHTTPServer_HandleRequest_CORSEnabled_FromAllowedOriginWildcards(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, handler, url := startNewServer(t, 100_000, 100_000, true, []string{"https://*.ethereum.org", "https://*.valid.domain.com", "http://*.gov"}) @@ -158,6 +164,7 @@ func TestHTTPServer_HandleRequest_CORSEnabled_FromAllowedOriginWildcards(t *test func TestHTTPServer_HandleRequest_CORSEnabled_FromAllowedOrigin_PreflightRequest(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, _, url := startNewServer(t, 100_000, 100_000, true, []string{"https://remix.ethereum.org", "https://another.valid.origin.com"}) @@ -174,6 +181,7 @@ func TestHTTPServer_HandleRequest_CORSEnabled_FromAllowedOrigin_PreflightRequest func TestHTTPServer_HandleRequest_CORSEnabled_FromNotAllowedOrigin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, handler, url := startNewServer(t, 100_000, 100_000, true, []string{"https://remix.ethereum.org", "https://another.valid.origin.com"}) @@ -192,6 +200,7 @@ func TestHTTPServer_HandleRequest_CORSEnabled_FromNotAllowedOrigin(t *testing.T) func TestHTTPServer_HandleRequest_CORSEnabled_FromNotAllowedOriginWildcards(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, handler, url := startNewServer(t, 100_000, 100_000, true, []string{"https://*.ethereum.org", "https://*.valid.domain.com", "http://example.gov:8080"}) diff --git a/core/services/gateway/network/wsconnection_test.go b/core/services/gateway/network/wsconnection_test.go index 86caaf4af67..c5b95ffcc0d 100644 --- a/core/services/gateway/network/wsconnection_test.go +++ b/core/services/gateway/network/wsconnection_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" ) @@ -33,6 +34,7 @@ func (ssl *serverSideLogic) wsHandler(w http.ResponseWriter, r *http.Request) { func TestWSConnectionWrapper_ClientReconnect(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) // server wsConn := network.NewWSConnectionWrapper(lggr) diff --git a/core/services/gateway/network/wsserver_test.go b/core/services/gateway/network/wsserver_test.go index 5f5270e496f..a7e4ce8657f 100644 --- a/core/services/gateway/network/wsserver_test.go +++ b/core/services/gateway/network/wsserver_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network/mocks" @@ -69,6 +70,7 @@ func sendRequestWithHeader(t *testing.T, url string, headerName string, headerVa func TestWSServer_HandleRequest_AuthHeaderTooBig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, _, urlStr := startNewWSServer(t, 100_000) longString := "abcdefgh" @@ -82,6 +84,7 @@ func TestWSServer_HandleRequest_AuthHeaderTooBig(t *testing.T) { func TestWSServer_HandleRequest_AuthHeaderIncorrectlyBase64Encoded(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, _, urlStr := startNewWSServer(t, 100_000) resp := sendRequestWithHeader(t, urlStr, network.WsServerHandshakeAuthHeaderName, "}}}") @@ -90,6 +93,7 @@ func TestWSServer_HandleRequest_AuthHeaderIncorrectlyBase64Encoded(t *testing.T) func TestWSServer_HandleRequest_AuthHeaderInvalid(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, acceptor, urlStr := startNewWSServer(t, 100_000) acceptor.On("StartHandshake", mock.Anything).Return("", []byte{}, errors.New("invalid auth header")) @@ -101,6 +105,7 @@ func TestWSServer_HandleRequest_AuthHeaderInvalid(t *testing.T) { func TestWSServer_WSClient_DefaultConfig_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, acceptor, urlStr := startNewWSServer(t, 10_000) waitCh := make(chan struct{}) @@ -127,6 +132,7 @@ func TestWSServer_WSClient_DefaultConfig_Success(t *testing.T) { } func TestWSServer_WSClient_DefaultConfig_Failure(t *testing.T) { + tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-1752") t.Parallel() _, acceptor, urlStr := startNewWSServer(t, 10_000) diff --git a/core/services/headreporter/head_reporter_test.go b/core/services/headreporter/head_reporter_test.go index 635b6084145..bcb6266a33e 100644 --- a/core/services/headreporter/head_reporter_test.go +++ b/core/services/headreporter/head_reporter_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -21,6 +22,7 @@ func NewHead() evmtypes.Head { } func Test_HeadReporterService(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("report everything", func(t *testing.T) { db := pgtest.NewSqlxDB(t) diff --git a/core/services/headreporter/prometheus_reporter_test.go b/core/services/headreporter/prometheus_reporter_test.go index 595118fde2f..aa0371ee1e8 100644 --- a/core/services/headreporter/prometheus_reporter_test.go +++ b/core/services/headreporter/prometheus_reporter_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr/txmgrtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -28,6 +29,7 @@ import ( ) func Test_PrometheusReporter(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("with nothing in the database", func(t *testing.T) { db := pgtest.NewSqlxDB(t) diff --git a/core/services/health_test.go b/core/services/health_test.go index d63ebbaddc2..ce66d2f45a4 100644 --- a/core/services/health_test.go +++ b/core/services/health_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services" ) func TestNewStartUpHealthReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.InfoLevel) ibhr := services.NewStartUpHealthReport(1234, lggr) diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 98405503c0b..4c524090fec 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -30,6 +30,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -90,6 +91,7 @@ serverPubKey = '8fa807463ad73f9ee855cfd60ba406dcf98a2855b3dd8af613107b0f6890a707 func TestORM(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") config := configtest.NewTestGeneralConfig(t) db := pgtest.NewSqlxDB(t) @@ -362,6 +364,7 @@ func TestORM(t *testing.T) { func TestORM_DeleteJob_DeletesAssociatedRecords(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewGeneralConfig(t, nil) @@ -525,6 +528,7 @@ executorConfig = "Foo = 'Bar'" } func TestORM_CreateJob_VRFV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/job/validate_test.go b/core/services/job/validate_test.go index ee5d710cc96..94cfed11aa0 100755 --- a/core/services/job/validate_test.go +++ b/core/services/job/validate_test.go @@ -5,9 +5,12 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string spec string diff --git a/core/services/keeper/integration_test.go b/core/services/keeper/integration_test.go index 4dfb1a19edf..d0bc2c7ed45 100644 --- a/core/services/keeper/integration_test.go +++ b/core/services/keeper/integration_test.go @@ -328,6 +328,7 @@ func TestKeeperEthIntegration(t *testing.T) { } func TestKeeperForwarderEthIntegration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-2042") t.Parallel() t.Run("keeper_forwarder_flow", func(t *testing.T) { @@ -492,6 +493,7 @@ func TestKeeperForwarderEthIntegration(t *testing.T) { func TestMaxPerformDataSize(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("max_perform_data_size_test", func(t *testing.T) { ctx := testutils.Context(t) maxPerformDataSize := 1000 // Will be set as config override diff --git a/core/services/keeper/models_test.go b/core/services/keeper/models_test.go index 6cb2ed2b4e3..556eb329acd 100644 --- a/core/services/keeper/models_test.go +++ b/core/services/keeper/models_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" ) func TestUpkeepIdentifer_String(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range []struct { name string id string diff --git a/core/services/keeper/orm_test.go b/core/services/keeper/orm_test.go index e1a5b7e0588..80c7b946979 100644 --- a/core/services/keeper/orm_test.go +++ b/core/services/keeper/orm_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -71,6 +72,7 @@ func assertLastRunHeight(t *testing.T, db *sqlx.DB, upkeep keeper.UpkeepRegistra func TestKeeperDB_Registries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -85,6 +87,7 @@ func TestKeeperDB_Registries(t *testing.T) { func TestKeeperDB_RegistryByContractAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -99,6 +102,7 @@ func TestKeeperDB_RegistryByContractAddress(t *testing.T) { func TestKeeperDB_UpsertUpkeep(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -135,6 +139,7 @@ func TestKeeperDB_UpsertUpkeep(t *testing.T) { func TestKeeperDB_BatchDeleteUpkeepsForJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -162,6 +167,7 @@ func TestKeeperDB_BatchDeleteUpkeepsForJob(t *testing.T) { func TestKeeperDB_EligibleUpkeeps_Shuffle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -193,6 +199,7 @@ func TestKeeperDB_EligibleUpkeeps_Shuffle(t *testing.T) { func TestKeeperDB_NewEligibleUpkeeps_GracePeriod(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -221,6 +228,7 @@ func TestKeeperDB_NewEligibleUpkeeps_GracePeriod(t *testing.T) { func TestKeeperDB_EligibleUpkeeps_TurnsRandom(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -265,6 +273,7 @@ func TestKeeperDB_EligibleUpkeeps_TurnsRandom(t *testing.T) { func TestKeeperDB_NewEligibleUpkeeps_SkipIfLastPerformedByCurrentKeeper(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -288,6 +297,7 @@ func TestKeeperDB_NewEligibleUpkeeps_SkipIfLastPerformedByCurrentKeeper(t *testi func TestKeeperDB_NewEligibleUpkeeps_CoverBuddy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -313,6 +323,7 @@ func TestKeeperDB_NewEligibleUpkeeps_CoverBuddy(t *testing.T) { func TestKeeperDB_NewEligibleUpkeeps_FirstTurn(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -335,6 +346,7 @@ func TestKeeperDB_NewEligibleUpkeeps_FirstTurn(t *testing.T) { func TestKeeperDB_NewEligibleUpkeeps_FiltersByRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -360,6 +372,7 @@ func TestKeeperDB_NewEligibleUpkeeps_FiltersByRegistry(t *testing.T) { func TestKeeperDB_AllUpkeepIDsForRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -389,6 +402,7 @@ func TestKeeperDB_AllUpkeepIDsForRegistry(t *testing.T) { func TestKeeperDB_UpdateUpkeepLastKeeperIndex(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -404,6 +418,7 @@ func TestKeeperDB_UpdateUpkeepLastKeeperIndex(t *testing.T) { func TestKeeperDB_NewSetLastRunInfoForUpkeepOnJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, _, orm := setupKeeperDB(t) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -442,6 +457,7 @@ func TestKeeperDB_NewSetLastRunInfoForUpkeepOnJob(t *testing.T) { func TestKeeperDB_LeastSignificant(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db, _, _ := setupKeeperDB(t) sql := `SELECT least_significant($1, $2)` inputBytes := "10001000101010101101" @@ -488,6 +504,7 @@ func TestKeeperDB_LeastSignificant(t *testing.T) { func TestKeeperDB_Uint256ToBit(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db, _, _ := setupKeeperDB(t) sql := `SELECT uint256_to_bit($1)` for _, test := range []struct { diff --git a/core/services/keeper/registry1_1_synchronizer_test.go b/core/services/keeper/registry1_1_synchronizer_test.go index 0ca4b0216eb..ee7d26a7578 100644 --- a/core/services/keeper/registry1_1_synchronizer_test.go +++ b/core/services/keeper/registry1_1_synchronizer_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" registry1_1 "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/keeper_registry_wrapper1_1" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -70,6 +71,7 @@ func mockRegistry1_1( } func Test_LogListenerOpts1_1(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) korm := keeper.NewORM(db, logger.TestLogger(t)) ethClient := clienttest.NewClientWithDefaultChainID(t) diff --git a/core/services/keeper/registry_synchronizer_sync_test.go b/core/services/keeper/registry_synchronizer_sync_test.go index f3676f8a964..aec882a5b53 100644 --- a/core/services/keeper/registry_synchronizer_sync_test.go +++ b/core/services/keeper/registry_synchronizer_sync_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -27,6 +28,7 @@ func (g *GetUpkeepFailure) GetUpkeep(opts *bind.CallOpts, id *big.Int) (*UpkeepC } func TestSyncUpkeepWithCallback_UpkeepNotFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) log, logObserver := logger.TestLoggerObserved(t, zapcore.ErrorLevel) synchronizer := &RegistrySynchronizer{ diff --git a/core/services/keeper/upkeep_executer_unit_test.go b/core/services/keeper/upkeep_executer_unit_test.go index 36e6d1e0b53..273e2f5ed68 100644 --- a/core/services/keeper/upkeep_executer_unit_test.go +++ b/core/services/keeper/upkeep_executer_unit_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -24,6 +25,7 @@ func (r *registry) PerformGasOverhead() uint32 { return r.pgo } func (r *registry) MaxPerformDataSize() uint32 { return r.mpds } func TestBuildJobSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") from := types.EIP55Address(testutils.NewAddress().Hex()) contract := types.EIP55Address(testutils.NewAddress().Hex()) chainID := "250" diff --git a/core/services/keeper/validate_test.go b/core/services/keeper/validate_test.go index cfa6a1520f5..c2ee00c2874 100644 --- a/core/services/keeper/validate_test.go +++ b/core/services/keeper/validate_test.go @@ -5,10 +5,13 @@ import ( "time" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidatedKeeperSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") type args struct { tomlString string diff --git a/core/services/keystore/aptos_test.go b/core/services/keystore/aptos_test.go index 0fc89b7c9c4..e495b53c1ea 100644 --- a/core/services/keystore/aptos_test.go +++ b/core/services/keystore/aptos_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,7 @@ import ( ) func Test_AptosKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/keystore/internal/raw_test.go b/core/services/keystore/internal/raw_test.go index dc5162a53e2..e7c2796ae25 100644 --- a/core/services/keystore/internal/raw_test.go +++ b/core/services/keystore/internal/raw_test.go @@ -8,9 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestRaw_nonprintable(t *testing.T) { + tests.BelongsToCISuite(t, "unit") bytes, err := hex.DecodeString("f0d07ab448018b2754475f9a3b580218b0675a1456aad96ad607c7bbd7d9237b") require.NoError(t, err) r := NewRaw(bytes) diff --git a/core/services/keystore/keys/aptoskey/export_test.go b/core/services/keystore/keys/aptoskey/export_test.go index a920e432298..4319509f49f 100644 --- a/core/services/keystore/keys/aptoskey/export_test.go +++ b/core/services/keystore/keys/aptoskey/export_test.go @@ -3,10 +3,12 @@ package aptoskey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestAptosKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/aptoskey/key_test.go b/core/services/keystore/keys/aptoskey/key_test.go index 955eb153bf5..069e736aab5 100644 --- a/core/services/keystore/keys/aptoskey/key_test.go +++ b/core/services/keystore/keys/aptoskey/key_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) func TestAptosKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") bytes, err := hex.DecodeString("f0d07ab448018b2754475f9a3b580218b0675a1456aad96ad607c7bbd7d9237b") require.NoError(t, err) k := KeyFor(internal.NewRaw(bytes)) diff --git a/core/services/keystore/keys/cosmoskey/export_test.go b/core/services/keystore/keys/cosmoskey/export_test.go index 48b68c6b09b..81fb006b837 100644 --- a/core/services/keystore/keys/cosmoskey/export_test.go +++ b/core/services/keystore/keys/cosmoskey/export_test.go @@ -3,10 +3,12 @@ package cosmoskey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestCosmosKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/csakey/export_test.go b/core/services/keystore/keys/csakey/export_test.go index bc1a475b17a..70ae40d4b2e 100644 --- a/core/services/keystore/keys/csakey/export_test.go +++ b/core/services/keystore/keys/csakey/export_test.go @@ -3,10 +3,12 @@ package csakey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestCSAKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/csakey/key_v2_test.go b/core/services/keystore/keys/csakey/key_v2_test.go index d4c237a100e..514b0da7044 100644 --- a/core/services/keystore/keys/csakey/key_v2_test.go +++ b/core/services/keystore/keys/csakey/key_v2_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) func TestCSAKeyV2_FromRawPrivateKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pubKey, privKey, err := ed25519.GenerateKey(nil) require.NoError(t, err) @@ -23,6 +25,7 @@ func TestCSAKeyV2_FromRawPrivateKey(t *testing.T) { } func TestCSAKeyV2_NewV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keyV2, err := NewV2() require.NoError(t, err) diff --git a/core/services/keystore/keys/dkgrecipientkey/key_test.go b/core/services/keystore/keys/dkgrecipientkey/key_test.go index db9ca4da27d..2b653f8901e 100644 --- a/core/services/keystore/keys/dkgrecipientkey/key_test.go +++ b/core/services/keystore/keys/dkgrecipientkey/key_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) func TestNew(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -19,6 +21,7 @@ func TestNew(t *testing.T) { } func TestPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -28,6 +31,7 @@ func TestPublicKey(t *testing.T) { } func TestPublicKeyString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -37,6 +41,7 @@ func TestPublicKeyString(t *testing.T) { } func TestECDH(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key1, err := New() require.NoError(t, err) @@ -54,6 +59,7 @@ func TestECDH(t *testing.T) { } func TestRaw(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -68,6 +74,7 @@ func TestRaw(t *testing.T) { } func TestKeyUniqueness(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key1, err := New() require.NoError(t, err) diff --git a/core/services/keystore/keys/ethkey/key_v2_test.go b/core/services/keystore/keys/ethkey/key_v2_test.go index 2541967bae2..9e03214f7d4 100644 --- a/core/services/keystore/keys/ethkey/key_v2_test.go +++ b/core/services/keystore/keys/ethkey/key_v2_test.go @@ -11,10 +11,12 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) func TestEthKeyV2_ToKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privateKeyECDSA, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) require.NoError(t, err) @@ -27,6 +29,7 @@ func TestEthKeyV2_ToKey(t *testing.T) { } func TestEthKeyV2_NewV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keyV2, err := NewV2() require.NoError(t, err) diff --git a/core/services/keystore/keys/ocr2key/cosmos_keyring_test.go b/core/services/keystore/keys/ocr2key/cosmos_keyring_test.go index 9a220be5db4..d96b46f5238 100644 --- a/core/services/keystore/keys/ocr2key/cosmos_keyring_test.go +++ b/core/services/keystore/keys/ocr2key/cosmos_keyring_test.go @@ -10,9 +10,12 @@ import ( "github.com/stretchr/testify/require" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestCosmosKeyRing_Sign_Verify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newCosmosKeyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newCosmosKeyring(cryptorand.Reader) @@ -44,6 +47,7 @@ func TestCosmosKeyRing_Sign_Verify(t *testing.T) { } func TestCosmosKeyRing_Marshalling(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newCosmosKeyring(cryptorand.Reader) require.NoError(t, err) m, err := kr1.Marshal() diff --git a/core/services/keystore/keys/ocr2key/ed25519_keyring_test.go b/core/services/keystore/keys/ocr2key/ed25519_keyring_test.go index 064a45abd19..bfba4e24c05 100644 --- a/core/services/keystore/keys/ocr2key/ed25519_keyring_test.go +++ b/core/services/keystore/keys/ocr2key/ed25519_keyring_test.go @@ -10,9 +10,12 @@ import ( "github.com/stretchr/testify/require" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestAptosKeyRing_Sign_Verify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newEd25519Keyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newEd25519Keyring(cryptorand.Reader) @@ -44,6 +47,7 @@ func TestAptosKeyRing_Sign_Verify(t *testing.T) { } func TestAptosKeyRing_Marshalling(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newEd25519Keyring(cryptorand.Reader) require.NoError(t, err) m, err := kr1.Marshal() diff --git a/core/services/keystore/keys/ocr2key/evm_keyring_test.go b/core/services/keystore/keys/ocr2key/evm_keyring_test.go index 38df8ac6725..6316f67ae75 100644 --- a/core/services/keystore/keys/ocr2key/evm_keyring_test.go +++ b/core/services/keystore/keys/ocr2key/evm_keyring_test.go @@ -13,10 +13,12 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2/types" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestEVMKeyring_SignVerify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newEVMKeyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newEVMKeyring(cryptorand.Reader) @@ -49,6 +51,7 @@ func TestEVMKeyring_SignVerify(t *testing.T) { } func TestEVMKeyring_Sign3Verify3(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newEVMKeyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newEVMKeyring(cryptorand.Reader) @@ -81,6 +84,7 @@ func TestEVMKeyring_Sign3Verify3(t *testing.T) { } func TestEVMKeyring_Marshalling(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newEVMKeyring(cryptorand.Reader) require.NoError(t, err) @@ -99,6 +103,7 @@ func TestEVMKeyring_Marshalling(t *testing.T) { } func TestRawReportContext3(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string digest [32]byte diff --git a/core/services/keystore/keys/ocr2key/export_test.go b/core/services/keystore/keys/ocr2key/export_test.go index df16e6df179..3f427a74329 100644 --- a/core/services/keystore/keys/ocr2key/export_test.go +++ b/core/services/keystore/keys/ocr2key/export_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestExport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { chain chaintype.ChainType }{ diff --git a/core/services/keystore/keys/ocr2key/generic_key_bundle_test.go b/core/services/keystore/keys/ocr2key/generic_key_bundle_test.go index 06b7fdf8eec..b31c3913292 100644 --- a/core/services/keystore/keys/ocr2key/generic_key_bundle_test.go +++ b/core/services/keystore/keys/ocr2key/generic_key_bundle_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" ) @@ -31,6 +32,7 @@ type ( ) func TestGenericKeyBundle_Migrate_UnmarshalMarshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // offchain key offKey, err := newOffchainKeyring(cryptorand.Reader, cryptorand.Reader) require.NoError(t, err) diff --git a/core/services/keystore/keys/ocr2key/key_bundle_test.go b/core/services/keystore/keys/ocr2key/key_bundle_test.go index 8b23b0f064b..25b0edce0da 100644 --- a/core/services/keystore/keys/ocr2key/key_bundle_test.go +++ b/core/services/keystore/keys/ocr2key/key_bundle_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" ) @@ -18,6 +19,7 @@ func assertKeyBundlesNotEqual(t *testing.T, pk1 ocr2key.KeyBundle, pk2 ocr2key.K func TestOCR2Keys_New(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var keys []ocr2key.KeyBundle // create two keys for each chain type @@ -52,6 +54,7 @@ func TestOCR2Keys_New(t *testing.T) { func TestOCR2KeyBundle_BundleBase(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") for _, chain := range chaintype.SupportedChainTypes { kb, err := ocr2key.New(chain) diff --git a/core/services/keystore/keys/ocr2key/offchain_keyring_test.go b/core/services/keystore/keys/ocr2key/offchain_keyring_test.go index a19050548af..bad63c79b71 100644 --- a/core/services/keystore/keys/ocr2key/offchain_keyring_test.go +++ b/core/services/keystore/keys/ocr2key/offchain_keyring_test.go @@ -10,9 +10,12 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/curve25519" "golang.org/x/crypto/nacl/box" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOffchainKeyring(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr, err := newOffchainKeyring(cryptorand.Reader, cryptorand.Reader) require.NoError(t, err) pubKey := kr.OffchainPublicKey() @@ -20,6 +23,7 @@ func TestOffchainKeyring(t *testing.T) { } func TestOffchainKeyring_NaclBoxSealAnonymous(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr, err := newOffchainKeyring(cryptorand.Reader, cryptorand.Reader) require.NoError(t, err) @@ -36,6 +40,7 @@ func TestOffchainKeyring_NaclBoxSealAnonymous(t *testing.T) { } func TestOffchainKeyring_NaclBoxSealAnonymous_ShortCiphertext(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr, err := newOffchainKeyring(cryptorand.Reader, cryptorand.Reader) require.NoError(t, err) @@ -46,6 +51,7 @@ func TestOffchainKeyring_NaclBoxSealAnonymous_ShortCiphertext(t *testing.T) { } func TestOffchainKeyring_NaclBoxSealAnonymous_FailedDecryption(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr, err := newOffchainKeyring(cryptorand.Reader, cryptorand.Reader) require.NoError(t, err) diff --git a/core/services/keystore/keys/ocr2key/solana_keyring_test.go b/core/services/keystore/keys/ocr2key/solana_keyring_test.go index e391848a4b9..ed9a3e3ffdc 100644 --- a/core/services/keystore/keys/ocr2key/solana_keyring_test.go +++ b/core/services/keystore/keys/ocr2key/solana_keyring_test.go @@ -9,9 +9,12 @@ import ( "github.com/stretchr/testify/require" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestSolanaKeyring_Sign_Verify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newSolanaKeyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newSolanaKeyring(cryptorand.Reader) @@ -43,6 +46,7 @@ func TestSolanaKeyring_Sign_Verify(t *testing.T) { } func TestSolanaKeyring_Marshalling(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newSolanaKeyring(cryptorand.Reader) require.NoError(t, err) m, err := kr1.Marshal() diff --git a/core/services/keystore/keys/ocr2key/ton_keyring_test.go b/core/services/keystore/keys/ocr2key/ton_keyring_test.go index 32890a979f6..812de73e73a 100644 --- a/core/services/keystore/keys/ocr2key/ton_keyring_test.go +++ b/core/services/keystore/keys/ocr2key/ton_keyring_test.go @@ -10,9 +10,12 @@ import ( "github.com/xssnick/tonutils-go/tvm/cell" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTONKeyring_Sign_Verify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newTONKeyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newTONKeyring(cryptorand.Reader) @@ -44,6 +47,7 @@ func TestTONKeyring_Sign_Verify(t *testing.T) { } func TestTONKeyring_Sign3_Verify3(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newTONKeyring(cryptorand.Reader) require.NoError(t, err) kr2, err := newTONKeyring(cryptorand.Reader) @@ -80,6 +84,7 @@ func TestTONKeyring_Sign3_Verify3(t *testing.T) { } func TestTONKeyring_Marshalling(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := newEd25519Keyring(cryptorand.Reader) require.NoError(t, err) m, err := kr1.Marshal() diff --git a/core/services/keystore/keys/ocrkey/config_public_key_test.go b/core/services/keystore/keys/ocrkey/config_public_key_test.go index f3d257bd1fc..67c150ce848 100644 --- a/core/services/keystore/keys/ocrkey/config_public_key_test.go +++ b/core/services/keystore/keys/ocrkey/config_public_key_test.go @@ -6,9 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCRKey_ConfigPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") k := MustNewV2XXXTestingOnly(big.NewInt(1)) t.Run("fails to unmarshal invalid JSON", func(t *testing.T) { diff --git a/core/services/keystore/keys/ocrkey/export_test.go b/core/services/keystore/keys/ocrkey/export_test.go index 347babb31cc..028c42d74cf 100644 --- a/core/services/keystore/keys/ocrkey/export_test.go +++ b/core/services/keystore/keys/ocrkey/export_test.go @@ -3,10 +3,12 @@ package ocrkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestOCRKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/ocrkey/key_v2_test.go b/core/services/keystore/keys/ocrkey/key_v2_test.go index c7cda7e7bd8..65adc2c72d7 100644 --- a/core/services/keystore/keys/ocrkey/key_v2_test.go +++ b/core/services/keystore/keys/ocrkey/key_v2_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ) @@ -20,6 +21,7 @@ func assertKeyBundlesNotEqual(t *testing.T, pk1 ocrkey.KeyV2, pk2 ocrkey.KeyV2) func TestOCRKeys_New(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pk1, err := ocrkey.NewV2() require.NoError(t, err) pk2, err := ocrkey.NewV2() @@ -32,6 +34,7 @@ func TestOCRKeys_New(t *testing.T) { } func TestOCRKeys_Raw_Key(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") key := ocrkey.MustNewV2XXXTestingOnly(big.NewInt(1)) require.Equal(t, key.ID(), ocrkey.KeyFor(key.Raw()).ID()) } diff --git a/core/services/keystore/keys/ocrkey/off_chain_private_key_test.go b/core/services/keystore/keys/ocrkey/off_chain_private_key_test.go index a7eadc72860..079165011d0 100644 --- a/core/services/keystore/keys/ocrkey/off_chain_private_key_test.go +++ b/core/services/keystore/keys/ocrkey/off_chain_private_key_test.go @@ -5,10 +5,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCRKeys_OffChainPrivateKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") k, err := NewV2() require.NoError(t, err) diff --git a/core/services/keystore/keys/ocrkey/off_chain_public_key_test.go b/core/services/keystore/keys/ocrkey/off_chain_public_key_test.go index 372ca8b273b..45afa85a767 100644 --- a/core/services/keystore/keys/ocrkey/off_chain_public_key_test.go +++ b/core/services/keystore/keys/ocrkey/off_chain_public_key_test.go @@ -7,11 +7,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ) func TestOCR_OffchainPublicKey_MarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rawBytes := make([]byte, 32) rawBytes[31] = 1 pubKey := ocrkey.OffChainPublicKey(rawBytes) @@ -26,6 +28,7 @@ func TestOCR_OffchainPublicKey_MarshalJSON(t *testing.T) { func TestOCR_OffchainPublicKey_UnmarshalJSON_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pubKeyString := "918a65a518c005d6367309bec4b26805f8afabef72cbf9940d9a0fd04ec80b38" pubKeyJSON := fmt.Sprintf(`"%s"`, pubKeyString) @@ -38,6 +41,7 @@ func TestOCR_OffchainPublicKey_UnmarshalJSON_Happy(t *testing.T) { func TestOCR_OffchainPublicKey_UnmarshalJSON_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pubKeyString := "hello world" pubKeyJSON := fmt.Sprintf(`"%s"`, pubKeyString) diff --git a/core/services/keystore/keys/ocrkey/on_chain_private_key_test.go b/core/services/keystore/keys/ocrkey/on_chain_private_key_test.go index 8613eb1d405..11f329b94ab 100644 --- a/core/services/keystore/keys/ocrkey/on_chain_private_key_test.go +++ b/core/services/keystore/keys/ocrkey/on_chain_private_key_test.go @@ -8,10 +8,13 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCRKeys_OnChainPrivateKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pk, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) require.NoError(t, err) diff --git a/core/services/keystore/keys/ocrkey/on_chain_public_key_test.go b/core/services/keystore/keys/ocrkey/on_chain_public_key_test.go index 2828fd74db3..fb8e08fee0a 100644 --- a/core/services/keystore/keys/ocrkey/on_chain_public_key_test.go +++ b/core/services/keystore/keys/ocrkey/on_chain_public_key_test.go @@ -8,10 +8,13 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCRKeys_OnChainPublicKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pk, err := ecdsa.GenerateKey(crypto.S256(), rand.Reader) require.NoError(t, err) diff --git a/core/services/keystore/keys/ocrkey/on_chain_signing_address_test.go b/core/services/keystore/keys/ocrkey/on_chain_signing_address_test.go index e45da17f03a..7282358956a 100644 --- a/core/services/keystore/keys/ocrkey/on_chain_signing_address_test.go +++ b/core/services/keystore/keys/ocrkey/on_chain_signing_address_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ) func TestOCR_OnChainSigningAddress_String(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // should contain EIP55CapitalizedAddress const ocrSigningKey = "ocrsad_0x30762A700F7d836528dfB14DD60Ec2A3aEaA7694" diff --git a/core/services/keystore/keys/p2pkey/export_test.go b/core/services/keystore/keys/p2pkey/export_test.go index cd9ceb9064c..a33cb5f1ae7 100644 --- a/core/services/keystore/keys/p2pkey/export_test.go +++ b/core/services/keystore/keys/p2pkey/export_test.go @@ -3,10 +3,12 @@ package p2pkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestP2PKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/p2pkey/key_v2_test.go b/core/services/keystore/keys/p2pkey/key_v2_test.go index 8aedb5674d9..94c4565c110 100644 --- a/core/services/keystore/keys/p2pkey/key_v2_test.go +++ b/core/services/keystore/keys/p2pkey/key_v2_test.go @@ -9,9 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestP2PKeys_KeyV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kv2, err := NewV2() require.NoError(t, err) diff --git a/core/services/keystore/keys/p2pkey/peer_id_test.go b/core/services/keystore/keys/p2pkey/peer_id_test.go index 3d4ad05d5f2..46650423168 100644 --- a/core/services/keystore/keys/p2pkey/peer_id_test.go +++ b/core/services/keystore/keys/p2pkey/peer_id_test.go @@ -6,9 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestP2PKeys_PeerID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("make peer ID", func(t *testing.T) { id, err := MakePeerID("12D3KooWM1111111111111111111111111111111111111111111") require.NoError(t, err) @@ -46,6 +49,7 @@ func TestP2PKeys_PeerID(t *testing.T) { } func TestPeerID_marshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") id, err := MakePeerID("p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw") require.NoError(t, err) t.Run("json", func(t *testing.T) { diff --git a/core/services/keystore/keys/solkey/export_test.go b/core/services/keystore/keys/solkey/export_test.go index aeae61da475..eff44ee4bb4 100644 --- a/core/services/keystore/keys/solkey/export_test.go +++ b/core/services/keystore/keys/solkey/export_test.go @@ -3,10 +3,12 @@ package solkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestSolanaKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/starkkey/export_test.go b/core/services/keystore/keys/starkkey/export_test.go index 27caa1744b4..8043ab7fafc 100644 --- a/core/services/keystore/keys/starkkey/export_test.go +++ b/core/services/keystore/keys/starkkey/export_test.go @@ -3,11 +3,13 @@ package starkkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestStarkNetKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/starkkey/ocr2key_test.go b/core/services/keystore/keys/starkkey/ocr2key_test.go index 02b1d9d4896..b66042db879 100644 --- a/core/services/keystore/keys/starkkey/ocr2key_test.go +++ b/core/services/keystore/keys/starkkey/ocr2key_test.go @@ -15,6 +15,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) @@ -37,6 +38,7 @@ import ( // privKey 3571531812827697194985986636869245829152430835021673171507607525908246940354 r 3242770073040892094735101607173275538752888766491356946211654602282309624331 s 2150742645846855766116236144967953798077492822890095121354692808525999221887 pubKey 2445157821578193538289426656074203099996547227497157254541771705133209838679 func TestStarknetKeyring_TestVector(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var kr1 OCR2Key bigKey, _ := new(big.Int).SetString("2137244795266879235401249500471353867704187908407744160927664772020405449078", 10) feltKey, err := new(felt.Felt).SetString(bigKey.String()) @@ -115,6 +117,7 @@ func TestStarknetKeyring_TestVector(t *testing.T) { } func TestStarknetKeyring_Sign_Verify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr1, err := NewOCR2Key(cryptorand.Reader) require.NoError(t, err) kr2, err := NewOCR2Key(cryptorand.Reader) @@ -177,6 +180,7 @@ func TestStarknetKeyring_Sign_Verify(t *testing.T) { } func TestStarknetKeyring_Marshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testStarknetKeyringMarshal(t, cryptorand.Reader) } diff --git a/core/services/keystore/keys/suikey/export_test.go b/core/services/keystore/keys/suikey/export_test.go index 993629d0e57..04cc58e296f 100644 --- a/core/services/keystore/keys/suikey/export_test.go +++ b/core/services/keystore/keys/suikey/export_test.go @@ -3,10 +3,12 @@ package suikey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestSuiKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/suikey/key_test.go b/core/services/keystore/keys/suikey/key_test.go index 4f43b0563be..b06012017fa 100644 --- a/core/services/keystore/keys/suikey/key_test.go +++ b/core/services/keystore/keys/suikey/key_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) func TestSuiKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") bytes, err := hex.DecodeString("f0d07ab448018b2754475f9a3b580218b0675a1456aad96ad607c7bbd7d9237b") require.NoError(t, err) k := KeyFor(internal.NewRaw(bytes)) diff --git a/core/services/keystore/keys/tonkey/export_test.go b/core/services/keystore/keys/tonkey/export_test.go index 384ccc30af3..98221b55e6b 100644 --- a/core/services/keystore/keys/tonkey/export_test.go +++ b/core/services/keystore/keys/tonkey/export_test.go @@ -3,10 +3,12 @@ package tonkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestTONKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/tonkey/key_test.go b/core/services/keystore/keys/tonkey/key_test.go index e8e9ab20ec7..5d931d136ad 100644 --- a/core/services/keystore/keys/tonkey/key_test.go +++ b/core/services/keystore/keys/tonkey/key_test.go @@ -11,9 +11,12 @@ import ( "github.com/stretchr/testify/require" "github.com/xssnick/tonutils-go/address" "github.com/xssnick/tonutils-go/ton/wallet" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTONKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Generate new key and verify its components", func(t *testing.T) { // Generate a new key key, err := New() diff --git a/core/services/keystore/keys/tronkey/account_test.go b/core/services/keystore/keys/tronkey/account_test.go index 9a92801bb13..b4be8d548a6 100644 --- a/core/services/keystore/keys/tronkey/account_test.go +++ b/core/services/keystore/keys/tronkey/account_test.go @@ -7,9 +7,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_DecodeBase58(t *testing.T) { + tests.BelongsToCISuite(t, "unit") invalidAddresses := []string{ "TronEnergyioE1Z3ukeRv38sYkv5Jn55bL", "TronEnergyioNijNo8g3LF2ABKUAae6D2Z", @@ -34,6 +37,7 @@ func Test_DecodeBase58(t *testing.T) { } func TestAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Valid Addresses", func(t *testing.T) { validAddresses := []string{ "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", @@ -104,6 +108,7 @@ func TestAddress(t *testing.T) { } func TestHexToAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Valid Hex Addresses", func(t *testing.T) { validHexAddresses := []string{ "41a614f803b6fd780986a42c78ec9c7f77e6ded13c", diff --git a/core/services/keystore/keys/tronkey/export_test.go b/core/services/keystore/keys/tronkey/export_test.go index 5e3e605ed34..cb6347aa33e 100644 --- a/core/services/keystore/keys/tronkey/export_test.go +++ b/core/services/keystore/keys/tronkey/export_test.go @@ -3,10 +3,12 @@ package tronkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestTronKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/tronkey/key_test.go b/core/services/keystore/keys/tronkey/key_test.go index 9ec74946f90..136007df3d9 100644 --- a/core/services/keystore/keys/tronkey/key_test.go +++ b/core/services/keystore/keys/tronkey/key_test.go @@ -7,9 +7,12 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTronKeyNewKeyGeneration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Generate new key and verify its components", func(t *testing.T) { // Generate a new key key, err := New() @@ -33,6 +36,7 @@ func TestTronKeyNewKeyGeneration(t *testing.T) { } func TestKeyAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Known private key and expected address", func(t *testing.T) { // Tests cases from https://developers.tron.network/docs/account privateKeyHex := "b406adb115b43e103c7b1dc8b5931f63279a5b6b2cf7328638814c43171a2908" diff --git a/core/services/keystore/keys/vrfkey/crypto_test.go b/core/services/keystore/keys/vrfkey/crypto_test.go index c81553c99ff..045860cc097 100644 --- a/core/services/keystore/keys/vrfkey/crypto_test.go +++ b/core/services/keystore/keys/vrfkey/crypto_test.go @@ -6,24 +6,29 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" bm "github.com/smartcontractkit/chainlink/v2/core/utils/big_math" ) func TestVRF_IsSquare(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.True(t, IsSquare(bm.Four)) minusOneModP := bm.I().Sub(FieldSize, bm.One) assert.False(t, IsSquare(minusOneModP)) } func TestVRF_SquareRoot(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.Equal(t, bm.Two, SquareRoot(bm.Four)) } func TestVRF_YSquared(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.Equal(t, bm.Add(bm.Mul(bm.Two, bm.Mul(bm.Two, bm.Two)), bm.Seven), YSquared(bm.Two)) // 2³+7 } func TestVRF_IsCurveXOrdinate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.True(t, IsCurveXOrdinate(big.NewInt(1))) assert.False(t, IsCurveXOrdinate(big.NewInt(5))) } diff --git a/core/services/keystore/keys/vrfkey/export_test.go b/core/services/keystore/keys/vrfkey/export_test.go index c262853c584..fe5f3f66883 100644 --- a/core/services/keystore/keys/vrfkey/export_test.go +++ b/core/services/keystore/keys/vrfkey/export_test.go @@ -3,10 +3,12 @@ package vrfkey import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) func TestVRFKeys_ExportImport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/vrfkey/key_v2_test.go b/core/services/keystore/keys/vrfkey/key_v2_test.go index 82754444f9d..b0c29a8069f 100644 --- a/core/services/keystore/keys/vrfkey/key_v2_test.go +++ b/core/services/keystore/keys/vrfkey/key_v2_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" ) func TestVRFKeys_KeyV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") k, err := NewV2() require.NoError(t, err) diff --git a/core/services/keystore/keys/vrfkey/models_test.go b/core/services/keystore/keys/vrfkey/models_test.go index e603e6aadae..39a8305d02f 100644 --- a/core/services/keystore/keys/vrfkey/models_test.go +++ b/core/services/keystore/keys/vrfkey/models_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestVRFKeys_Models(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kv2, err := NewV2() require.NoError(t, err) k := EncryptedVRFKey{ diff --git a/core/services/keystore/keys/vrfkey/proof_test.go b/core/services/keystore/keys/vrfkey/proof_test.go index 0a6af4b088a..d9ab44bba1f 100644 --- a/core/services/keystore/keys/vrfkey/proof_test.go +++ b/core/services/keystore/keys/vrfkey/proof_test.go @@ -7,9 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestVRF_VerifyProof(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sk, err := NewV2() require.NoError(t, err) seed, nonce := big.NewInt(2), big.NewInt(3) diff --git a/core/services/keystore/keys/workflowkey/key_test.go b/core/services/keystore/keys/workflowkey/key_test.go index 61789b97685..028a67ef62c 100644 --- a/core/services/keystore/keys/workflowkey/key_test.go +++ b/core/services/keystore/keys/workflowkey/key_test.go @@ -10,10 +10,12 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/nacl/box" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" ) func TestNew(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -22,6 +24,7 @@ func TestNew(t *testing.T) { } func TestPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -29,6 +32,7 @@ func TestPublicKey(t *testing.T) { } func TestEncryptKeyFromRawPrivateKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") boxPubKey, boxPrivKey, err := box.GenerateKey(cryptorand.Reader) require.NoError(t, err) @@ -46,6 +50,7 @@ func TestEncryptKeyFromRawPrivateKey(t *testing.T) { } func TestPublicKeyStringAndID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := "my-test-public-key" var pubkey [32]byte copy(pubkey[:], key) @@ -64,6 +69,7 @@ func TestPublicKeyStringAndID(t *testing.T) { } func TestDecrypt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := New() require.NoError(t, err) @@ -78,6 +84,7 @@ func TestDecrypt(t *testing.T) { } func TestMustNewXXXTestingOnly(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string k *big.Int diff --git a/core/services/keystore/models_test.go b/core/services/keystore/models_test.go index 658db7597da..ee2b4b33993 100644 --- a/core/services/keystore/models_test.go +++ b/core/services/keystore/models_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/internal" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" @@ -25,6 +26,7 @@ import ( const password = "password" func TestKeyRing_Encrypt_Decrypt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") csa1, csa2 := csakey.MustNewV2XXXTestingOnly(big.NewInt(1)), csakey.MustNewV2XXXTestingOnly(big.NewInt(2)) eth1, eth2 := mustNewEthKey(t), mustNewEthKey(t) ocr := []ocrkey.KeyV2{ diff --git a/core/services/llo/bm/dummy_transmitter_test.go b/core/services/llo/bm/dummy_transmitter_test.go index e6c59e2f9e9..e5ad8514b6b 100644 --- a/core/services/llo/bm/dummy_transmitter_test.go +++ b/core/services/llo/bm/dummy_transmitter_test.go @@ -12,11 +12,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func Test_DummyTransmitter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.DebugLevel) tr := NewTransmitter(lggr, "dummy") diff --git a/core/services/llo/channeldefinitions/channel_definition_cache_factory_test.go b/core/services/llo/channeldefinitions/channel_definition_cache_factory_test.go index 024f2b1fff6..b9336b8b2d0 100644 --- a/core/services/llo/channeldefinitions/channel_definition_cache_factory_test.go +++ b/core/services/llo/channeldefinitions/channel_definition_cache_factory_test.go @@ -6,11 +6,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" lloconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/llo/config" ) func Test_ChannelDefinitionCacheFactory(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) cdcFactory := NewChannelDefinitionCacheFactory(lggr, nil, nil, nil) diff --git a/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go b/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go index 5268303bcb4..657cf23ed2f 100644 --- a/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go +++ b/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go @@ -19,6 +19,9 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-common/pkg/types/query" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink-evm/gethwrappers/llo-feeds/generated/channel_config_store" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/llo/types" @@ -193,6 +196,7 @@ func addChannelDefinitions(defs llotypes.ChannelDefinitions, startID, endID uint } func Test_ChannelDefinitionCache(t *testing.T) { + tests.BelongsToCISuite(t, "unit") donID := rand.Uint32() t.Run("Definitions", func(t *testing.T) { @@ -1275,6 +1279,7 @@ func Test_ChannelDefinitionCache(t *testing.T) { } func Test_filterName(t *testing.T) { + tests.BelongsToCISuite(t, "unit") s := types.ChannelDefinitionCacheFilterName(common.Address{1, 2, 3}, 654) require.Equal(t, "OCR3 LLO ChannelDefinitionCachePoller - 0x0102030000000000000000000000000000000000:654", s) } diff --git a/core/services/llo/cleanup_test.go b/core/services/llo/cleanup_test.go index 028c1180199..e030ca33f8e 100644 --- a/core/services/llo/cleanup_test.go +++ b/core/services/llo/cleanup_test.go @@ -15,6 +15,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -55,6 +56,7 @@ func makeSampleTransmission(seqNr uint64, sURL string) *mercurytransmitter.Trans } func Test_Cleanup(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lp := &mockLogPoller{} diff --git a/core/services/llo/cre/report_codec_test.go b/core/services/llo/cre/report_codec_test.go index f2ed6cd24dd..8367f81a33f 100644 --- a/core/services/llo/cre/report_codec_test.go +++ b/core/services/llo/cre/report_codec_test.go @@ -16,9 +16,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_ReportCodec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Encode: Without Opts SUCCESS", func(t *testing.T) { donID := uint32(1) c := NewReportCodecCapabilityTrigger(logger.Test(t), donID) diff --git a/core/services/llo/cre/transmitter_test.go b/core/services/llo/cre/transmitter_test.go index 576f8ec80f8..79c2f95483f 100644 --- a/core/services/llo/cre/transmitter_test.go +++ b/core/services/llo/cre/transmitter_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-data-streams/llo" datastreamsllo "github.com/smartcontractkit/chainlink-data-streams/llo" "github.com/smartcontractkit/chainlink-protos/cre/go/values" @@ -23,6 +24,7 @@ const ( ) func Test_Transmitter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") digest := types.ConfigDigest{1, 2, 3} sigs := []types.AttributedOnchainSignature{ { diff --git a/core/services/llo/grpc/client_test.go b/core/services/llo/grpc/client_test.go index 6374c13abac..7eb336f0678 100644 --- a/core/services/llo/grpc/client_test.go +++ b/core/services/llo/grpc/client_test.go @@ -14,12 +14,14 @@ import ( "google.golang.org/grpc/metadata" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-data-streams/rpc" "github.com/smartcontractkit/chainlink-data-streams/rpc/mtls" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func Test_Client(t *testing.T) { + tests.BelongsToCISuite(t, "unit") clientPrivKey := ed25519.NewKeyFromSeed(randomBytes(t, 32)) serverPrivKey := ed25519.NewKeyFromSeed(randomBytes(t, 32)) diff --git a/core/services/llo/mercurytransmitter/orm_test.go b/core/services/llo/mercurytransmitter/orm_test.go index f36b32d3af6..da7c4dff640 100644 --- a/core/services/llo/mercurytransmitter/orm_test.go +++ b/core/services/llo/mercurytransmitter/orm_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) @@ -18,6 +19,7 @@ var ( ) func TestORM(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/llo/observation/cache_test.go b/core/services/llo/observation/cache_test.go index f4ec3da6dc9..3718f88e827 100644 --- a/core/services/llo/observation/cache_test.go +++ b/core/services/llo/observation/cache_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-data-streams/llo" ) @@ -48,6 +49,7 @@ func (m *mockStreamValue) Type() llo.LLOStreamValue_Type { } func TestNewCache(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string cleanupInterval time.Duration @@ -77,6 +79,7 @@ func TestNewCache(t *testing.T) { } func TestCache_Add_Get(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string streamID llotypes.StreamID @@ -129,6 +132,7 @@ func TestCache_Add_Get(t *testing.T) { } func TestCache_Cleanup(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cache := NewCache(time.Millisecond) streamID := llotypes.StreamID(1) value := &mockStreamValue{value: []byte{42}} @@ -141,6 +145,7 @@ func TestCache_Cleanup(t *testing.T) { } func TestCache_ConcurrentAccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cache := NewCache(0) const numGoroutines = 10 const numOperations = uint32(1000) @@ -171,6 +176,7 @@ func TestCache_ConcurrentAccess(t *testing.T) { } func TestCache_ConcurrentReadWrite(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cache := NewCache(0) const numGoroutines = 10 const numOperations = uint32(1000) @@ -204,6 +210,7 @@ func TestCache_ConcurrentReadWrite(t *testing.T) { } func TestCache_ConcurrentAddGet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cache := NewCache(0) const numGoroutines = 10 const numOperations = uint32(1000) diff --git a/core/services/llo/observation/data_source_test.go b/core/services/llo/observation/data_source_test.go index 27bf1338b89..f9bbe046058 100644 --- a/core/services/llo/observation/data_source_test.go +++ b/core/services/llo/observation/data_source_test.go @@ -23,6 +23,7 @@ import ( llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-data-streams/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" clhttptest "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/httptest" @@ -175,6 +176,7 @@ func (m *mockTelemeter) CaptureObservationTelemetry() bool { var observationTimeout = 100 * time.Millisecond func Test_DataSource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.NullLogger mainCtx := testutils.Context(t) opts := &mockOpts{} diff --git a/core/services/llo/observation/observation_context_test.go b/core/services/llo/observation/observation_context_test.go index 6a0a0c5e017..349860b95ff 100644 --- a/core/services/llo/observation/observation_context_test.go +++ b/core/services/llo/observation/observation_context_test.go @@ -23,6 +23,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-data-streams/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" clhttptest "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/httptest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -57,6 +58,7 @@ func makePipelineWithMultipleStreamResults(streamIDs []streams.StreamID, results } func TestObservationContext_Observe(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() r := &mockRegistry{} telem := &mockTelemeter{} @@ -142,6 +144,7 @@ func TestObservationContext_Observe(t *testing.T) { } func TestObservationContext_Observe_concurrencyStressTest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() r := &mockRegistry{} telem := &mockTelemeter{} @@ -217,6 +220,7 @@ func createBridge(t testing.TB, name string, val string, borm bridges.ORM, maxCa } func TestObservationContext_Observe_integrationRealPipeline(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/llo/retirement/plugin_scoped_retirement_report_cache_test.go b/core/services/llo/retirement/plugin_scoped_retirement_report_cache_test.go index c56d1bd9b21..f2e7e58c00e 100644 --- a/core/services/llo/retirement/plugin_scoped_retirement_report_cache_test.go +++ b/core/services/llo/retirement/plugin_scoped_retirement_report_cache_test.go @@ -15,6 +15,7 @@ import ( retirement "github.com/smartcontractkit/chainlink-data-streams/llo/reportcodecs/retirement" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func FuzzPluginScopedRetirementReportCache_CheckAttestedRetirementReport(f *testing.F) { @@ -69,6 +70,7 @@ func (m *mockCodec) Decode(b []byte) (datastreamsllo.RetirementReport, error) { } func Test_PluginScopedRetirementReportCache(t *testing.T) { + tests.BelongsToCISuite(t, "unit") rrc := &mockRetirementReportCache{} v := &mockVerifier{} c := &mockCodec{} diff --git a/core/services/llo/retirement/retirement_report_cache_test.go b/core/services/llo/retirement/retirement_report_cache_test.go index 9d2a158e285..20deffd5cc5 100644 --- a/core/services/llo/retirement/retirement_report_cache_test.go +++ b/core/services/llo/retirement/retirement_report_cache_test.go @@ -10,6 +10,7 @@ import ( ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -41,6 +42,7 @@ func (m *mockORM) LoadConfigs(ctx context.Context) ([]Config, error) { func Test_RetirementReportCache(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() lggr := logger.TestLogger(t) diff --git a/core/services/llo/retirement/retirement_report_orm_test.go b/core/services/llo/retirement/retirement_report_orm_test.go index 943233587e6..41dd1c9c9be 100644 --- a/core/services/llo/retirement/retirement_report_orm_test.go +++ b/core/services/llo/retirement/retirement_report_orm_test.go @@ -8,10 +8,12 @@ import ( ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) func Test_RetirementReportCache_ORM(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) orm := &retirementReportCacheORM{db} ctx := t.Context() diff --git a/core/services/llo/telem/sampling_test.go b/core/services/llo/telem/sampling_test.go index 804a87dda2c..648b579796f 100644 --- a/core/services/llo/telem/sampling_test.go +++ b/core/services/llo/telem/sampling_test.go @@ -15,11 +15,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-data-streams/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" ) func TestFingerprint(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ot := time.Now() bytes32 := sha256.Sum256([]byte(ot.String())) @@ -113,6 +115,7 @@ func TestFingerprint(t *testing.T) { // TestSample ensures Sample() correctly chooses which messages to send. func TestSample(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestSugared(t) ctx, cancel := context.WithCancel(context.Background()) @@ -143,6 +146,7 @@ func TestSample(t *testing.T) { // TestPruningLoop ensures the pruning loop works as expected. func TestPruningLoop(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestSugared(t) ctx, cancel := context.WithCancel(context.Background()) @@ -193,6 +197,7 @@ func TestPruningLoop(t *testing.T) { // TestPruningLoop_Exits ensures the pruning loop exits when its context is cancelled and doesn't leak goroutines. func TestPruningLoop_Exits(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestSugared(t) ctx, cancel := context.WithCancel(context.Background()) diff --git a/core/services/llo/telem/telemetry_test.go b/core/services/llo/telem/telemetry_test.go index 836b7cc2dd2..d7fbd4ae918 100644 --- a/core/services/llo/telem/telemetry_test.go +++ b/core/services/llo/telem/telemetry_test.go @@ -27,6 +27,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/telemetry" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var _ telemetry.MultitypeMonitoringEndpoint = &mockMonitoringEndpoint{} @@ -140,6 +141,7 @@ var trrs = pipeline.TaskRunResults{ } func Test_Telemeter_v3PremiumLegacy(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) m := &mockMonitoringEndpoint{} @@ -271,6 +273,7 @@ func Test_Telemeter_v3PremiumLegacy(t *testing.T) { func Test_Telemeter_observationScopedTelemetry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) donID := uint32(1) @@ -406,6 +409,7 @@ func Test_Telemeter_observationScopedTelemetry(t *testing.T) { func Test_Telemeter_outcomeTelemetry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) donID := uint32(1) @@ -533,6 +537,7 @@ func Test_Telemeter_outcomeTelemetry(t *testing.T) { func Test_Telemeter_reportTelemetry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) donID := uint32(1) diff --git a/core/services/nodestatusreporter/bridgestatus/bridge_status_reporter_test.go b/core/services/nodestatusreporter/bridgestatus/bridge_status_reporter_test.go index e330f7b3aa3..9ddaa679b9f 100644 --- a/core/services/nodestatusreporter/bridgestatus/bridge_status_reporter_test.go +++ b/core/services/nodestatusreporter/bridgestatus/bridge_status_reporter_test.go @@ -21,6 +21,7 @@ import ( "google.golang.org/protobuf/proto" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" bridgeMocks "github.com/smartcontractkit/chainlink/v2/core/bridges/mocks" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -124,6 +125,7 @@ func setupTestServiceWithIgnoreFlags(t *testing.T, enabled bool, pollingInterval } func TestNewBridgeStatusReporter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, _, _ := setupTestService(t, true, testPollingInterval, httpClient) @@ -132,6 +134,7 @@ func TestNewBridgeStatusReporter(t *testing.T) { } func TestService_Start_Disabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, _, _ := setupTestService(t, false, testPollingInterval, httpClient) @@ -144,6 +147,7 @@ func TestService_Start_Disabled(t *testing.T) { } func TestService_Start_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, bridgeORM, jobORM, emitter := setupTestService(t, true, 100*time.Millisecond, httpClient) @@ -161,6 +165,7 @@ func TestService_Start_Enabled(t *testing.T) { } func TestService_HealthReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, _, _ := setupTestService(t, true, testPollingInterval, httpClient) @@ -169,6 +174,7 @@ func TestService_HealthReport(t *testing.T) { } func TestService_pollAllBridges_NoBridges(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, bridgeORM, _, _ := setupTestService(t, true, testPollingInterval, httpClient) @@ -185,6 +191,7 @@ func TestService_pollAllBridges_NoBridges(t *testing.T) { } func TestService_pollAllBridges_WithBridges(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, bridgeORM, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -204,6 +211,7 @@ func TestService_pollAllBridges_WithBridges(t *testing.T) { } func TestService_pollAllBridges_FetchError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, bridgeORM, _, _ := setupTestService(t, true, testPollingInterval, httpClient) @@ -220,6 +228,7 @@ func TestService_pollAllBridges_FetchError(t *testing.T) { } func TestService_pollBridge_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -236,6 +245,7 @@ func TestService_pollBridge_Success(t *testing.T) { } func TestService_pollBridge_HTTPError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -255,6 +265,7 @@ func TestService_pollBridge_HTTPError(t *testing.T) { } func TestService_pollBridge_InvalidJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient("invalid json", http.StatusOK) service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -273,6 +284,7 @@ func TestService_pollBridge_InvalidJSON(t *testing.T) { } func TestService_pollBridge_InvalidURL(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -292,6 +304,7 @@ func TestService_pollBridge_InvalidURL(t *testing.T) { } func TestService_pollBridge_EmptyURL(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -311,6 +324,7 @@ func TestService_pollBridge_EmptyURL(t *testing.T) { } func TestService_pollBridge_URLPathPreservation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Create mock that expects the exact URL with preserved path + status httpClient := mocks.NewMockHTTPClientWithExpectedURL( loadFixture(t, "bridge_status_response.json"), @@ -333,6 +347,7 @@ func TestService_pollBridge_URLPathPreservation(t *testing.T) { } func TestService_pollBridge_Non200Status(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient("Not Found", http.StatusNotFound) service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -351,6 +366,7 @@ func TestService_pollBridge_Non200Status(t *testing.T) { } func TestService_emitBridgeStatus_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, _, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -363,6 +379,7 @@ func TestService_emitBridgeStatus_Success(t *testing.T) { } func TestService_pollAllBridges_RefreshError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, bridgeORM, _, _ := setupTestService(t, true, testPollingInterval, httpClient) @@ -380,6 +397,7 @@ func TestService_pollAllBridges_RefreshError(t *testing.T) { } func TestService_pollAllBridges_MultipleBridges(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, bridgeORM, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -419,6 +437,7 @@ func TestService_pollAllBridges_MultipleBridges(t *testing.T) { } func TestService_emitBridgeStatus_CaptureOutput(t *testing.T) { + tests.BelongsToCISuite(t, "unit") emitter := mocks.NewBeholderEmitter() var capturedProtobufBytes []byte @@ -497,6 +516,7 @@ func TestService_emitBridgeStatus_CaptureOutput(t *testing.T) { } func TestService_Start_AlreadyStarted(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, bridgeORM, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -519,6 +539,7 @@ func TestService_Start_AlreadyStarted(t *testing.T) { } func TestService_Close_AlreadyClosed(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, bridgeORM, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -541,6 +562,7 @@ func TestService_Close_AlreadyClosed(t *testing.T) { } func TestService_PollAllBridges_3000Bridges(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, mockORM, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -585,6 +607,7 @@ func TestService_PollAllBridges_3000Bridges(t *testing.T) { } func TestService_PollAllBridges_ContextTimeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, mockORM, jobORM, _ := setupTestService(t, true, testPollingInterval, httpClient) @@ -625,6 +648,7 @@ func TestService_PollAllBridges_ContextTimeout(t *testing.T) { } func TestService_emitBridgeStatus_EmptyFields(t *testing.T) { + tests.BelongsToCISuite(t, "unit") emitter := mocks.NewBeholderEmitter() var capturedProtobufBytes []byte @@ -681,6 +705,7 @@ func TestService_emitBridgeStatus_EmptyFields(t *testing.T) { // Test for external job IDs and job names functionality func TestService_pollBridge_WithJobInfo(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -730,6 +755,7 @@ func TestService_pollBridge_WithJobInfo(t *testing.T) { } func TestService_pollBridge_JobORMError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, _, jobORM, emitter := setupTestService(t, true, testPollingInterval, httpClient) @@ -748,6 +774,7 @@ func TestService_pollBridge_JobORMError(t *testing.T) { // Test ignoreJoblessBridges functionality func TestService_pollBridge_IgnoreJoblessBridges_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Use a nil httpClient since no HTTP request should be made when bridge is skipped for having no jobs httpClient := &http.Client{} service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, true, true) @@ -766,6 +793,7 @@ func TestService_pollBridge_IgnoreJoblessBridges_Enabled(t *testing.T) { } func TestService_pollBridge_IgnoreJoblessBridges_Disabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Use valid HTTP client with successful response since we want the full flow when ignoreJoblessBridges is false httpClient := mocks.NewMockHTTPClient(loadFixture(t, "bridge_status_response.json"), http.StatusOK) service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, true, false) @@ -785,6 +813,7 @@ func TestService_pollBridge_IgnoreJoblessBridges_Disabled(t *testing.T) { // Test ignoreInvalidBridges functionality - HTTP error func TestService_pollBridge_IgnoreInvalidBridges_HTTPError_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, true, false) @@ -807,6 +836,7 @@ func TestService_pollBridge_IgnoreInvalidBridges_HTTPError_Enabled(t *testing.T) } func TestService_pollBridge_IgnoreInvalidBridges_HTTPError_Disabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, false, false) @@ -829,6 +859,7 @@ func TestService_pollBridge_IgnoreInvalidBridges_HTTPError_Disabled(t *testing.T // Test ignoreInvalidBridges functionality - Non-200 status func TestService_pollBridge_IgnoreInvalidBridges_Non200Status_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient("Not Found", http.StatusNotFound) service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, true, false) @@ -851,6 +882,7 @@ func TestService_pollBridge_IgnoreInvalidBridges_Non200Status_Enabled(t *testing } func TestService_pollBridge_IgnoreInvalidBridges_Non200Status_Disabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient("Not Found", http.StatusNotFound) service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, false, false) @@ -873,6 +905,7 @@ func TestService_pollBridge_IgnoreInvalidBridges_Non200Status_Disabled(t *testin // Test ignoreInvalidBridges functionality - Invalid JSON func TestService_pollBridge_IgnoreInvalidBridges_InvalidJSON_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient("invalid json", http.StatusOK) service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, true, false) @@ -895,6 +928,7 @@ func TestService_pollBridge_IgnoreInvalidBridges_InvalidJSON_Enabled(t *testing. } func TestService_pollBridge_IgnoreInvalidBridges_InvalidJSON_Disabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := mocks.NewMockHTTPClient("invalid json", http.StatusOK) service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, false, false) @@ -917,6 +951,7 @@ func TestService_pollBridge_IgnoreInvalidBridges_InvalidJSON_Disabled(t *testing // Test combined functionality func TestService_pollBridge_BothIgnoreFlags_Enabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, true, true) @@ -935,6 +970,7 @@ func TestService_pollBridge_BothIgnoreFlags_Enabled(t *testing.T) { } func TestService_pollBridge_BothIgnoreFlags_Disabled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") httpClient := &http.Client{} service, _, jobORM, emitter := setupTestServiceWithIgnoreFlags(t, true, testPollingInterval, httpClient, false, false) @@ -953,6 +989,7 @@ func TestService_pollBridge_BothIgnoreFlags_Disabled(t *testing.T) { // TestService_pollBridge_EndToEnd_RealWebServer tests the complete flow with a real HTTP server func TestService_pollBridge_EndToEnd_RealWebServer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Create a test HTTP server that serves fixture data fixtureData := loadFixture(t, "bridge_status_response.json") server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/core/services/nurse_test.go b/core/services/nurse_test.go index fe16e651982..c192888ed78 100644 --- a/core/services/nurse_test.go +++ b/core/services/nurse_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/utils" @@ -98,6 +99,7 @@ func (c mockConfig) GoroutineThreshold() int { } func TestNurse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") l := logger.TestLogger(t) nrse := NewNurse(newMockConfig(t), l) nrse.AddCheck("test", func() (bool, Meta) { return true, Meta{} }) diff --git a/core/services/ocr/config_overrider_test.go b/core/services/ocr/config_overrider_test.go index af0b7d5b44d..5b0b086367d 100644 --- a/core/services/ocr/config_overrider_test.go +++ b/core/services/ocr/config_overrider_test.go @@ -15,6 +15,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -56,6 +57,7 @@ func newConfigOverriderUni(t *testing.T, pollITicker utils.TickerBase, flagsCont } func TestIntegration_OCRConfigOverrider_EntersHibernation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") g := gomega.NewWithT(t) flagsContract := mocks.NewFlags(t) @@ -86,6 +88,7 @@ func TestIntegration_OCRConfigOverrider_EntersHibernation(t *testing.T) { func Test_OCRConfigOverrider(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("Before first tick returns nil override, later does return a specific override when hibernating", func(t *testing.T) { flagsContract := mocks.NewFlags(t) diff --git a/core/services/ocr/contract_tracker_test.go b/core/services/ocr/contract_tracker_test.go index 45731290282..a2c2a95e7f3 100644 --- a/core/services/ocr/contract_tracker_test.go +++ b/core/services/ocr/contract_tracker_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/heads/headstest" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" logmocks "github.com/smartcontractkit/chainlink/v2/common/log/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -102,6 +103,7 @@ func newContractTrackerUni(t *testing.T, opts ...any) (uni contractTrackerUni) { func Test_OCRContractTracker_LatestBlockHeight(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("before first head incoming, looks up on-chain", func(t *testing.T) { uni := newContractTrackerUni(t) @@ -155,6 +157,7 @@ func Test_OCRContractTracker_LatestBlockHeight(t *testing.T) { func Test_OCRContractTracker_HandleLog_OCRContractLatestRoundRequested(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") fixtureLogAddress := gethCommon.HexToAddress("0x03bd0d5d39629423979f8a0e53dbce78c1791ebf") fixtureFilterer := mustNewFilterer(t) @@ -347,6 +350,7 @@ func Test_OCRContractTracker_HandleLog_OCRContractLatestRoundRequested(t *testin func Test_OCRContractTracker_IsLaterThan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/ocr/contract_transmitter_test.go b/core/services/ocr/contract_transmitter_test.go index fcf0060aa8a..597f5c3c274 100644 --- a/core/services/ocr/contract_transmitter_test.go +++ b/core/services/ocr/contract_transmitter_test.go @@ -11,11 +11,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr" ) func Test_ContractTransmitter_ChainID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") chainID := big.NewInt(42) contractABI, err := abi.JSON(strings.NewReader(offchainaggregator.OffchainAggregatorABI)) require.NoError(t, err) diff --git a/core/services/ocr/database_test.go b/core/services/ocr/database_test.go index 5e7641137d5..04217aeb0e5 100644 --- a/core/services/ocr/database_test.go +++ b/core/services/ocr/database_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/libocr/gethwrappers/offchainaggregator" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -21,6 +22,7 @@ import ( ) func Test_DB_ReadWriteState(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) configDigest := cltest.MakeConfigDigest(t) diff --git a/core/services/ocr2/database_test.go b/core/services/ocr2/database_test.go index acdc0cb48bf..ede509cab00 100644 --- a/core/services/ocr2/database_test.go +++ b/core/services/ocr2/database_test.go @@ -15,6 +15,7 @@ import ( medianconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/median/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -63,6 +64,7 @@ func setupDB(t *testing.T) *sqlx.DB { } func Test_DB_ReadWriteState(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") sqlDB := setupDB(t) configDigest := testhelpers.MakeConfigDigest(t) diff --git a/core/services/ocr2/plugins/ccip/abihelpers/abi_helpers_test.go b/core/services/ocr2/plugins/ccip/abihelpers/abi_helpers_test.go index ff1d0744ebc..a270c24c56b 100644 --- a/core/services/ocr2/plugins/ccip/abihelpers/abi_helpers_test.go +++ b/core/services/ocr2/plugins/ccip/abihelpers/abi_helpers_test.go @@ -10,10 +10,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ) func TestProofFlagToBits(t *testing.T) { + tests.BelongsToCISuite(t, "unit") genFlags := func(indexesSet []int, size int) []bool { bools := make([]bool, size) for _, indexSet := range indexesSet { @@ -57,6 +59,7 @@ func TestProofFlagToBits(t *testing.T) { } func TestEvmWord(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { inp uint64 exp common.Hash @@ -74,6 +77,7 @@ func TestEvmWord(t *testing.T) { } func TestABIEncodeDecode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") abiStr := `[{"components": [{"name":"int1","type":"int256"},{"name":"int2","type":"int256"}], "type":"tuple"}]` values := []any{struct { Int1 *big.Int `json:"int1"` diff --git a/core/services/ocr2/plugins/ccip/ccipcommit/factory_test.go b/core/services/ocr2/plugins/ccip/ccipcommit/factory_test.go index 59762c8a98b..29eaaaecb99 100644 --- a/core/services/ocr2/plugins/ccip/ccipcommit/factory_test.go +++ b/core/services/ocr2/plugins/ccip/ccipcommit/factory_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ccip2 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" @@ -26,6 +27,7 @@ import ( // first call to each of these functions to fail, then all subsequent calls succeed. We assert that NewReportingPlugin // retries a sufficient number of times to get through the transient errors and eventually succeed. func TestNewReportingPluginRetriesUntilSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() commitConfig := CommitPluginStaticConfig{} commitConfig.lggr = logger.TestLogger(t) diff --git a/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go b/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go index 118c21cac62..edf1b067bbe 100644 --- a/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go +++ b/core/services/ocr2/plugins/ccip/ccipcommit/ocr2_test.go @@ -26,6 +26,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/commit_store" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/gas/mocks" "github.com/smartcontractkit/chainlink-evm/pkg/utils" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" @@ -45,6 +46,7 @@ import ( ) func TestCommitReportingPlugin_Observation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sourceNativeTokenAddr := ccipcalc.HexToAddress("1000") destChainSelector := uint64(1) sourceChainSelector := uint64(2) @@ -224,6 +226,7 @@ func TestCommitReportingPlugin_Observation(t *testing.T) { } func TestCommitReportingPlugin_Report(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) sourceChainSelector := uint64(rand.Int()) var gasPrice = big.NewInt(1) @@ -476,6 +479,7 @@ func TestCommitReportingPlugin_Report(t *testing.T) { } func TestCommitReportingPlugin_ShouldAcceptFinalizedReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) newPlugin := func() *CommitReportingPlugin { @@ -599,6 +603,7 @@ func TestCommitReportingPlugin_ShouldAcceptFinalizedReport(t *testing.T) { } func TestCommitReportingPlugin_ShouldTransmitAcceptedReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") report := cciptypes.CommitStoreReport{ TokenPrices: []cciptypes.TokenPrice{ {Token: cciptypes.Address(utils.RandomAddress().String()), Value: big.NewInt(9e18)}, @@ -657,6 +662,7 @@ func TestCommitReportingPlugin_ShouldTransmitAcceptedReport(t *testing.T) { } func TestCommitReportingPlugin_observePriceUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") destChainSelector := uint64(12345) sourceChainSelector := uint64(67890) @@ -757,6 +763,7 @@ type CommitObservationLegacy struct { } func TestCommitReportingPlugin_extractObservationData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") token1 := ccipcalc.HexToAddress("0xa") token2 := ccipcalc.HexToAddress("0xb") token1Price := big.NewInt(1) @@ -1031,6 +1038,7 @@ func TestCommitReportingPlugin_extractObservationData(t *testing.T) { } func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") const defaultSourceChainSelector = 10 // we reuse this value across all test cases feeToken1 := ccipcalc.HexToAddress("0xa") feeToken2 := ccipcalc.HexToAddress("0xb") @@ -1567,6 +1575,7 @@ func TestCommitReportingPlugin_calculatePriceUpdates(t *testing.T) { } func TestCommitReportingPlugin_isStaleReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := context.Background() lggr := logger.TestLogger(t) merkleRoot1 := utils.Keccak256Fixed([]byte("some merkle root 1")) @@ -1621,6 +1630,7 @@ func TestCommitReportingPlugin_isStaleReport(t *testing.T) { } func TestCommitReportingPlugin_calculateMinMaxSequenceNumbers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string commitStoreSeqNum uint64 @@ -1709,6 +1719,7 @@ func TestCommitReportingPlugin_calculateMinMaxSequenceNumbers(t *testing.T) { } func TestCommitReportingPlugin_getLatestGasPriceUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() chainSelector1 := uint64(1234) chainSelector2 := uint64(5678) @@ -1795,6 +1806,7 @@ func TestCommitReportingPlugin_getLatestGasPriceUpdate(t *testing.T) { } func TestCommitReportingPlugin_getLatestTokenPriceUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() tk1 := cciptypes.Address(utils.RandomAddress().String()) tk2 := cciptypes.Address(utils.RandomAddress().String()) @@ -1864,6 +1876,7 @@ func TestCommitReportingPlugin_getLatestTokenPriceUpdates(t *testing.T) { } func Test_commitReportSize(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testParams := gopter.DefaultTestParameters() testParams.MinSuccessfulTests = 100 p := gopter.NewProperties(testParams) @@ -1888,6 +1901,7 @@ func Test_commitReportSize(t *testing.T) { } func Test_calculateIntervalConsensus(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string intervals []cciptypes.CommitStoreInterval @@ -1930,6 +1944,7 @@ func Test_calculateIntervalConsensus(t *testing.T) { } func TestCommitReportToEthTxMeta(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mctx := hashutil.NewKeccak() tree, err := merklemulti.NewTree(mctx, [][32]byte{mctx.Hash([]byte{0xaa})}) require.NoError(t, err) diff --git a/core/services/ocr2/plugins/ccip/ccipexec/batching_test.go b/core/services/ocr2/plugins/ccip/ccipexec/batching_test.go index b3c0511e727..99ee8490635 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/batching_test.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/batching_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" @@ -42,6 +43,7 @@ type testCase struct { func Test_NewBatchingStrategy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mockStatusChecker := mockstatuschecker.NewCCIPTransactionStatusChecker(t) @@ -59,6 +61,7 @@ func Test_NewBatchingStrategy(t *testing.T) { } func Test_validateSendRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string seqNums []uint64 @@ -126,6 +129,7 @@ func (m delayedTokenDataWorker) GetMsgTokenData(ctx context.Context, msg cciptyp } func TestExecutionReportingPlugin_getTokenDataWithCappedLatency(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string allowedWaitingTime time.Duration @@ -167,6 +171,7 @@ func TestExecutionReportingPlugin_getTokenDataWithCappedLatency(t *testing.T) { } func TestBatchingStrategies(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sender1 := ccipcalc.HexToAddress("0xa") destNative := ccipcalc.HexToAddress("0xb") srcNative := ccipcalc.HexToAddress("0xc") diff --git a/core/services/ocr2/plugins/ccip/ccipexec/factory_test.go b/core/services/ocr2/plugins/ccip/ccipexec/factory_test.go index d527a48e83d..d966fac1709 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/factory_test.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/factory_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ccip2 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" @@ -24,6 +25,7 @@ import ( // first call to each of these functions to fail, then all subsequent calls succeed. We assert that NewReportingPlugin // retries a sufficient number of times to get through the transient errors and eventually succeed. func TestNewReportingPluginRetriesUntilSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() execConfig := ExecutionPluginStaticConfig{} execConfig.lggr = logger.TestLogger(t) diff --git a/core/services/ocr2/plugins/ccip/ccipexec/gashelpers_test.go b/core/services/ocr2/plugins/ccip/ccipexec/gashelpers_test.go index 42a62a1be99..092cfae20ef 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/gashelpers_test.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/gashelpers_test.go @@ -7,9 +7,12 @@ import ( "time" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOverheadGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Only Data and TokenAmounts are used from the messages // And only the length is used so the contents doesn't matter. tests := []struct { @@ -38,6 +41,7 @@ func TestOverheadGas(t *testing.T) { } func TestMaxGasOverHeadGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Only Data and TokenAmounts are used from the messages // And only the length is used so the contents doesn't matter. tests := []struct { @@ -69,6 +73,7 @@ func TestMaxGasOverHeadGas(t *testing.T) { } func TestWaitBoostedFee(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string sendTimeDiff time.Duration diff --git a/core/services/ocr2/plugins/ccip/ccipexec/helpers_test.go b/core/services/ocr2/plugins/ccip/ccipexec/helpers_test.go index ecc72b501b9..2fdd644bd53 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/helpers_test.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/helpers_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/assert" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ) func Test_CommitReportWithSendRequests_uniqueSenders(t *testing.T) { + tests.BelongsToCISuite(t, "unit") messageFn := func(address cciptypes.Address) cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta { return cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta{EVM2EVMMessage: cciptypes.EVM2EVMMessage{Sender: address}} } diff --git a/core/services/ocr2/plugins/ccip/ccipexec/inflight_test.go b/core/services/ocr2/plugins/ccip/ccipexec/inflight_test.go index c08a49b43dd..1fe8f5d2278 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/inflight_test.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/inflight_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestInflightReportsContainer_add(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) container := newInflightExecReportsContainer(time.Second) @@ -27,6 +29,7 @@ func TestInflightReportsContainer_add(t *testing.T) { } func TestInflightReportsContainer_expire(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) container := newInflightExecReportsContainer(time.Second) diff --git a/core/services/ocr2/plugins/ccip/ccipexec/ocr2_test.go b/core/services/ocr2/plugins/ccip/ccipexec/ocr2_test.go index 6c3f467c87d..5145f21f8b8 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/ocr2_test.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/ocr2_test.go @@ -28,6 +28,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/statuschecker" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -46,6 +47,7 @@ import ( ) func TestExecutionReportingPlugin_Observation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string commitStorePaused bool @@ -232,6 +234,7 @@ func TestExecutionReportingPlugin_Observation(t *testing.T) { } func TestExecutionReportingPlugin_Report(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string f int @@ -313,6 +316,7 @@ func TestExecutionReportingPlugin_Report(t *testing.T) { } func TestExecutionReportingPlugin_ShouldAcceptFinalizedReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") msg := cciptypes.EVM2EVMMessage{ SequenceNumber: 12, FeeTokenAmount: big.NewInt(1e9), @@ -367,6 +371,7 @@ func TestExecutionReportingPlugin_ShouldAcceptFinalizedReport(t *testing.T) { } func TestExecutionReportingPlugin_ShouldTransmitAcceptedReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") msg := cciptypes.EVM2EVMMessage{ SequenceNumber: 12, FeeTokenAmount: big.NewInt(1e9), @@ -415,6 +420,7 @@ func TestExecutionReportingPlugin_ShouldTransmitAcceptedReport(t *testing.T) { } func TestExecutionReportingPlugin_buildReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) const numMessages = 100 @@ -489,6 +495,7 @@ func TestExecutionReportingPlugin_buildReport(t *testing.T) { } func TestExecutionReportingPlugin_getReportsWithSendRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string reports []cciptypes.CommitStoreReport @@ -621,6 +628,7 @@ func TestExecutionReportingPlugin_getReportsWithSendRequests(t *testing.T) { } func Test_calculateObservedMessagesConsensus(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { observations []ccip.ExecutionObservation f int @@ -730,6 +738,7 @@ func Test_calculateObservedMessagesConsensus(t *testing.T) { } func Test_getTokensPrices(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tk1 := ccipcalc.HexToAddress("1") tk2 := ccipcalc.HexToAddress("2") tk3 := ccipcalc.HexToAddress("3") @@ -820,6 +829,7 @@ func Test_getTokensPrices(t *testing.T) { } func Test_calculateMessageMaxGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { gasLimit *big.Int numRequests int @@ -866,6 +876,7 @@ func Test_calculateMessageMaxGas(t *testing.T) { } func Test_inflightAggregates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") const n = 10 addrs := make([]cciptypes.Address, n) tokenAddrs := make([]cciptypes.Address, n) @@ -989,6 +1000,7 @@ func Test_inflightAggregates(t *testing.T) { } func Test_commitReportWithSendRequests_validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string reportInterval cciptypes.CommitStoreInterval @@ -1037,6 +1049,7 @@ func Test_commitReportWithSendRequests_validate(t *testing.T) { } func Test_commitReportWithSendRequests_allRequestsAreExecutedAndFinalized(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string reqs []cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta @@ -1086,6 +1099,7 @@ func Test_commitReportWithSendRequests_allRequestsAreExecutedAndFinalized(t *tes } func Test_commitReportWithSendRequests_sendReqFits(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string req cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta @@ -1188,6 +1202,7 @@ func generateExecutionReport(t *testing.T, numMsgs, tokensPerMsg, bytesPerMsg in } func Test_selectReportsToFillBatch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string messagesLimit uint64 // maximum number of messages that can be included in a batch. @@ -1268,6 +1283,7 @@ func Test_selectReportsToFillBatch(t *testing.T) { } func Test_prepareTokenExecData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) weth := cciptypes.Address(utils.RandomAddress().String()) @@ -1415,6 +1431,7 @@ func encodeExecutionReport(t *testing.T, report cciptypes.ExecReport) []byte { // Verify the price registry update mechanism in case of configuration change on the source onRamp. func TestExecutionReportingPlugin_ensurePriceRegistrySynchronization(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := &ExecutionReportingPlugin{} p.lggr = logger.TestLogger(t) p.sourcePriceRegistryLock = sync.RWMutex{} @@ -1450,6 +1467,7 @@ func TestExecutionReportingPlugin_ensurePriceRegistrySynchronization(t *testing. } func TestExecutionReportingPlugin_getConsensusThreshold(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string batchingStrategyID uint32 @@ -1483,6 +1501,7 @@ func TestExecutionReportingPlugin_getConsensusThreshold(t *testing.T) { } func TestExecutionReportingPlugin_SnoozeLogicWithTokenDataNotReady(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string msgExecStates []messageExecStatus diff --git a/core/services/ocr2/plugins/ccip/clo_ccip_integration_test.go b/core/services/ocr2/plugins/ccip/clo_ccip_integration_test.go index 3dcec296ad8..db08550f73f 100644 --- a/core/services/ocr2/plugins/ccip/clo_ccip_integration_test.go +++ b/core/services/ocr2/plugins/ccip/clo_ccip_integration_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/mock_v3_aggregator_contract" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" @@ -25,6 +26,7 @@ import ( ) func Test_CLOSpecApprovalFlow_pipeline(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1807") t.Parallel() @@ -45,6 +47,7 @@ func Test_CLOSpecApprovalFlow_pipeline(t *testing.T) { } func Test_CLOSpecApprovalFlow_dynamicPriceGetter(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1805") t.Parallel() ccipTH := integrationtesthelpers.SetupCCIPIntegrationTH( diff --git a/core/services/ocr2/plugins/ccip/config/chain_config_test.go b/core/services/ocr2/plugins/ccip/config/chain_config_test.go index c9d566039ce..4e62619137f 100644 --- a/core/services/ocr2/plugins/ccip/config/chain_config_test.go +++ b/core/services/ocr2/plugins/ccip/config/chain_config_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/chains/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestGetChainFromSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testChainID := int64(1337) tests := []struct { @@ -61,6 +63,7 @@ func TestGetChainFromSpec(t *testing.T) { } func TestGetChainByChainSelector_success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockChain := mocks.NewChain(t) mockChain.On("ID").Return(big.NewInt(11155111)) @@ -75,6 +78,7 @@ func TestGetChainByChainSelector_success(t *testing.T) { } func TestGetChainByChainSelector_selectorNotFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockChainSet := mocks.NewLegacyChainContainer(t) _, _, err := GetChainByChainSelector(mockChainSet, uint64(444000444)) @@ -82,6 +86,7 @@ func TestGetChainByChainSelector_selectorNotFound(t *testing.T) { } func TestGetChainById_notFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockChainSet := mocks.NewLegacyChainContainer(t) mockChainSet.On("Get", "444").Return(nil, errors.New("test")).Maybe() @@ -91,6 +96,7 @@ func TestGetChainById_notFound(t *testing.T) { } func TestResolveChainNames(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string sourceChainId int64 diff --git a/core/services/ocr2/plugins/ccip/config/config_test.go b/core/services/ocr2/plugins/ccip/config/config_test.go index 8c16408303e..f03f6a567fe 100644 --- a/core/services/ocr2/plugins/ccip/config/config_test.go +++ b/core/services/ocr2/plugins/ccip/config/config_test.go @@ -10,11 +10,13 @@ import ( chainsel "github.com/smartcontractkit/chain-selectors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" ) func TestCommitConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string cfg CommitPluginJobSpecConfig @@ -131,6 +133,7 @@ func TestCommitConfig(t *testing.T) { } func TestExecutionConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") exampleConfig := ExecPluginJobSpecConfig{ SourceStartBlock: 222, DestStartBlock: 333, @@ -146,6 +149,7 @@ func TestExecutionConfig(t *testing.T) { } func TestUSDCValidate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testcases := []struct { config USDCConfig err string @@ -206,6 +210,7 @@ func TestUSDCValidate(t *testing.T) { } func TestDynamicPriceGetterConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // this test goes through unmarshal -> move deprecated -> validate -> assert equal to expected // for verifying e2e config loading and validation destChain := chainsel.TEST_1000 // 11787463284727550157 @@ -327,7 +332,7 @@ func TestDynamicPriceGetterConfig(t *testing.T) { "price": 1000000000000000000 } } - } + } `, expCfg: DynamicPriceGetterConfig{TokenPrices: expTokenPrices}, expError: false, diff --git a/core/services/ocr2/plugins/ccip/config/type_and_version_test.go b/core/services/ocr2/plugins/ccip/config/type_and_version_test.go index 807bb59f3be..4b0b92652bf 100644 --- a/core/services/ocr2/plugins/ccip/config/type_and_version_test.go +++ b/core/services/ocr2/plugins/ccip/config/type_and_version_test.go @@ -5,9 +5,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestParseTypeAndVersion(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input string diff --git a/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go b/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go index 3ecd88ae3bd..466d3155519 100644 --- a/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go +++ b/core/services/ocr2/plugins/ccip/estimatorconfig/config_test.go @@ -11,11 +11,13 @@ import ( mocks2 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/estimatorconfig/mocks" "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/estimatorconfig" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks" ) func TestFeeEstimatorConfigService(t *testing.T) { + tests.BelongsToCISuite(t, "unit") svc := estimatorconfig.NewFeeEstimatorConfigService() ctx := context.Background() @@ -51,6 +53,7 @@ func TestFeeEstimatorConfigService(t *testing.T) { } func TestModifyGasPriceComponents(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("success modification", func(t *testing.T) { svc := estimatorconfig.NewFeeEstimatorConfigService() ctx := context.Background() diff --git a/core/services/ocr2/plugins/ccip/integration_test.go b/core/services/ocr2/plugins/ccip/integration_test.go index d78d9b69382..670f715aebc 100644 --- a/core/services/ocr2/plugins/ccip/integration_test.go +++ b/core/services/ocr2/plugins/ccip/integration_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/mock_v3_aggregator_contract" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata" @@ -32,6 +33,7 @@ import ( ) func TestIntegration_CCIP(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1902") t.Parallel() // Run tke batches of tests for both pipeline and dynamic price getter setups. @@ -657,6 +659,7 @@ func TestIntegration_CCIP(t *testing.T) { // TestReorg ensures that CCIP works even when a below finality depth reorg happens func TestReorg(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // We need higher finality depth on the destination to perform reorg deep enough to revert commit and execution reports destinationFinalityDepth := uint32(50) ccipTH := integrationtesthelpers.SetupCCIPIntegrationTH( diff --git a/core/services/ocr2/plugins/ccip/internal/cache/autosync_test.go b/core/services/ocr2/plugins/ccip/internal/cache/autosync_test.go index 4eab3163d18..682f5af36e6 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/autosync_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/autosync_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -17,6 +18,7 @@ import ( ) func TestLogpollerEventsBased(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lp := lpmocks.NewLogPoller(t) observedEvents := []common.Hash{ diff --git a/core/services/ocr2/plugins/ccip/internal/cache/chain_health_test.go b/core/services/ocr2/plugins/ccip/internal/cache/chain_health_test.go index b919776b3b0..477695dcbd4 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/chain_health_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/chain_health_test.go @@ -11,12 +11,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks" ) func Test_RMNStateCaching(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() lggr := logger.TestLogger(t) mockCommitStore := mocks.NewCommitStoreReader(t) @@ -61,6 +63,7 @@ func Test_RMNStateCaching(t *testing.T) { } func Test_ChainStateIsCached(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() lggr := logger.TestLogger(t) mockCommitStore := mocks.NewCommitStoreReader(t) @@ -104,6 +107,7 @@ func Test_ChainStateIsCached(t *testing.T) { } func Test_ChainStateIsHealthy(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string commitStoreDown bool @@ -190,6 +194,7 @@ func Test_ChainStateIsHealthy(t *testing.T) { } func Test_RefreshingInBackground(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockCommitStore := newCommitStoreWrapper(t, true, nil) mockCommitStore.CommitStoreReader.On("IsDestChainHealthy", mock.Anything).Return(true, nil).Maybe() diff --git a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go index 7ba4dad981b..9eb2523460f 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go @@ -13,6 +13,7 @@ import ( ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" commit_store_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/commit_store" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -23,6 +24,7 @@ import ( ) func Test_RootsEligibleForExecution(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) chainID := testutils.NewRandomEVMChainID() orm := logpoller.NewORM(chainID, pgtest.NewSqlxDB(t), logger.TestLogger(t)) diff --git a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_unit_test.go b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_unit_test.go index 37fcf363d45..ced1113ddcf 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_unit_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_unit_test.go @@ -10,12 +10,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks" ) func Test_CacheIsInitializedWithFirstCall(t *testing.T) { + tests.BelongsToCISuite(t, "unit") commitStoreReader := mocks.NewCommitStoreReader(t) cache := newCommitRootsCache(logger.TestLogger(t), commitStoreReader, time.Hour, time.Hour, time.Hour, time.Hour) commitStoreReader.On("GetAcceptedCommitReportsGteTimestamp", mock.Anything, mock.Anything, mock.Anything).Return([]ccip.CommitStoreReportWithTxMeta{}, nil) @@ -26,6 +28,7 @@ func Test_CacheIsInitializedWithFirstCall(t *testing.T) { } func Test_CacheExpiration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ts1 := time.Now().Add(-5 * time.Millisecond).Truncate(time.Millisecond) ts2 := time.Now().Add(-3 * time.Millisecond).Truncate(time.Millisecond) ts3 := time.Now().Add(-1 * time.Millisecond).Truncate(time.Millisecond) @@ -56,6 +59,7 @@ func Test_CacheExpiration(t *testing.T) { } func Test_CacheFullEviction(t *testing.T) { + tests.BelongsToCISuite(t, "unit") commitStoreReader := mocks.NewCommitStoreReader(t) cache := newCommitRootsCache(logger.TestLogger(t), commitStoreReader, 2*time.Second, 1*time.Second, time.Second, time.Second) @@ -94,6 +98,7 @@ func Test_CacheFullEviction(t *testing.T) { } func Test_CacheProgression_Internal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ts1 := time.Now().Add(-5 * time.Hour).Truncate(time.Millisecond) ts2 := time.Now().Add(-3 * time.Hour).Truncate(time.Millisecond) ts3 := time.Now().Add(-1 * time.Hour).Truncate(time.Millisecond) diff --git a/core/services/ocr2/plugins/ccip/internal/cache/lazy_test.go b/core/services/ocr2/plugins/ccip/internal/cache/lazy_test.go index 9ed8f41ac3f..e26488ee16b 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/lazy_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/lazy_test.go @@ -6,9 +6,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestLazyFetchPass(t *testing.T) { + tests.BelongsToCISuite(t, "unit") counterFunction := createPassingCounter() counter, _ := counterFunction() @@ -23,6 +26,7 @@ func TestLazyFetchPass(t *testing.T) { } func TestLazyFetchFail(t *testing.T) { + tests.BelongsToCISuite(t, "unit") counterFunction := createFailingCounter() _, err := counterFunction() @@ -37,6 +41,7 @@ func TestLazyFetchFail(t *testing.T) { } func TestLazyFetchMultipleRoutines(t *testing.T) { + tests.BelongsToCISuite(t, "unit") routines := 100 counterFunction := LazyFetch(createPassingCounter()) diff --git a/core/services/ocr2/plugins/ccip/internal/cache/observed_chain_health_test.go b/core/services/ocr2/plugins/ccip/internal/cache/observed_chain_health_test.go index 7e02dbd3c92..c6c35af4cb2 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/observed_chain_health_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/observed_chain_health_test.go @@ -11,12 +11,14 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache/mocks" ) var address = cciptypes.Address(common.HexToAddress("0x1234567890123456789012345678901234567890").String()) func Test_ObservedChainStateSkipErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockedHealthcheck := mocks.NewChainHealthcheck(t) mockedHealthcheck.On("IsHealthy", mock.Anything).Return(false, errors.New("error")) @@ -34,6 +36,7 @@ func Test_ObservedChainStateSkipErrors(t *testing.T) { } func Test_ObservedChainStateReportsStatus(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockedHealthcheck := mocks.NewChainHealthcheck(t) mockedHealthcheck.On("IsHealthy", mock.Anything).Return(true, nil).Once() diff --git a/core/services/ocr2/plugins/ccip/internal/cache/once_test.go b/core/services/ocr2/plugins/ccip/internal/cache/once_test.go index 203e56b122a..57150854aa2 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/once_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/once_test.go @@ -8,10 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // TestCallOnceOnNoErrorCachingSuccess tests caching behavior when the function succeeds. func TestCallOnceOnNoErrorCachingSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") callCount := 0 testFunc := func(ctx context.Context) (string, error) { callCount++ @@ -32,6 +35,7 @@ func TestCallOnceOnNoErrorCachingSuccess(t *testing.T) { // TestCallOnceOnNoErrorCachingError tests that the function is retried after an error. func TestCallOnceOnNoErrorCachingError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") callCount := 0 testFunc := func(ctx context.Context) (string, error) { callCount++ @@ -56,6 +60,7 @@ func TestCallOnceOnNoErrorCachingError(t *testing.T) { // TestCallOnceOnNoErrorCachingConcurrency tests that the function works correctly under concurrent access. func TestCallOnceOnNoErrorCachingConcurrency(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var wg sync.WaitGroup callCount := 0 testFunc := func(ctx context.Context) (string, error) { diff --git a/core/services/ocr2/plugins/ccip/internal/ccipcalc/calc_test.go b/core/services/ocr2/plugins/ccip/internal/ccipcalc/calc_test.go index e6cb928fddb..007adf54370 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipcalc/calc_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipcalc/calc_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestMergeEpochAndRound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { epoch uint32 round uint8 @@ -53,6 +55,7 @@ func TestMergeEpochAndRound(t *testing.T) { } func TestContiguousReqs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { min uint64 max uint64 @@ -74,6 +77,7 @@ func TestContiguousReqs(t *testing.T) { } func TestCalculateUsdPerUnitGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string sourceGasPrice *big.Int @@ -103,6 +107,7 @@ func TestCalculateUsdPerUnitGas(t *testing.T) { } func TestBigIntSortedMiddle(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string vals []*big.Int @@ -137,6 +142,7 @@ func TestBigIntSortedMiddle(t *testing.T) { } func TestDeviates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { x1 *big.Int x2 *big.Int @@ -221,6 +227,7 @@ func TestDeviates(t *testing.T) { } func TestDeviatesOnCurve(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { xNew *big.Int xOld *big.Int @@ -293,6 +300,7 @@ func TestDeviatesOnCurve(t *testing.T) { } func TestCalculateCurveThresholdPPB(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { x float64 ppbLowerBound int64 diff --git a/core/services/ocr2/plugins/ccip/internal/ccipcommon/shortcuts_test.go b/core/services/ocr2/plugins/ccip/internal/ccipcommon/shortcuts_test.go index 55098b2aea6..89d871751fb 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipcommon/shortcuts_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipcommon/shortcuts_test.go @@ -12,9 +12,11 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestGetMessageIDsAsHexString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("base", func(t *testing.T) { hashes := make([]cciptypes.Hash, 10) for i := range hashes { @@ -39,6 +41,7 @@ func TestGetMessageIDsAsHexString(t *testing.T) { } func TestFlattenUniqueSlice(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string inputSlices [][]int @@ -64,6 +67,7 @@ func TestFlattenUniqueSlice(t *testing.T) { } func TestFlattenedAndSortedTokens(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string inputSlices [][]cciptypes.Address @@ -109,6 +113,7 @@ func TestFlattenedAndSortedTokens(t *testing.T) { } func TestIsTxRevertError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string inputError error @@ -128,6 +133,7 @@ func TestIsTxRevertError(t *testing.T) { } func TestRetryUntilSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Set delays to 0 for tests initialDelay := 0 * time.Nanosecond maxDelay := 0 * time.Nanosecond diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go index f5ace0d5872..fd16db4c154 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/batchreader/token_pool_batch_reader_test.go @@ -12,6 +12,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" @@ -21,6 +22,7 @@ import ( ) func TestTokenPoolFactory(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) offRamp := utils.RandomAddress() ctx := context.Background() diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/commit_store_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/commit_store_test.go index 551d5e1df50..bae965c0c2a 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/commit_store_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/commit_store_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink-evm/pkg/utils" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" @@ -20,6 +21,7 @@ import ( ) func TestCommitStore(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() for _, versionStr := range []string{ccipdata.V1_2_0} { lggr := logger.Test(t) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/offramp_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/offramp_test.go index 03bab9606d2..783f744ff89 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/offramp_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/offramp_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink-evm/pkg/utils" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" @@ -19,6 +20,7 @@ import ( ) func TestOffRamp(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() for _, versionStr := range []string{ccipdata.V1_2_0} { lggr := logger.Test(t) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/onramp_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/onramp_test.go index 25b062507dd..74634e28c91 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/onramp_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/onramp_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink-evm/pkg/utils" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" @@ -18,6 +19,7 @@ import ( ) func TestOnRamp(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() for _, versionStr := range []string{ccipdata.V1_2_0, ccipdata.V1_5_0} { lggr := logger.Test(t) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/price_registry_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/price_registry_test.go index edfb9c450d9..f7c3a37618e 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/price_registry_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/factory/price_registry_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink-evm/pkg/utils" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" @@ -19,6 +20,7 @@ import ( ) func TestPriceRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) for _, versionStr := range []string{ccipdata.V1_2_0} { diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/reader_test.go index ad7d8637264..d34416b06e9 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/reader_test.go @@ -10,11 +10,13 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func Test_parseLogs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // generate 100 logs logs := make([]logpoller.Log, 100) for i := range logs { @@ -40,6 +42,7 @@ func Test_parseLogs(t *testing.T) { } func Test_parseLogs_withErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // generate 50 valid logs and 50 errors actualErrorCount := 50 logs := make([]logpoller.Log, actualErrorCount*2) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/usdc_reader_internal_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/usdc_reader_internal_test.go index 1504f2d1f88..3057d504746 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/usdc_reader_internal_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/usdc_reader_internal_test.go @@ -19,12 +19,14 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) func TestLogPollerClient_GetUSDCMessagePriorToLogIndexInTx(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addr := utils.RandomAddress() txHash := common.BytesToHash(addr[:]) ccipLogIndex := int64(100) @@ -127,6 +129,7 @@ func TestLogPollerClient_GetUSDCMessagePriorToLogIndexInTx(t *testing.T) { } func TestParse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expectedBody, err := hexutil.Decode("0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f80000000000000001000000020000000000048d71000000000000000000000000eb08f243e5d3fcff26a9e38ae5520a669f4019d000000000000000000000000023a04d5935ed8bc8e3eb78db3541f0abfb001c6e0000000000000000000000006cb3ed9b441eb674b58495c8b3324b59faff5243000000000000000000000000000000005425890298aed601595a70ab815c96711a31bc65000000000000000000000000ab4f961939bfe6a93567cc57c59eed7084ce2131000000000000000000000000000000000000000000000000000000000000271000000000000000000000000035e08285cfed1ef159236728f843286c55fc08610000000000000000") require.NoError(t, err) @@ -139,6 +142,7 @@ func TestParse(t *testing.T) { } func TestFilters(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("filters of different jobs should be distinct", func(t *testing.T) { ctx := t.Context() lggr := logger.Test(t) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store_test.go index 756af19953f..087e7b0eecf 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/commit_store_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestCommitReportEncoding(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) report := cciptypes.CommitStoreReport{ TokenPrices: []cciptypes.TokenPrice{ @@ -64,6 +66,7 @@ func TestCommitReportEncoding(t *testing.T) { func TestCommitStoreV120ffchainConfigEncoding(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") validConfig := JSONCommitOffchainConfig{ SourceFinalityDepth: 3, DestFinalityDepth: 4, @@ -154,6 +157,7 @@ func TestCommitStoreV120ffchainConfigEncoding(t *testing.T) { func TestCommitStoreV120ffchainConfigDecodingCompatibility(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/hasher_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/hasher_test.go index f93a9898f56..17f3bf5682b 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/hasher_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/hasher_test.go @@ -12,10 +12,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/hashutil" evm_2_evm_onramp_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/evm_2_evm_onramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" ) func TestHasherV1_2_0(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sourceChainSelector, destChainSelector := uint64(1), uint64(4) onRampAddress := common.HexToAddress("0x5550000000000000000000000000000000000001") onRampABI := abihelpers.MustParseABI(evm_2_evm_onramp_1_2_0.EVM2EVMOnRampABI) @@ -78,6 +80,7 @@ func TestHasherV1_2_0(t *testing.T) { } func TestMetaDataHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sourceChainSelector, destChainSelector := uint64(1), uint64(4) onRampAddress := common.HexToAddress("0x5550000000000000000000000000000000000001") ctx := hashutil.NewKeccak() diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_test.go index 7ee3995094a..4cc8df6ab7c 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -16,6 +17,7 @@ import ( ) func TestExecutionReportEncodingV120(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Note could consider some fancier testing here (fuzz/property) // but I think that would essentially be testing geth's abi library // as our encode/decode is a thin wrapper around that. diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_unit_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_unit_test.go index 4ff2732cb51..d982f3068fe 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_unit_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_reader_unit_test.go @@ -22,6 +22,7 @@ import ( evm_2_evm_offramp_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/evm_2_evm_offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_offramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/cache" @@ -32,6 +33,7 @@ import ( ) func TestOffRampGetDestinationTokensFromSourceTokens(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) const numSrcTokens = 20 @@ -102,6 +104,8 @@ func TestOffRampGetDestinationTokensFromSourceTokens(t *testing.T) { } func TestCachedOffRampTokens(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Test data. srcTks, dstTks, _ := generateTokensAndOutputs(3) @@ -157,6 +161,7 @@ func generateTokensAndOutputs(nbTokens uint) ([]common.Address, []common.Address } func Test_LogsAreProperlyMarkedAsFinalized(t *testing.T) { + tests.BelongsToCISuite(t, "unit") minSeqNr := uint64(10) maxSeqNr := uint64(14) inputLogs := []logpoller.Log{ @@ -212,6 +217,7 @@ func Test_LogsAreProperlyMarkedAsFinalized(t *testing.T) { } func TestGetRouter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") routerAddr := utils.RandomAddress() mockOffRamp := mock_contracts.NewEVM2EVMOffRampInterface(t) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_test.go index d76ebc29b98..d66ec7c1ff4 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/offramp_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func modifyCopy[T any](c T, f func(c *T)) T { @@ -26,6 +27,7 @@ func modifyCopy[T any](c T, f func(c *T)) T { func TestExecOffchainConfig120_Encoding(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") validConfig := JSONExecOffchainConfig{ SourceFinalityDepth: 3, DestOptimisticConfirmations: 6, @@ -114,6 +116,7 @@ func TestExecOffchainConfig120_Encoding(t *testing.T) { func TestExecOffchainConfig120_ParseRawJson(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -181,6 +184,7 @@ func TestExecOffchainConfig120_ParseRawJson(t *testing.T) { } func Test_GetSendersNonce(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sender1 := cciptypes.Address(utils.RandomAddress().String()) sender2 := cciptypes.Address(utils.RandomAddress().String()) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/onramp_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/onramp_test.go index 8f2769d0386..6db1d8c70c7 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/onramp_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/onramp_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -17,6 +18,7 @@ import ( ) func TestLogPollerClient_GetSendRequestsBetweenSeqNumsV1_2_0(t *testing.T) { + tests.BelongsToCISuite(t, "unit") onRampAddr := utils.RandomAddress() seqNum := uint64(100) limit := uint64(10) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool_test.go index 500a6f1b2f2..98ac467e4fa 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/token_pool_test.go @@ -5,10 +5,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ) func TestTokenPool(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addr := utils.RandomAddress() offRamp := utils.RandomAddress() poolType := "BurnMint" diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool_test.go index bad8d923629..93978bcd2f3 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_4_0/token_pool_test.go @@ -5,10 +5,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ) func TestTokenPool(t *testing.T) { + tests.BelongsToCISuite(t, "unit") addr := utils.RandomAddress() chainSelector := uint64(2000) poolType := "BurnMint" diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/hasher_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/hasher_test.go index c5561759c8d..6fa0a320d23 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/hasher_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/hasher_test.go @@ -12,10 +12,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/hashutil" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" ) func TestHasherV1_4_0(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sourceChainSelector, destChainSelector := uint64(1), uint64(4) onRampAddress := common.HexToAddress("0x5550000000000000000000000000000000000001") onRampABI := abihelpers.MustParseABI(evm_2_evm_onramp.EVM2EVMOnRampABI) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/onramp_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/onramp_test.go index ac6b55d9193..e35704cf16e 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/onramp_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_5_0/onramp_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/mock_rmn_contract" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -27,6 +28,7 @@ import ( ) func TestLogPollerClient_GetSendRequestsBetweenSeqNums1_4_0(t *testing.T) { + tests.BelongsToCISuite(t, "unit") onRampAddr := utils.RandomAddress() seqNum := uint64(100) limit := uint64(10) @@ -67,6 +69,7 @@ func TestLogPollerClient_GetSendRequestsBetweenSeqNums1_4_0(t *testing.T) { } func Test_ProperlyRecognizesPerLaneCurses(t *testing.T) { + tests.BelongsToCISuite(t, "unit") user, bc := ccipdata.NewSimulation(t) ctx := testutils.Context(t) destChainSelector := uint64(100) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go index e7d0ef2ab6f..20cddbcd261 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go @@ -19,6 +19,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -32,6 +33,7 @@ import ( ) func TestPriceService_writeGasPrices(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) jobId := int32(1) destChainSelector := uint64(12345) @@ -96,6 +98,7 @@ func TestPriceService_writeGasPrices(t *testing.T) { } func TestPriceService_writeTokenPrices(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) jobId := int32(1) destChainSelector := uint64(12345) @@ -168,6 +171,7 @@ func TestPriceService_writeTokenPrices(t *testing.T) { } func TestPriceService_observeGasPriceUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) jobId := int32(1) destChain := chainselectors.TEST_1338 @@ -282,6 +286,7 @@ func TestPriceService_observeGasPriceUpdates(t *testing.T) { } func TestPriceService_observeTokenPriceUpdates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) jobId := int32(1) destChain := chainselectors.TEST_1338 @@ -503,6 +508,7 @@ func TestPriceService_observeTokenPriceUpdates(t *testing.T) { } func TestPriceService_calculateUsdPer1e18TokenAmount(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string price *big.Int @@ -543,6 +549,7 @@ func TestPriceService_calculateUsdPer1e18TokenAmount(t *testing.T) { } func TestPriceService_GetGasAndTokenPrices(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) jobId := int32(1) destChainSelector := uint64(12345) @@ -762,6 +769,7 @@ func checkResultLen(t *testing.T, priceService PriceService, destChainSelector u } func TestPriceService_priceWriteInBackground(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) jobId := int32(1) destChain := chainselectors.TEST_1338 diff --git a/core/services/ocr2/plugins/ccip/internal/logpollerutil/filters_test.go b/core/services/ocr2/plugins/ccip/internal/logpollerutil/filters_test.go index 871e24bfb94..6aa6a77dd81 100644 --- a/core/services/ocr2/plugins/ccip/internal/logpollerutil/filters_test.go +++ b/core/services/ocr2/plugins/ccip/internal/logpollerutil/filters_test.go @@ -7,10 +7,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" ) func Test_FiltersDiff(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { filtersBefore []logpoller.Filter filtersNow []logpoller.Filter @@ -68,6 +70,7 @@ func Test_FiltersDiff(t *testing.T) { } func Test_filterContainsZeroAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { addrs []common.Address } @@ -113,6 +116,7 @@ func Test_filterContainsZeroAddress(t *testing.T) { } func Test_containsFilter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { filters []logpoller.Filter f logpoller.Filter diff --git a/core/services/ocr2/plugins/ccip/internal/observability/metrics_test.go b/core/services/ocr2/plugins/ccip/internal/observability/metrics_test.go index ff345a5cf4c..76936d0ccc7 100644 --- a/core/services/ocr2/plugins/ccip/internal/observability/metrics_test.go +++ b/core/services/ocr2/plugins/ccip/internal/observability/metrics_test.go @@ -10,11 +10,13 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ccipdatamocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks" ) func TestProperLabelsArePassed(t *testing.T) { + tests.BelongsToCISuite(t, "unit") histogram := readerHistogram successCounter := 10 failedCounter := 5 @@ -40,6 +42,7 @@ func TestProperLabelsArePassed(t *testing.T) { } func TestMetricsSendFromContractDirectly(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expectedCounter := 4 ctx := testutils.Context(t) chainId := int64(420) diff --git a/core/services/ocr2/plugins/ccip/internal/observability/onramp_observed_test.go b/core/services/ocr2/plugins/ccip/internal/observability/onramp_observed_test.go index 15651017de1..69784cb2f75 100644 --- a/core/services/ocr2/plugins/ccip/internal/observability/onramp_observed_test.go +++ b/core/services/ocr2/plugins/ccip/internal/observability/onramp_observed_test.go @@ -15,6 +15,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks" ) @@ -31,8 +32,10 @@ const expectedWrapper = "core/services/ocr2/plugins/ccip/internal/observability. // TestOnRampObservedMethods tests that all methods of OnRampReader are observed by a wrapper. // It uses the runtime to detect if the call stack contains the wrapper class. func TestOnRampObservedMethods(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Methods not expected to be observed. // Add a method name here to exclude it from the test. + excludedMethods := []string{ "Address", "Close", diff --git a/core/services/ocr2/plugins/ccip/internal/parseutil/bigint_test.go b/core/services/ocr2/plugins/ccip/internal/parseutil/bigint_test.go index cea2f8cc19c..2d343c0e884 100644 --- a/core/services/ocr2/plugins/ccip/internal/parseutil/bigint_test.go +++ b/core/services/ocr2/plugins/ccip/internal/parseutil/bigint_test.go @@ -6,9 +6,12 @@ import ( "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestParseBigIntFromAny(t *testing.T) { + tests.BelongsToCISuite(t, "unit") decimalVal := decimal.New(123, 0) testCases := []struct { diff --git a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go index aaa33d3bb27..92cdc7eaefd 100644 --- a/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go +++ b/core/services/ocr2/plugins/ccip/internal/pricegetter/evm_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcommon" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/aggregator_v3_interface" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -50,6 +51,7 @@ func init() { } func TestDynamicPriceGetterWithEmptyInput(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string param testParameters diff --git a/core/services/ocr2/plugins/ccip/internal/pricegetter/pipeline_test.go b/core/services/ocr2/plugins/ccip/internal/pricegetter/pipeline_test.go index 32dd7b949b2..7eb28d2f0be 100644 --- a/core/services/ocr2/plugins/ccip/internal/pricegetter/pipeline_test.go +++ b/core/services/ocr2/plugins/ccip/internal/pricegetter/pipeline_test.go @@ -26,11 +26,13 @@ import ( pipelinemocks "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" config "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) func TestParsingDifferentFormats(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string inputValue string diff --git a/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go b/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go index 788b8962f77..b889a9ee40b 100644 --- a/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go +++ b/core/services/ocr2/plugins/ccip/internal/rpclib/evm_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -22,6 +23,7 @@ import ( ) func TestDefaultEvmBatchCaller_BatchCallDynamicLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string maxBatchSize uint @@ -104,6 +106,7 @@ func TestDefaultEvmBatchCaller_BatchCallDynamicLimit(t *testing.T) { } func TestDefaultEvmBatchCaller_batchCallLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) testCases := []struct { @@ -160,6 +163,7 @@ func TestDefaultEvmBatchCaller_batchCallLimit(t *testing.T) { } func TestParseOutput(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type testCase[T any] struct { name string dataAndErr rpclib.DataAndErr diff --git a/core/services/ocr2/plugins/ccip/metrics_test.go b/core/services/ocr2/plugins/ccip/metrics_test.go index a36ca27ef15..b39673ac01a 100644 --- a/core/services/ocr2/plugins/ccip/metrics_test.go +++ b/core/services/ocr2/plugins/ccip/metrics_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/beholder" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const ( @@ -21,6 +22,7 @@ const ( func Test_SequenceNumbers(t *testing.T) { // setup t.Parallel() + tests.BelongsToCISuite(t, "unit") var b strings.Builder bhClient, err := beholder.NewWriterClient(&b) @@ -42,6 +44,7 @@ func Test_SequenceNumbers(t *testing.T) { func Test_NumberOfMessages(t *testing.T) { // setup t.Parallel() + tests.BelongsToCISuite(t, "unit") var b strings.Builder bhClient, err := beholder.NewWriterClient(&b) require.NoError(t, err) @@ -68,6 +71,7 @@ func Test_NumberOfMessages(t *testing.T) { func Test_UnexpiredCommitRoots(t *testing.T) { // setup t.Parallel() + tests.BelongsToCISuite(t, "unit") var b strings.Builder bhClient, err := beholder.NewWriterClient(&b) require.NoError(t, err) diff --git a/core/services/ocr2/plugins/ccip/observations_test.go b/core/services/ocr2/plugins/ccip/observations_test.go index dd27328b50c..2a6adeec122 100644 --- a/core/services/ocr2/plugins/ccip/observations_test.go +++ b/core/services/ocr2/plugins/ccip/observations_test.go @@ -15,6 +15,7 @@ import ( cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" @@ -23,6 +24,7 @@ import ( func TestObservationFilter(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) obs1 := CommitObservation{Interval: cciptypes.CommitStoreInterval{Min: 1, Max: 10}} b1, err := obs1.Marshal() @@ -41,6 +43,7 @@ type CommitObservationLegacy struct { func TestObservationCompat_MultiChainGas(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") obsLegacy := CommitObservationLegacy{ Interval: cciptypes.CommitStoreInterval{ Min: 1, @@ -69,6 +72,7 @@ func TestObservationCompat_MultiChainGas(t *testing.T) { func TestCommitObservationJsonDeserialization(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") expectedObservation := CommitObservation{ Interval: cciptypes.CommitStoreInterval{ Min: 1, @@ -97,6 +101,7 @@ func TestCommitObservationJsonDeserialization(t *testing.T) { func TestCommitObservationMarshal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") obs := CommitObservation{ Interval: cciptypes.CommitStoreInterval{ Min: 1, @@ -125,6 +130,7 @@ func TestCommitObservationMarshal(t *testing.T) { func TestExecutionObservationJsonDeserialization(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") expectedObservation := ExecutionObservation{Messages: map[uint64]MsgData{ 2: {TokenData: tokenData("c")}, 1: {TokenData: tokenData("c")}, @@ -148,6 +154,7 @@ func TestExecutionObservationJsonDeserialization(t *testing.T) { func TestObservationSize(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testParams := gopter.DefaultTestParameters() testParams.MinSuccessfulTests = 100 p := gopter.NewProperties(testParams) @@ -173,6 +180,7 @@ func TestObservationSize(t *testing.T) { func TestNewExecutionObservation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string observations []ObservedMessage @@ -230,6 +238,7 @@ func tokenData(value string) [][]byte { func TestCommitObservationJsonSerializationDeserialization(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") jsonEncoded := `{ "interval": { "Min":1, @@ -285,13 +294,13 @@ func TestCommitObservationJsonSerializationDeserialization(t *testing.T) { func TestAddressEncodingBackwardsCompatibility(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") // The intention of this test is to remind including proper formatting of addresses after config is updated. // // The following tests will fail when a new cciptypes.Address field is added or removed. // If you notice that the test is failing, make sure to apply proper address formatting // after the struct is marshalled/unmarshalled and then include your new field in the expected fields slice to // make this test pass or if you removed a field, remove it from the expected fields slice. - t.Run("job spec config", func(t *testing.T) { exp := []string{"ccip.Address OffRamp"} diff --git a/core/services/ocr2/plugins/ccip/prices/da_price_estimator_test.go b/core/services/ocr2/plugins/ccip/prices/da_price_estimator_test.go index 3101d8e5729..a9faec4454f 100644 --- a/core/services/ocr2/plugins/ccip/prices/da_price_estimator_test.go +++ b/core/services/ocr2/plugins/ccip/prices/da_price_estimator_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/gas/rollups/mocks" ccipdatamocks "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata/mocks" @@ -21,6 +22,7 @@ func encodeGasPrice(daPrice, execPrice *big.Int) *big.Int { } func TestDAPriceEstimator_GetGasPrice(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := context.Background() testCases := []struct { @@ -152,6 +154,7 @@ func TestDAPriceEstimator_GetGasPrice(t *testing.T) { } func TestDAPriceEstimator_DenoteInUSD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val1e18 := func(val int64) *big.Int { return new(big.Int).Mul(big.NewInt(1e18), big.NewInt(val)) } testCases := []struct { @@ -195,6 +198,7 @@ func TestDAPriceEstimator_DenoteInUSD(t *testing.T) { } func TestDAPriceEstimator_Median(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val1e18 := func(val int64) *big.Int { return new(big.Int).Mul(big.NewInt(1e18), big.NewInt(val)) } testCases := []struct { @@ -281,6 +285,7 @@ func TestDAPriceEstimator_Median(t *testing.T) { } func TestDAPriceEstimator_Deviates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string gasPrice1 *big.Int @@ -370,6 +375,7 @@ func TestDAPriceEstimator_Deviates(t *testing.T) { } func TestDAPriceEstimator_EstimateMsgCostUSD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") execCostUSD := big.NewInt(100_000) testCases := []struct { diff --git a/core/services/ocr2/plugins/ccip/prices/exec_price_estimator_test.go b/core/services/ocr2/plugins/ccip/prices/exec_price_estimator_test.go index c500cd061d0..59243086eff 100644 --- a/core/services/ocr2/plugins/ccip/prices/exec_price_estimator_test.go +++ b/core/services/ocr2/plugins/ccip/prices/exec_price_estimator_test.go @@ -10,12 +10,14 @@ import ( "github.com/stretchr/testify/assert" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/gas" "github.com/smartcontractkit/chainlink-evm/pkg/gas/mocks" ) func TestExecPriceEstimator_GetGasPrice(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := context.Background() testCases := []struct { @@ -107,6 +109,7 @@ func TestExecPriceEstimator_GetGasPrice(t *testing.T) { } func TestExecPriceEstimator_DenoteInUSD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val1e18 := func(val int64) *big.Int { return new(big.Int).Mul(big.NewInt(1e18), big.NewInt(val)) } testCases := []struct { @@ -148,6 +151,7 @@ func TestExecPriceEstimator_DenoteInUSD(t *testing.T) { } func TestExecPriceEstimator_Median(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val1e18 := func(val int64) *big.Int { return new(big.Int).Mul(big.NewInt(1e18), big.NewInt(val)) } testCases := []struct { @@ -200,6 +204,7 @@ func TestExecPriceEstimator_Median(t *testing.T) { } func TestExecPriceEstimator_Deviates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string gasPrice1 *big.Int @@ -256,6 +261,7 @@ func TestExecPriceEstimator_Deviates(t *testing.T) { } func TestExecPriceEstimator_EstimateMsgCostUSD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string gasPrice *big.Int diff --git a/core/services/ocr2/plugins/ccip/tokendata/bgworker_test.go b/core/services/ocr2/plugins/ccip/tokendata/bgworker_test.go index c018ebf1274..2555baddbd6 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/bgworker_test.go +++ b/core/services/ocr2/plugins/ccip/tokendata/bgworker_test.go @@ -13,12 +13,14 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata" ) func TestBackgroundWorker(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) const numTokens = 100 @@ -98,6 +100,7 @@ func TestBackgroundWorker(t *testing.T) { } func TestBackgroundWorker_RetryOnErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) tk1 := cciptypes.Address(utils.RandomAddress().String()) @@ -166,6 +169,7 @@ func TestBackgroundWorker_RetryOnErrors(t *testing.T) { } func TestBackgroundWorker_Timeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) tk1 := cciptypes.Address(utils.RandomAddress().String()) diff --git a/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go index 47dd44c3291..7e1a42eff91 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go +++ b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go @@ -19,6 +19,7 @@ import ( "go.uber.org/zap/zapcore" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" @@ -59,6 +60,7 @@ func TestLBTCReader_callAttestationApi(t *testing.T) { } func TestLBTCReader_callAttestationApiMock(t *testing.T) { + tests.BelongsToCISuite(t, "unit") response := attestationResponse{ Attestations: []messageAttestationResponse{ { @@ -85,6 +87,7 @@ func TestLBTCReader_callAttestationApiMock(t *testing.T) { func TestLBTCReader_callAttestationApiMockError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") sessionApprovedResponse := attestationResponse{ Attestations: []messageAttestationResponse{ @@ -191,6 +194,7 @@ func TestLBTCReader_callAttestationApiMockError(t *testing.T) { } func TestLBTCReader_rateLimiting(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sessionApprovedResponse := attestationResponse{ Attestations: []messageAttestationResponse{ { @@ -321,6 +325,7 @@ func TestLBTCReader_rateLimiting(t *testing.T) { } func TestLBTCReader_skipApiOnFullPayload(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sessionApprovedResponse := attestationResponse{ Attestations: []messageAttestationResponse{ { @@ -363,6 +368,7 @@ func TestLBTCReader_skipApiOnFullPayload(t *testing.T) { func TestLBTCReader_expectedOutput(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -481,6 +487,7 @@ func TestLBTCReader_expectedOutput(t *testing.T) { } func Test_DecodeSourceTokenData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") input, err := hexutil.Decode("0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000249f00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000267d40f64ecc4d95f3e8b2237df5f37b10812c250000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c47e4b3124597fdf8dd07843d4a7052f2ee80c3000000000000000000000000000000000000000000000000000000000000000e45c70a5050000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc0000000000000000000000000000000000000000000000000000000000014a34000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc00000000000000000000000062f10ce5b727edf787ea45776bd050308a61150800000000000000000000000000000000000000000000000000000000000003e6000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000") require.NoError(t, err) decoded, err := abihelpers.DecodeAbiStruct[sourceTokenData](input) diff --git a/core/services/ocr2/plugins/ccip/tokendata/observability/usdc_client_test.go b/core/services/ocr2/plugins/ccip/tokendata/observability/usdc_client_test.go index 9108064f3d2..75f4f3c6251 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/observability/usdc_client_test.go +++ b/core/services/ocr2/plugins/ccip/tokendata/observability/usdc_client_test.go @@ -19,6 +19,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" @@ -34,6 +35,7 @@ type expected struct { } func TestUSDCClientMonitoring(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string server *httptest.Server diff --git a/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_blackbox_test.go b/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_blackbox_test.go index 2768c3f99d0..f9ac5dd08ad 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_blackbox_test.go +++ b/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_blackbox_test.go @@ -15,6 +15,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" @@ -30,6 +31,7 @@ type attestationResponse struct { func TestUSDCReader_ReadTokenData(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string attestationResponse attestationResponse diff --git a/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_test.go b/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_test.go index 1964532e7a1..e96637f747d 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_test.go +++ b/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc_test.go @@ -20,6 +20,7 @@ import ( "github.com/stretchr/testify/require" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -54,6 +55,7 @@ func TestUSDCReader_callAttestationApi(t *testing.T) { func TestUSDCReader_callAttestationApiMock(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := t.Context() response := attestationResponse{ Status: attestationStatusSuccess, @@ -78,6 +80,7 @@ func TestUSDCReader_callAttestationApiMock(t *testing.T) { func TestUSDCReader_callAttestationApiMockError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -232,6 +235,7 @@ func getMockUSDCEndpoint(t *testing.T, response attestationResponse) *httptest.S func TestGetUSDCMessageBody(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) expectedBody := []byte("0x0000000000000001000000020000000000048d71000000000000000000000000eb08f243e5d3fcff26a9e38ae5520a669f4019d000000000000000000000000023a04d5935ed8bc8e3eb78db3541f0abfb001c6e0000000000000000000000006cb3ed9b441eb674b58495c8b3324b59faff5243000000000000000000000000000000005425890298aed601595a70ab815c96711a31bc65000000000000000000000000ab4f961939bfe6a93567cc57c59eed7084ce2131000000000000000000000000000000000000000000000000000000000000271000000000000000000000000035e08285cfed1ef159236728f843286c55fc0861") usdcReader := ccipdatamocks.USDCReader{} @@ -260,6 +264,7 @@ func TestGetUSDCMessageBody(t *testing.T) { func TestTokenDataReader_getUsdcTokenEndOffset(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") usdcToken := utils.RandomAddress() nonUsdcToken := utils.RandomAddress() @@ -313,6 +318,7 @@ func TestTokenDataReader_getUsdcTokenEndOffset(t *testing.T) { func TestUSDCReader_rateLimiting(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string requests uint64 diff --git a/core/services/ocr2/plugins/functions/aggregation_test.go b/core/services/ocr2/plugins/functions/aggregation_test.go index 8a39a9b6561..a09596814ff 100644 --- a/core/services/ocr2/plugins/functions/aggregation_test.go +++ b/core/services/ocr2/plugins/functions/aggregation_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/encoding" @@ -39,6 +40,7 @@ func reqMeta(id int, result []byte, err []byte, callbackGas uint32, coordinatorC func TestCanAggregate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") obs := make([]*encoding.ProcessedRequest, 10) require.True(t, functions.CanAggregate(4, 1, obs[:4])) @@ -53,6 +55,7 @@ func TestCanAggregate(t *testing.T) { func TestAggregate_Successful(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/services/ocr2/plugins/functions/config/config_test.go b/core/services/ocr2/plugins/functions/config/config_test.go index ee23a2fc1e9..170912a1641 100644 --- a/core/services/ocr2/plugins/functions/config/config_test.go +++ b/core/services/ocr2/plugins/functions/config/config_test.go @@ -8,10 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestS4ConfigDecoder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") configProto := &config.ReportingPluginConfig{ S4PluginConfig: &config.S4ReportingPluginConfig{ diff --git a/core/services/ocr2/plugins/functions/encoding/abi_codec_test.go b/core/services/ocr2/plugins/functions/encoding/abi_codec_test.go index 8cb44fac81c..7b3113b7472 100644 --- a/core/services/ocr2/plugins/functions/encoding/abi_codec_test.go +++ b/core/services/ocr2/plugins/functions/encoding/abi_codec_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/encoding" ) func TestABICodec_EncodeDecodeV1Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") codec, err := encoding.NewReportCodec(1) require.NoError(t, err) @@ -48,6 +50,7 @@ func TestABICodec_EncodeDecodeV1Success(t *testing.T) { func TestABICodec_SliceToByte32(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, err := encoding.SliceToByte32([]byte("abcd")) require.Error(t, err) diff --git a/core/services/ocr2/plugins/functions/integration_tests/v1/functions_integration_test.go b/core/services/ocr2/plugins/functions/integration_tests/v1/functions_integration_test.go index 2e7879d006d..70856d8a5c3 100644 --- a/core/services/ocr2/plugins/functions/integration_tests/v1/functions_integration_test.go +++ b/core/services/ocr2/plugins/functions/integration_tests/v1/functions_integration_test.go @@ -8,6 +8,7 @@ import ( "github.com/smartcontractkit/quarantine" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" functionsConfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" utils "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/integration_tests/v1/internal" ) @@ -23,6 +24,7 @@ var ( ) func TestIntegration_Functions_MultipleV1Requests_Success(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1804") // simulated chain with all contracts owner, b, commit, stop, active, proposed, clientContracts, routerAddress, routerContract, linkToken, allowListContractAddress, allowListContract := utils.StartNewChainWithContracts(t, nClients) @@ -51,6 +53,8 @@ func TestIntegration_Functions_MultipleV1Requests_Success(t *testing.T) { } func TestIntegration_Functions_MultipleV1Requests_ThresholdDecryptionSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + // simulated chain with all contracts owner, b, commit, stop, active, proposed, clientContracts, routerAddress, routerContract, linkToken, allowListContractAddress, allowListContract := utils.StartNewChainWithContracts(t, nClients) defer stop() @@ -88,6 +92,7 @@ func TestIntegration_Functions_MultipleV1Requests_ThresholdDecryptionSuccess(t * } func TestIntegration_Functions_MultipleV1Requests_WithUpgrade(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1808") // simulated chain with all contracts owner, b, commit, stop, active, proposed, clientContracts, routerAddress, routerContract, linkToken, allowListContractAddress, allowListContract := utils.StartNewChainWithContracts(t, nClients) diff --git a/core/services/ocr2/plugins/functions/plugin_test.go b/core/services/ocr2/plugins/functions/plugin_test.go index 6916ea4aa2e..13b8f7da891 100644 --- a/core/services/ocr2/plugins/functions/plugin_test.go +++ b/core/services/ocr2/plugins/functions/plugin_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/ratelimit" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -22,6 +23,7 @@ import ( func TestNewConnector_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) @@ -52,6 +54,7 @@ func TestNewConnector_Success(t *testing.T) { func TestNewConnector_NoKeyForConfiguredAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) diff --git a/core/services/ocr2/plugins/functions/reporting_test.go b/core/services/ocr2/plugins/functions/reporting_test.go index 25e3f5073ca..ceec464bb2b 100644 --- a/core/services/ocr2/plugins/functions/reporting_test.go +++ b/core/services/ocr2/plugins/functions/reporting_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" functions_srv "github.com/smartcontractkit/chainlink/v2/core/services/functions" @@ -130,6 +131,7 @@ func newObservation(t *testing.T, observerId uint8, requests ...*encoding.Proces func TestFunctionsReporting_Query(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") const batchSize = 10 plugin, orm, _, _ := preparePlugin(t, batchSize, 0) reqs := []functions_srv.Request{newRequest(), newRequest()} @@ -148,6 +150,7 @@ func TestFunctionsReporting_Query(t *testing.T) { func TestFunctionsReporting_Query_HandleCoordinatorMismatch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") const batchSize = 10 plugin, orm, _, _ := preparePlugin(t, batchSize, 1000000) reqs := []functions_srv.Request{newRequest(), newRequest()} @@ -168,6 +171,7 @@ func TestFunctionsReporting_Query_HandleCoordinatorMismatch(t *testing.T) { func TestFunctionsReporting_Observation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, orm, _, _ := preparePlugin(t, 10, 0) req1 := newRequestWithResult([]byte("abc")) @@ -203,6 +207,7 @@ func TestFunctionsReporting_Observation(t *testing.T) { func TestFunctionsReporting_Observation_IncorrectQuery(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, orm, _, _ := preparePlugin(t, 10, 0) req1 := newRequestWithResult([]byte("abc")) @@ -230,6 +235,7 @@ func TestFunctionsReporting_Observation_IncorrectQuery(t *testing.T) { func TestFunctionsReporting_Report(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, _, codec, _ := preparePlugin(t, 10, 1000000) reqId1, reqId2, reqId3 := newRequestID(), newRequestID(), newRequestID() compResult := []byte("aaa") @@ -267,6 +273,7 @@ func TestFunctionsReporting_Report(t *testing.T) { func TestFunctionsReporting_Report_WithGasLimitAndMetadata(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, _, codec, _ := preparePlugin(t, 10, 300000) reqId1, reqId2, reqId3 := newRequestID(), newRequestID(), newRequestID() compResult := []byte("aaa") @@ -308,6 +315,7 @@ func TestFunctionsReporting_Report_WithGasLimitAndMetadata(t *testing.T) { func TestFunctionsReporting_Report_HandleCoordinatorMismatch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, _, codec, _ := preparePlugin(t, 10, 300000) reqId1, reqId2, reqId3 := newRequestID(), newRequestID(), newRequestID() compResult, meta := []byte("aaa"), []byte("meta") @@ -338,6 +346,7 @@ func TestFunctionsReporting_Report_HandleCoordinatorMismatch(t *testing.T) { func TestFunctionsReporting_Report_CallbackGasLimitExceeded(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, _, codec, _ := preparePlugin(t, 10, 200000) reqId1, reqId2 := newRequestID(), newRequestID() compResult := []byte("aaa") @@ -369,6 +378,7 @@ func TestFunctionsReporting_Report_CallbackGasLimitExceeded(t *testing.T) { func TestFunctionsReporting_Report_DeterministicOrderOfRequests(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, _, codec, _ := preparePlugin(t, 10, 0) reqId1, reqId2, reqId3 := newRequestID(), newRequestID(), newRequestID() compResult := []byte("aaa") @@ -398,6 +408,7 @@ func TestFunctionsReporting_Report_DeterministicOrderOfRequests(t *testing.T) { func TestFunctionsReporting_Report_IncorrectObservation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, _, _, _ := preparePlugin(t, 10, 0) reqId1 := newRequestID() compResult := []byte("aaa") @@ -432,6 +443,7 @@ func getReportBytes(t *testing.T, codec encoding.ReportCodec, reqs ...functions_ func TestFunctionsReporting_ShouldAcceptFinalizedReport(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, orm, codec, _ := preparePlugin(t, 10, 0) req1 := newRequestWithResult([]byte("xxx")) // nonexistent @@ -471,6 +483,7 @@ func TestFunctionsReporting_ShouldAcceptFinalizedReport(t *testing.T) { func TestFunctionsReporting_ShouldAcceptFinalizedReport_OffchainTransmission(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, orm, codec, offchainTransmitter := preparePlugin(t, 10, 0) req1 := newRequestWithResult([]byte("abc")) req1.OnchainMetadata = []byte(functions_srv.OffchainRequestMarker) @@ -486,6 +499,7 @@ func TestFunctionsReporting_ShouldAcceptFinalizedReport_OffchainTransmission(t * func TestFunctionsReporting_ShouldTransmitAcceptedReport(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") plugin, orm, codec, _ := preparePlugin(t, 10, 0) req1 := newRequestWithResult([]byte("xxx")) // nonexistent @@ -524,6 +538,7 @@ func TestFunctionsReporting_ShouldTransmitAcceptedReport(t *testing.T) { func TestFunctionsReporting_ShouldIncludeCoordinator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") zeroAddr, coord1, coord2 := &common.Address{}, &common.Address{1}, &common.Address{2} diff --git a/core/services/ocr2/plugins/generic/merge_test.go b/core/services/ocr2/plugins/generic/merge_test.go index 01734020a1a..34b694aa350 100644 --- a/core/services/ocr2/plugins/generic/merge_test.go +++ b/core/services/ocr2/plugins/generic/merge_test.go @@ -5,9 +5,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestMerge(t *testing.T) { + tests.BelongsToCISuite(t, "unit") vars := map[string]any{ "jb": map[string]any{ "databaseID": "some-job-id", diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go index 10fcb1b66e6..0b930e4fa8d 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -36,6 +37,7 @@ answer; ` func TestAdapter_Integration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) ctx := testutils.Context(t) logger := logger.TestLogger(t) @@ -105,6 +107,7 @@ func (m *mockPipelineRunner) ExecuteAndInsertFinishedRun(ctx context.Context, sp } func TestAdapter_AddsDefaultVars(t *testing.T) { + tests.BelongsToCISuite(t, "unit") logger := logger.TestLogger(t) mpr := newMockPipelineRunner() jobID, externalJobID, name := int32(100), uuid.New(), null.StringFrom("job-name") @@ -127,6 +130,7 @@ func TestAdapter_AddsDefaultVars(t *testing.T) { } func TestPipelineRunnerAdapter_SetsVarsOnSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") logger := logger.TestLogger(t) mpr := newMockPipelineRunner() jobID, externalJobID, name, jobType := int32(100), uuid.New(), null.StringFrom("job-name"), job.Type("generic") diff --git a/core/services/ocr2/plugins/generic/relayerset_test.go b/core/services/ocr2/plugins/generic/relayerset_test.go index 5a74f091f5a..58ac22a8f71 100644 --- a/core/services/ocr2/plugins/generic/relayerset_test.go +++ b/core/services/ocr2/plugins/generic/relayerset_test.go @@ -12,9 +12,11 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestRelayerSet_List(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testRelayersMap := map[types.RelayID]loop.Relayer{} testRelayersMap[types.RelayID{Network: "N1", ChainID: "C1"}] = &TestRelayer{} testRelayersMap[types.RelayID{Network: "N2", ChainID: "C2"}] = &TestRelayer{} @@ -42,6 +44,7 @@ func TestRelayerSet_List(t *testing.T) { } func TestRelayerSet_Get(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testRelayersMap := map[types.RelayID]loop.Relayer{} testRelayersMap[types.RelayID{Network: "N1", ChainID: "C1"}] = &TestRelayer{} testRelayersMap[types.RelayID{Network: "N2", ChainID: "C2"}] = &TestRelayer{} @@ -60,6 +63,7 @@ func TestRelayerSet_Get(t *testing.T) { } func TestRelayerSet_NewPluginProvider(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testRelayersMap := map[types.RelayID]loop.Relayer{} testRelayer := &TestRelayer{} testRelayersMap[types.RelayID{Network: "N1", ChainID: "C1"}] = testRelayer diff --git a/core/services/ocr2/plugins/generic/telemetry_adapter_test.go b/core/services/ocr2/plugins/generic/telemetry_adapter_test.go index 6a281209540..49c1b2c4e0e 100644 --- a/core/services/ocr2/plugins/generic/telemetry_adapter_test.go +++ b/core/services/ocr2/plugins/generic/telemetry_adapter_test.go @@ -8,6 +8,7 @@ import ( "github.com/smartcontractkit/libocr/commontypes" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/generic" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" @@ -40,6 +41,7 @@ func (m *mockGenerator) GenMultitypeMonitoringEndpoint(network string, chainID s } func TestTelemetryAdapter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ta := generic.NewTelemetryAdapter(&mockGenerator{}) tests := []struct { diff --git a/core/services/ocr2/plugins/llo/config/config_test.go b/core/services/ocr2/plugins/llo/config/config_test.go index 0522a7f4a9f..a4920f1718f 100644 --- a/core/services/ocr2/plugins/llo/config/config_test.go +++ b/core/services/ocr2/plugins/llo/config/config_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func Test_Config(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("unmarshals from toml", func(t *testing.T) { cdjson := `{ "42": { @@ -145,6 +147,7 @@ func Test_Config(t *testing.T) { } func Test_PluginConfig_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("with invalid URLs or keys", func(t *testing.T) { servers := map[string]utils.PlainHexBytes{ "not a valid url": utils.PlainHexBytes([]byte{1, 2, 3}), @@ -159,6 +162,7 @@ func Test_PluginConfig_Validate(t *testing.T) { } func Test_PluginConfig_GetServers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("with multiple servers", func(t *testing.T) { servers := map[string]utils.PlainHexBytes{ "example.com:80": utils.PlainHexBytes([]byte{1, 2, 3}), diff --git a/core/services/ocr2/plugins/llo/integration_test.go b/core/services/ocr2/plugins/llo/integration_test.go index 85f95d05aa5..ae3b597908a 100644 --- a/core/services/ocr2/plugins/llo/integration_test.go +++ b/core/services/ocr2/plugins/llo/integration_test.go @@ -55,6 +55,7 @@ import ( evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -415,6 +416,7 @@ func promoteStagingConfig(t *testing.T, donID uint32, steve *bind.TransactOpts, func TestIntegration_LLO_evm_premium_legacy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") offchainConfigs := []datastreamsllo.OffchainConfig{ { ProtocolVersion: 0, @@ -657,6 +659,7 @@ channelDefinitionsContractFromBlock = %d`, serverURL, serverPubKey, donID, confi func TestIntegration_LLO_multi_formats(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") offchainConfigs := []datastreamsllo.OffchainConfig{ { ProtocolVersion: 0, @@ -1407,6 +1410,7 @@ dp -> deribit_funding_interval_hours_parse -> deribit_funding_interval_hours_dec func TestIntegration_LLO_stress_test_V1(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // logLevel: the log level to use for the nodes // setting a more verbose log level increases cpu usage significantly @@ -1644,6 +1648,7 @@ channelDefinitionsContractFromBlock = %d`, serverURL, serverPubKey, donID, confi func TestIntegration_LLO_transmit_errors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // logLevel: the log level to use for the nodes // setting a more verbose log level increases cpu usage significantly @@ -1819,6 +1824,7 @@ channelDefinitionsContractFromBlock = %d`, serverURL, serverPubKey, serverPubKey func TestIntegration_LLO_blue_green_lifecycle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // starting offchainConfig, the test will handle // blue green for ProtocolVersion and EnableObservationCompression changes diff --git a/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go b/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go index 3a495a6f466..24d1342b8bf 100644 --- a/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go +++ b/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go @@ -31,6 +31,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" evmtestutils "github.com/smartcontractkit/chainlink-evm/pkg/testutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/llo-feeds/generated/channel_config_store" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -142,6 +143,7 @@ func countChannels(defsJSON json.RawMessage) int { func Test_ChannelDefinitionCache_Integration(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var ( invalidDefinitions = []byte(`{{{`) invalidDefinitionsSHA = sha3.Sum256(invalidDefinitions) diff --git a/core/services/ocr2/plugins/median/config/config_test.go b/core/services/ocr2/plugins/median/config/config_test.go index e4e29d0b7fa..a1a48743931 100644 --- a/core/services/ocr2/plugins/median/config/config_test.go +++ b/core/services/ocr2/plugins/median/config/config_test.go @@ -8,9 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidatePluginConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type testCase struct { name string pipeline string diff --git a/core/services/ocr2/plugins/mercury/config/config_test.go b/core/services/ocr2/plugins/mercury/config/config_test.go index c00d1a3f478..7f0b868de75 100644 --- a/core/services/ocr2/plugins/mercury/config/config_test.go +++ b/core/services/ocr2/plugins/mercury/config/config_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -14,6 +15,7 @@ var v1FeedId = [32]uint8{00, 01, 107, 74, 167, 229, 124, 167, 182, 138, 225, 191 var v2FeedId = [32]uint8{00, 02, 107, 74, 167, 229, 124, 167, 182, 138, 225, 191, 69, 101, 63, 86, 182, 86, 253, 58, 163, 53, 239, 127, 174, 105, 107, 102, 63, 27, 132, 114} func Test_PluginConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Mercury v1", func(t *testing.T) { t.Run("with valid values", func(t *testing.T) { rawToml := ` @@ -181,6 +183,7 @@ func Test_PluginConfig(t *testing.T) { } func Test_PluginConfig_GetServers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("with single server", func(t *testing.T) { pubKey := utils.PlainHexBytes([]byte{1, 2, 3}) pc := PluginConfig{RawServerURL: "example.com", ServerPubKey: pubKey} diff --git a/core/services/ocr2/plugins/mercury/integration_test.go b/core/services/ocr2/plugins/mercury/integration_test.go index f1060d21928..5f3e3edb197 100644 --- a/core/services/ocr2/plugins/mercury/integration_test.go +++ b/core/services/ocr2/plugins/mercury/integration_test.go @@ -42,6 +42,7 @@ import ( datastreamsmercury "github.com/smartcontractkit/chainlink-data-streams/mercury" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/link_token_interface" "github.com/smartcontractkit/chainlink-evm/gethwrappers/llo-feeds/generated/fee_manager" "github.com/smartcontractkit/chainlink-evm/gethwrappers/llo-feeds/generated/reward_manager" @@ -141,6 +142,7 @@ func setupBlockchain(t *testing.T) (*bind.TransactOpts, evmtypes.Backend, *verif func TestIntegration_MercuryV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") integration_MercuryV2(t) } @@ -415,6 +417,7 @@ func integration_MercuryV2(t *testing.T) { func TestIntegration_MercuryV3(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") integration_MercuryV3(t) } @@ -706,6 +709,7 @@ func integration_MercuryV3(t *testing.T) { func TestIntegration_MercuryV4(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") integration_MercuryV4(t) } diff --git a/core/services/ocr2/plugins/mercury/plugin_test.go b/core/services/ocr2/plugins/mercury/plugin_test.go index 0b833eaee3b..30b163cf97b 100644 --- a/core/services/ocr2/plugins/mercury/plugin_test.go +++ b/core/services/ocr2/plugins/mercury/plugin_test.go @@ -29,6 +29,7 @@ import ( libocr2 "github.com/smartcontractkit/libocr/offchainreporting2plus" libocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/types" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" @@ -91,6 +92,7 @@ var ( ) func TestNewServices(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { pluginConfig job.JSONConfig feedID utils.FeedID diff --git a/core/services/ocr2/plugins/ocr2keeper/config_test.go b/core/services/ocr2/plugins/ocr2keeper/config_test.go index 82b0a448e4b..2928008ba54 100644 --- a/core/services/ocr2/plugins/ocr2keeper/config_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/config_test.go @@ -6,9 +6,12 @@ import ( "time" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestUnmarshalDuration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") raw := `"2s"` var value Duration @@ -19,6 +22,7 @@ func TestUnmarshalDuration(t *testing.T) { } func TestUnmarshalConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") raw := `{"cacheExpiration":"2s","maxServiceWorkers":42}` var config PluginConfig diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/abi_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/abi_test.go index a23a490a188..f2de8ca39bb 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/abi_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/abi_test.go @@ -12,10 +12,12 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-automation/pkg/v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/keeper_registry_wrapper2_0" ) func TestUnpackTransmitTxInput(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registryABI, err := abi.JSON(strings.NewReader(keeper_registry_wrapper2_0.KeeperRegistryABI)) assert.NoError(t, err) @@ -37,6 +39,7 @@ func TestUnpackTransmitTxInput(t *testing.T) { } func TestUnpackTransmitTxInputErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string RawData string @@ -63,6 +66,7 @@ func TestUnpackTransmitTxInputErrors(t *testing.T) { } func TestUnpackCheckResults(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registryABI, err := abi.JSON(strings.NewReader(keeper_registry_wrapper2_0.KeeperRegistryABI)) if err != nil { assert.NoError(t, err) @@ -124,6 +128,7 @@ func TestUnpackCheckResults(t *testing.T) { } func TestUnpackPerformResult(t *testing.T) { + tests.BelongsToCISuite(t, "unit") registryABI, err := abi.JSON(strings.NewReader(keeper_registry_wrapper2_0.KeeperRegistryABI)) if err != nil { assert.NoError(t, err) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/encoder_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/encoder_test.go index b8f26aeb15c..923d11e9c53 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/encoder_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/encoder_test.go @@ -8,9 +8,11 @@ import ( "github.com/stretchr/testify/assert" ocr2keepers "github.com/smartcontractkit/chainlink-automation/pkg/v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestEVMAutomationEncoder20(t *testing.T) { + tests.BelongsToCISuite(t, "unit") encoder := EVMAutomationEncoder20{} t.Run("encoding an empty list of upkeep results returns a nil byte array", func(t *testing.T) { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go index cdea4ccb396..251f928c54a 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry_test.go @@ -17,11 +17,13 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestGetActiveUpkeepKeys(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string LatestHead int64 @@ -76,6 +78,7 @@ func TestGetActiveUpkeepKeys(t *testing.T) { } func TestPollLogs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string LastPoll int64 diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/active_list_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/active_list_test.go index 658451cafab..f8c4f8ab93c 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/active_list_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/active_list_test.go @@ -11,10 +11,12 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) func TestActiveUpkeepList(t *testing.T) { + tests.BelongsToCISuite(t, "unit") logIDs := []ocr2keepers.UpkeepIdentifier{ core.GenUpkeepID(types.LogTrigger, "0"), core.GenUpkeepID(types.LogTrigger, "1"), @@ -93,6 +95,7 @@ func TestActiveUpkeepList(t *testing.T) { } func TestActiveUpkeepList_error(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("if invalid or negative numbers are in the store, they are excluded from the view operation", func(t *testing.T) { al := &activeList{} al.items = make(map[string]bool) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/autotelemetry21/custom_telemetry_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/autotelemetry21/custom_telemetry_test.go index e561d076ef2..18bb8f6c3b8 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/autotelemetry21/custom_telemetry_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/autotelemetry21/custom_telemetry_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/heads" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" evm "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21" ) @@ -19,6 +20,7 @@ import ( const finality = uint32(4) func TestNewAutomationCustomTelemetryService(t *testing.T) { + tests.BelongsToCISuite(t, "unit") me := &MockMonitoringEndpoint{} lggr := logger.TestLogger(t) var hb heads.Broadcaster diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go index c550bc43700..adee36a4d02 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/block_subscriber_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -26,6 +27,7 @@ const blockSize = int64(4) const finality = uint32(4) func TestBlockSubscriber_Subscribe(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster var lp logpoller.LogPoller @@ -45,6 +47,7 @@ func TestBlockSubscriber_Subscribe(t *testing.T) { } func TestBlockSubscriber_Unsubscribe(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster var lp logpoller.LogPoller @@ -63,6 +66,7 @@ func TestBlockSubscriber_Unsubscribe(t *testing.T) { } func TestBlockSubscriber_Unsubscribe_Failure(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster var lp logpoller.LogPoller @@ -75,6 +79,7 @@ func TestBlockSubscriber_Unsubscribe_Failure(t *testing.T) { } func TestBlockSubscriber_GetBlockRange(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster @@ -114,6 +119,7 @@ func TestBlockSubscriber_GetBlockRange(t *testing.T) { } func TestBlockSubscriber_InitializeBlocks(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster @@ -177,6 +183,7 @@ func TestBlockSubscriber_InitializeBlocks(t *testing.T) { } func TestBlockSubscriber_BuildHistory(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster lp := new(mocks.LogPoller) @@ -227,6 +234,7 @@ func TestBlockSubscriber_BuildHistory(t *testing.T) { } func TestBlockSubscriber_Cleanup(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) var hb heads.Broadcaster lp := new(mocks.LogPoller) @@ -275,6 +283,7 @@ func TestBlockSubscriber_Cleanup(t *testing.T) { } func TestBlockSubscriber_Start(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) hb := headstest.NewBroadcaster[*evmtypes.Head, common.Hash](t) hb.On("Subscribe", mock.Anything).Return(&evmtypes.Head{Number: 42}, func() {}) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/payload_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/payload_test.go index 63de1f25ec4..dc199f6273f 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/payload_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/payload_test.go @@ -10,9 +10,11 @@ import ( "github.com/stretchr/testify/assert" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestWorkID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string upkeepID string @@ -95,6 +97,7 @@ func TestWorkID(t *testing.T) { } func TestNewUpkeepPayload(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string upkeepID *big.Int diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger_test.go index 0a5d3fba4a0..cfba6036ef3 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/trigger_test.go @@ -10,9 +10,11 @@ import ( "github.com/stretchr/testify/assert" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPackUnpackTrigger(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string id []byte diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/type_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/type_test.go index 1e4ec201b47..328cefb9238 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/type_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/type_test.go @@ -9,9 +9,11 @@ import ( "github.com/stretchr/testify/assert" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestGetUpkeepType(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string upkeepID []byte diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/utils_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/utils_test.go index 49b3cad7d92..a53b65c3cf8 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/utils_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/utils_test.go @@ -9,12 +9,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestUtils_GetTxBlock(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string txHash common.Hash diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder_test.go index 08ce0805bb0..a3c67604ebb 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/encoder_test.go @@ -14,6 +14,7 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) @@ -31,6 +32,7 @@ func init() { } func TestReportEncoder_EncodeExtract(t *testing.T) { + tests.BelongsToCISuite(t, "unit") encoder := reportEncoder{ packer: NewAbiPacker(), } @@ -112,6 +114,7 @@ func TestReportEncoder_EncodeExtract(t *testing.T) { } func TestReportEncoder_BackwardsCompatibility(t *testing.T) { + tests.BelongsToCISuite(t, "unit") encoder := reportEncoder{ packer: NewAbiPacker(), } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go index 92bec6003ec..81b302b6070 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding/packer_test.go @@ -12,11 +12,13 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ac "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/automation_compatible_utils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) func TestPacker_PackReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range []struct { name string report ac.IAutomationV21PlusCommonReport @@ -116,6 +118,7 @@ func TestPacker_PackReport(t *testing.T) { } func TestPacker_UnpackCheckResults(t *testing.T) { + tests.BelongsToCISuite(t, "unit") uid, _ := new(big.Int).SetString("1843548457736589226156809205796175506139185429616502850435279853710366065936", 10) upkeepId := ocr2keepers.UpkeepIdentifier{} upkeepId.FromBigInt(uid) @@ -205,6 +208,7 @@ func TestPacker_UnpackCheckResults(t *testing.T) { } func TestPacker_UnpackPerformResult(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string RawData string @@ -228,6 +232,7 @@ func TestPacker_UnpackPerformResult(t *testing.T) { } func TestPacker_UnpackLogTriggerConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string raw []byte @@ -272,6 +277,7 @@ func TestPacker_UnpackLogTriggerConfig(t *testing.T) { } func TestPacker_PackReport_UnpackReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") report := ac.IAutomationV21PlusCommonReport{ FastGasWei: big.NewInt(1), LinkNative: big.NewInt(1), diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/gasprice/gasprice_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/gasprice/gasprice_test.go index 7bd106326b5..b750e7a1e03 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/gasprice/gasprice_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/gasprice/gasprice_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/gas" gasMocks "github.com/smartcontractkit/chainlink-evm/pkg/gas/mocks" @@ -22,6 +23,7 @@ type WrongOffchainConfig struct { } func TestGasPrice_Check(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) uid, _ := new(big.Int).SetString("1843548457736589226156809205796175506139185429616502850435279853710366065936", 10) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/keyring_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/keyring_test.go index 92a05c2d760..d1095f8e048 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/keyring_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/keyring_test.go @@ -9,9 +9,11 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-automation/pkg/v3/plugin" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNewOnchainKeyringV3Wrapper(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("the on chain keyring wrapper gets the public key and max signature length from the wrapped keyring", func(t *testing.T) { onchainKeyring := &mockOnchainKeyring{ MaxSignatureLengthFn: func() int { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time_test.go index 60c207b4031..1e8174bbb3a 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/block_time_test.go @@ -8,12 +8,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestBlockTimeResolver_BlockTime(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() tests := []struct { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go index 3239cd1b270..aa2c297f75f 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestLogEventBufferV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") buf := NewLogBuffer(logger.TestLogger(t), 10, 20, 1) buf.Enqueue(big.NewInt(1), @@ -33,6 +35,7 @@ func TestLogEventBufferV1(t *testing.T) { } func TestLogEventBufferV1_SyncFilters(t *testing.T) { + tests.BelongsToCISuite(t, "unit") buf := NewLogBuffer(logger.TestLogger(t), 10, 20, 1) buf.Enqueue(big.NewInt(1), @@ -69,6 +72,7 @@ func (l *readableLogger) With(args ...any) logger.Logger { } func TestLogEventBufferV1_EnqueueViolations(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("enqueuing logs for a block older than latest seen logs a message", func(t *testing.T) { logReceived := false readableLogger := &readableLogger{ @@ -137,6 +141,7 @@ func TestLogEventBufferV1_EnqueueViolations(t *testing.T) { } func TestLogEventBufferV1_Dequeue(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string logsInBuffer map[*big.Int][]logpoller.Log @@ -225,6 +230,7 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) { } func TestLogEventBufferV1_Enqueue(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string logsToAdd map[*big.Int][]logpoller.Log @@ -347,6 +353,7 @@ func TestLogEventBufferV1_Enqueue(t *testing.T) { } func TestLogEventBufferV1_UpkeepQueue(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("enqueue dequeue", func(t *testing.T) { q := newUpkeepLogQueue(logger.TestLogger(t), big.NewInt(1), newLogBufferOptions(10, 1, 1)) @@ -387,6 +394,7 @@ func TestLogEventBufferV1_UpkeepQueue(t *testing.T) { } func TestLogEventBufferV1_UpkeepQueue_sizeOfRange(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("empty", func(t *testing.T) { q := newUpkeepLogQueue(logger.TestLogger(t), big.NewInt(1), newLogBufferOptions(10, 1, 1)) @@ -405,6 +413,7 @@ func TestLogEventBufferV1_UpkeepQueue_sizeOfRange(t *testing.T) { } func TestLogEventBufferV1_UpkeepQueue_clean(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("empty", func(t *testing.T) { q := newUpkeepLogQueue(logger.TestLogger(t), big.NewInt(1), newLogBufferOptions(10, 1, 1)) @@ -442,6 +451,7 @@ func TestLogEventBufferV1_UpkeepQueue_clean(t *testing.T) { } func TestLogEventBufferV1_BlockWindow(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string block int64 diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_store_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_store_test.go index 955a5e3d863..573a36dc473 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_store_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_store_test.go @@ -7,9 +7,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestFilterStore_CRUD(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string initial []upkeepFilter @@ -68,6 +71,7 @@ func TestFilterStore_CRUD(t *testing.T) { } func TestFilterStore_Concurrency(t *testing.T) { + tests.BelongsToCISuite(t, "unit") s := NewUpkeepFilterStore() var wg sync.WaitGroup diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_test.go index 53c3bf3b399..ea99130435f 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/filter_test.go @@ -8,10 +8,12 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" ) func TestUpkeepFilter_Select(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var zeroBytes [32]byte emptyTopic := common.BytesToHash(zeroBytes[:]) contractAddress := common.HexToAddress("0xB9F3af0c2CbfE108efd0E23F7b0a151Ea42f764E") diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go index 66f9618c8c0..ea15ae3e0f4 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go @@ -26,6 +26,7 @@ import ( evmtestutils "github.com/smartcontractkit/chainlink-evm/pkg/testutils" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/log_upkeep_counter_wrapper" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -37,6 +38,7 @@ import ( ) func TestIntegration_LogEventProvider(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx, cancel := context.WithCancel(testutils.Context(t)) defer cancel() @@ -126,6 +128,7 @@ func TestIntegration_LogEventProvider(t *testing.T) { } func TestIntegration_LogEventProvider_UpdateConfig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1779") ctx := testutils.Context(t) @@ -200,6 +203,7 @@ func TestIntegration_LogEventProvider_UpdateConfig(t *testing.T) { } func TestIntegration_LogEventProvider_Backfill(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1766") ctx, cancel := context.WithTimeout(testutils.Context(t), time.Second*60) defer cancel() @@ -253,6 +257,7 @@ func TestIntegration_LogEventProvider_Backfill(t *testing.T) { } func TestIntegration_LogRecoverer_Backfill(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1889") ctx := testutils.Context(t) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_test.go index 919457de749..2ec0e3ab2f6 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log_test.go @@ -6,10 +6,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" ) func TestLogComparatorSorter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string a logpoller.Log diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go index 5da9b1b6f59..c6aab0bfe76 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_life_cycle_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -20,6 +21,7 @@ import ( ) func TestLogEventProvider_LifeCycle(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string errored bool @@ -144,6 +146,7 @@ func TestLogEventProvider_LifeCycle(t *testing.T) { } func TestEventLogProvider_RefreshActiveUpkeeps(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) mp := new(mocks.LogPoller) mp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) @@ -187,6 +190,7 @@ func TestEventLogProvider_RefreshActiveUpkeeps(t *testing.T) { } func TestLogEventProvider_ValidateLogTriggerConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") contractAddress := common.HexToAddress("0xB9F3af0c2CbfE108efd0E23F7b0a151Ea42f764E") eventSig := common.HexToHash("0x3bdab8bffae631cfee411525ebae27f3fb61b10c662c09ec2a7dbb5854c87e8c") tests := []struct { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go index f3be7a3a4e4..6dc8385ca6d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider_test.go @@ -16,6 +16,7 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -23,6 +24,7 @@ import ( ) func TestLogEventProvider_GetFilters(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := NewLogProvider(logger.TestLogger(t), nil, big.NewInt(1), &mockedPacker{}, NewUpkeepFilterStore(), NewOptions(200, big.NewInt(1))) _, f := newEntry(p, 1) @@ -65,6 +67,7 @@ func TestLogEventProvider_GetFilters(t *testing.T) { } func TestLogEventProvider_UpdateEntriesLastPoll(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := NewLogProvider(logger.TestLogger(t), nil, big.NewInt(1), &mockedPacker{}, NewUpkeepFilterStore(), NewOptions(200, big.NewInt(1))) n := 10 @@ -109,6 +112,7 @@ func TestLogEventProvider_UpdateEntriesLastPoll(t *testing.T) { } func TestLogEventProvider_ScheduleReadJobs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mp := new(mocks.LogPoller) tests := []struct { @@ -239,6 +243,7 @@ func TestLogEventProvider_ScheduleReadJobs(t *testing.T) { } func TestLogEventProvider_ReadLogs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) mp := new(mocks.LogPoller) @@ -317,6 +322,7 @@ func remainingBlockWindowCounts(queues map[string]*upkeepLogQueue, blockRate int } func TestLogEventProvider_GetLatestPayloads(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("dequeuing from an empty buffer returns 0 logs", func(t *testing.T) { opts := NewOptions(200, big.NewInt(42161)) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go index dadea53d7db..a60f2187709 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer_test.go @@ -17,6 +17,7 @@ import ( autotypes "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -29,6 +30,7 @@ import ( ) func TestLogRecoverer_GetRecoverables(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lp := &lpmocks.LogPoller{} lp.On("LatestBlock", mock.Anything).Return(logpoller.Block{BlockNumber: 100}, nil) @@ -99,6 +101,7 @@ func TestLogRecoverer_GetRecoverables(t *testing.T) { } func TestLogRecoverer_Clean(t *testing.T) { + tests.BelongsToCISuite(t, "unit") oldLogsOffset := int64(20) tests := []struct { @@ -212,6 +215,7 @@ func TestLogRecoverer_Clean(t *testing.T) { } func TestLogRecoverer_Recover(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) tests := []struct { @@ -455,6 +459,7 @@ func TestLogRecoverer_Recover(t *testing.T) { } func TestLogRecoverer_SelectFilterBatch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") n := recoveryBatchSize*2 + 2 filters := []upkeepFilter{} for i := range n { @@ -472,6 +477,7 @@ func TestLogRecoverer_SelectFilterBatch(t *testing.T) { } func TestLogRecoverer_getFilterBatch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string offsetBlock int64 @@ -520,6 +526,7 @@ func TestLogRecoverer_getFilterBatch(t *testing.T) { } func TestLogRecoverer_FilterFinalizedStates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string logs []logpoller.Log @@ -561,6 +568,7 @@ func TestLogRecoverer_FilterFinalizedStates(t *testing.T) { } func TestLogRecoverer_GetProposalData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range []struct { name string proposal ocr2keepers.CoordinatedBlockProposal @@ -1090,6 +1098,7 @@ func TestLogRecoverer_GetProposalData(t *testing.T) { } func TestLogRecoverer_pending(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string maxPerUpkeep int diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go index 08cfe3d8c66..0e03500813b 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go @@ -16,10 +16,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" automationTypes "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" ) func TestGenerateHMACFn(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string method string @@ -64,6 +66,7 @@ func TestGenerateHMACFn(t *testing.T) { } func TestPacker_DecodeStreamsLookupRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string data []byte @@ -102,6 +105,7 @@ func TestPacker_DecodeStreamsLookupRequest(t *testing.T) { } func TestPacker_UnpackGetUpkeepPrivilegeConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string raw []byte @@ -151,6 +155,7 @@ func TestPacker_UnpackGetUpkeepPrivilegeConfig(t *testing.T) { } func TestPacker_PackGetUpkeepPrivilegeConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string upkeepId *big.Int @@ -191,6 +196,7 @@ func TestPacker_PackGetUpkeepPrivilegeConfig(t *testing.T) { } func TestPacker_UnpackCheckCallbackResult(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string CallbackResp []byte @@ -247,6 +253,7 @@ func TestPacker_UnpackCheckCallbackResult(t *testing.T) { } func TestPacker_PackUserCheckErrorHandler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string errCode encoding.ErrCode @@ -285,6 +292,7 @@ func TestPacker_PackUserCheckErrorHandler(t *testing.T) { } func Test_CalculateRetryConfigFn(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string times int diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go index 594da9691a2..ff34c439918 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams_test.go @@ -31,6 +31,7 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" autov2common "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -120,6 +121,7 @@ func setupStreams(t *testing.T) *streams { } func TestStreams_CheckErrorHandler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") upkeepId := big.NewInt(123456789) blockNumber := uint64(999) tests := []struct { @@ -266,6 +268,7 @@ func TestStreams_CheckErrorHandler(t *testing.T) { } func TestStreams_CheckCallback(t *testing.T) { + tests.BelongsToCISuite(t, "unit") upkeepId := big.NewInt(123456789) bn := uint64(999) bs := []byte{183, 114, 215, 10, 0, 0, 0, 0, 0, 0} @@ -420,6 +423,7 @@ func TestStreams_CheckCallback(t *testing.T) { } func TestStreams_AllowedToUseMercury(t *testing.T) { + tests.BelongsToCISuite(t, "unit") upkeepId, ok := new(big.Int).SetString("71022726777042968814359024671382968091267501884371696415772139504780367423725", 10) assert.True(t, ok, t.Name()) tests := []struct { @@ -605,6 +609,7 @@ func TestStreams_AllowedToUseMercury(t *testing.T) { } func TestStreams_StreamsLookup(t *testing.T) { + tests.BelongsToCISuite(t, "unit") upkeepId, ok := new(big.Int).SetString("71022726777042968814359024671382968091267501884371696415772139504780367423725", 10) var upkeepIdentifier [32]byte copy(upkeepIdentifier[:], upkeepId.Bytes()) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/v02_request_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/v02_request_test.go index e971102afea..7d798d2c197 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/v02_request_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/v02_request_test.go @@ -26,6 +26,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const ( @@ -102,6 +104,7 @@ func setupClient(t *testing.T) *client { func TestV02_SingleFeedRequest(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId := big.NewInt(123456789) tests := []struct { name string @@ -385,6 +388,7 @@ func TestV02_SingleFeedRequest(t *testing.T) { func TestV02_DoMercuryRequestV02(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" tests := []struct { @@ -629,6 +633,7 @@ func TestV02_DoMercuryRequestV02(t *testing.T) { func TestV02_DoMercuryRequestV02_MultipleFeedsSuccess(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -671,6 +676,7 @@ func TestV02_DoMercuryRequestV02_MultipleFeedsSuccess(t *testing.T) { func TestV02_DoMercuryRequestV02_Timeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -726,6 +732,7 @@ func TestV02_DoMercuryRequestV02_Timeout(t *testing.T) { func TestV02_DoMercuryRequestV02_OneFeedSuccessOneFeedPipelineError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -774,6 +781,7 @@ func TestV02_DoMercuryRequestV02_OneFeedSuccessOneFeedPipelineError(t *testing.T func TestV02_DoMercuryRequestV02_OneFeedSuccessOneFeedErrCode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -822,6 +830,7 @@ func TestV02_DoMercuryRequestV02_OneFeedSuccessOneFeedErrCode(t *testing.T) { func TestV02_DoMercuryRequestV02_OneFeedSuccessOneFeedPipelineErrorConvertedError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go index f68fbdc66fd..c5db6f98b40 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go @@ -18,6 +18,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/encoding" @@ -100,6 +101,7 @@ func setupClient(t *testing.T) *client { func TestV03_DoMercuryRequestV03(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) tests := []struct { @@ -181,6 +183,7 @@ func TestV03_DoMercuryRequestV03(t *testing.T) { func TestV03_DoMercuryRequestV03_MultipleFeedsSuccess(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -291,6 +294,7 @@ func TestV03_DoMercuryRequestV03_Timeout(t *testing.T) { func TestV03_DoMercuryRequestV03_OneFeedSuccessOneFeedPipelineError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -348,6 +352,7 @@ func TestV03_DoMercuryRequestV03_OneFeedSuccessOneFeedPipelineError(t *testing.T func TestV03_DoMercuryRequestV03_OneFeedSuccessOneFeedErrCode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" @@ -419,6 +424,7 @@ func TestV03_DoMercuryRequestV03_OneFeedSuccessOneFeedErrCode(t *testing.T) { func TestV03_MultiFeedRequest(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") upkeepId := big.NewInt(123456789) tests := []struct { name string diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/payload_builder_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/payload_builder_test.go index d5837488ff4..81c45baa642 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/payload_builder_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/payload_builder_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" @@ -18,6 +19,7 @@ import ( ) func TestNewPayloadBuilder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range []struct { name string activeList ActiveUpkeepList diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go index ac3b2a73203..85f36e426df 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline_test.go @@ -21,6 +21,7 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ac "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/streams_lookup_compatible_interface" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -34,6 +35,7 @@ import ( ) func TestRegistry_GetBlockAndUpkeepId(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := &EvmRegistry{} tests := []struct { name string @@ -79,6 +81,7 @@ func TestRegistry_GetBlockAndUpkeepId(t *testing.T) { } func TestRegistry_VerifyCheckBlock(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) upkeepId := ocr2keepers.UpkeepIdentifier{} upkeepId.FromBigInt(big.NewInt(12345)) @@ -226,6 +229,7 @@ func (p *mockLogPoller) IndexedLogs(ctx context.Context, eventSig common.Hash, a } func TestRegistry_VerifyLogExists(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) upkeepId := ocr2keepers.UpkeepIdentifier{} upkeepId.FromBigInt(big.NewInt(12345)) @@ -376,6 +380,7 @@ func TestRegistry_VerifyLogExists(t *testing.T) { } func TestRegistry_CheckUpkeeps(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) uid0 := core.GenUpkeepID(autotypes.UpkeepType(0), "p0") uid1 := core.GenUpkeepID(autotypes.UpkeepType(1), "p1") @@ -537,6 +542,7 @@ func TestRegistry_CheckUpkeeps(t *testing.T) { } func TestRegistry_SimulatePerformUpkeeps(t *testing.T) { + tests.BelongsToCISuite(t, "unit") uid0 := core.GenUpkeepID(autotypes.UpkeepType(0), "p0") uid1 := core.GenUpkeepID(autotypes.UpkeepType(1), "p1") uid2 := core.GenUpkeepID(autotypes.UpkeepType(1), "p2") diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go index 8867ed7dbf1..2e09eb7a701 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_test.go @@ -23,6 +23,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated" ac "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/automation_compatible_utils" autov2common "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/i_automation_v21_plus_common" @@ -34,6 +35,7 @@ import ( ) func TestMercuryConfig_RemoveTrailingSlash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string URL string @@ -77,6 +79,7 @@ func TestMercuryConfig_RemoveTrailingSlash(t *testing.T) { } func TestPollLogs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { Name string LastPoll int64 @@ -245,6 +248,7 @@ func TestPollLogs(t *testing.T) { } func TestRegistry_refreshLogTriggerUpkeeps(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tc := range []struct { name string ids []*big.Int diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/cache_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/cache_test.go index 687dbfdbfec..7ccd8a542d8 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/cache_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/cache_test.go @@ -6,9 +6,11 @@ import ( "github.com/stretchr/testify/require" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTransmitEventCache_Sanity(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string cap int64 diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go index f08f6a44edf..671592b6517 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/encoding_test.go @@ -9,12 +9,14 @@ import ( "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ac "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) func TestTransmitEventLog(t *testing.T) { + tests.BelongsToCISuite(t, "unit") uid := core.GenUpkeepID(types.ConditionTrigger, "111") tests := []struct { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go index fb25ad2dda2..8494345238b 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/transmit/event_provider_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ac "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink-evm/pkg/client" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -24,6 +25,7 @@ import ( ) func TestTransmitEventProvider_Sanity(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lp := new(mocks.LogPoller) @@ -101,6 +103,7 @@ func TestTransmitEventProvider_Sanity(t *testing.T) { } func TestTransmitEventProvider_ProcessLogs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lp := new(mocks.LogPoller) lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) client := clienttest.NewClient(t) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeep_provider_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeep_provider_test.go index dbe47967740..63684be24c8 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeep_provider_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeep_provider_test.go @@ -11,12 +11,14 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core" ) func TestUpkeepProvider_GetActiveUpkeeps(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) var lp logpoller.LogPoller diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/orm_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/orm_test.go index ea494bd517d..25595826c54 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/orm_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/orm_test.go @@ -8,12 +8,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) func TestInsertSelectDelete(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) chainID := testutils.FixtureChainID db := pgtest.NewSqlxDB(t) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go index 05b5d1d13aa..c52d61fbc91 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go @@ -64,6 +64,7 @@ import ( ) func TestFilterNamesFromSpec21(t *testing.T) { + tests.BelongsToCISuite(t, "unit") b := make([]byte, 20) _, err := crand.Read(b) require.NoError(t, err) @@ -90,6 +91,7 @@ func TestFilterNamesFromSpec21(t *testing.T) { } func TestIntegration_KeeperPluginConditionalUpkeep(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) lggr := logger.TestLogger(t) @@ -402,6 +404,7 @@ func TestIntegration_KeeperPluginLogUpkeep_Retry(t *testing.T) { } func TestIntegration_KeeperPluginLogUpkeep_ErrHandler(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) // setup blockchain diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_test.go index 3a3711dd18b..f8aa92a7c05 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_test.go @@ -465,6 +465,7 @@ func setupForwarderForNode( } func TestIntegration_KeeperPluginForwarderEnabled(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) lggr := logger.TestLogger(t) @@ -709,6 +710,7 @@ func TestIntegration_KeeperPluginForwarderEnabled(t *testing.T) { func ptr[T any](v T) *T { return &v } func TestFilterNamesFromSpec20(t *testing.T) { + tests.BelongsToCISuite(t, "unit") b := make([]byte, 20) _, err := rand.Read(b) require.NoError(t, err) diff --git a/core/services/ocr2/plugins/promwrapper/plugin_test.go b/core/services/ocr2/plugins/promwrapper/plugin_test.go index 371c03e78df..e3ac9d89409 100644 --- a/core/services/ocr2/plugins/promwrapper/plugin_test.go +++ b/core/services/ocr2/plugins/promwrapper/plugin_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/promwrapper/mocks" ) @@ -66,6 +67,8 @@ func (fakeReportingPlugin) Close() error { var _ types.ReportingPlugin = &fakeReportingPlugin{} func TestPlugin_MustInstantiate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Ensure instantiation without panic for no override backend. var reportingPlugin = &fakeReportingPlugin{} promPlugin := New(reportingPlugin, "test", "EVM", big.NewInt(1), types.ReportingPluginConfig{}, nil) @@ -78,6 +81,7 @@ func TestPlugin_MustInstantiate(t *testing.T) { } func TestPlugin_GetLatencies(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // Use arbitrary report timestamp and label values. configDigest := common.BytesToHash(crypto.Keccak256([]byte("foobar"))) reportTimestamp := types.ReportTimestamp{ diff --git a/core/services/ocr2/plugins/s4/factory_test.go b/core/services/ocr2/plugins/s4/factory_test.go index 856caa99692..68f0066a3b7 100644 --- a/core/services/ocr2/plugins/s4/factory_test.go +++ b/core/services/ocr2/plugins/s4/factory_test.go @@ -13,10 +13,13 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestS4ReportingPluginFactory_NewReportingPlugin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) orm := s4_mocks.NewORM(t) diff --git a/core/services/ocr2/plugins/s4/integration_test.go b/core/services/ocr2/plugins/s4/integration_test.go index 47ed51b690d..00cda5b7b05 100644 --- a/core/services/ocr2/plugins/s4/integration_test.go +++ b/core/services/ocr2/plugins/s4/integration_test.go @@ -26,6 +26,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // Disclaimer: this is not a true integration test, it's more of a S4 feature test, on purpose. @@ -154,6 +156,7 @@ func checkNoUnconfirmedRows(ctx context.Context, t *testing.T, orm s4_svc.ORM, l } func TestS4Integration_HappyDON(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") don := newDON(t, 4, createPluginConfig(100)) ctx := testutils.Context(t) diff --git a/core/services/ocr2/plugins/threshold/decryption_queue_test.go b/core/services/ocr2/plugins/threshold/decryption_queue_test.go index afa2f2b706b..52967156859 100644 --- a/core/services/ocr2/plugins/threshold/decryption_queue_test.go +++ b/core/services/ocr2/plugins/threshold/decryption_queue_test.go @@ -14,10 +14,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func Test_decryptionQueue_NewThresholdDecryptor(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(5, 1001, 64, 1002, lggr) @@ -27,6 +29,7 @@ func Test_decryptionQueue_NewThresholdDecryptor(t *testing.T) { } func Test_decryptionQueue_Decrypt_ReturnResultAfterCallingDecrypt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(5, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -45,6 +48,7 @@ func Test_decryptionQueue_Decrypt_ReturnResultAfterCallingDecrypt(t *testing.T) } func Test_decryptionQueue_Decrypt_CiphertextIdTooLarge(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 1000, 16, testutils.WaitTimeout(t), lggr) @@ -55,6 +59,7 @@ func Test_decryptionQueue_Decrypt_CiphertextIdTooLarge(t *testing.T) { } func Test_decryptionQueue_Decrypt_EmptyCiphertextId(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -65,6 +70,7 @@ func Test_decryptionQueue_Decrypt_EmptyCiphertextId(t *testing.T) { } func Test_decryptionQueue_Decrypt_CiphertextTooLarge(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 10, 64, testutils.WaitTimeout(t), lggr) @@ -75,6 +81,7 @@ func Test_decryptionQueue_Decrypt_CiphertextTooLarge(t *testing.T) { } func Test_decryptionQueue_Decrypt_EmptyCiphertext(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -85,6 +92,7 @@ func Test_decryptionQueue_Decrypt_EmptyCiphertext(t *testing.T) { } func Test_decryptionQueue_Decrypt_DuplicateCiphertextId(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -102,6 +110,7 @@ func Test_decryptionQueue_Decrypt_DuplicateCiphertextId(t *testing.T) { } func Test_decryptionQueue_Decrypt_ContextCancelled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 1000, 64, 100, lggr) @@ -113,6 +122,7 @@ func Test_decryptionQueue_Decrypt_ContextCancelled(t *testing.T) { } func Test_decryptionQueue_Decrypt_QueueFull(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(1, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -134,6 +144,7 @@ func Test_decryptionQueue_Decrypt_QueueFull(t *testing.T) { } func Test_decryptionQueue_GetRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(3, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -169,6 +180,7 @@ func Test_decryptionQueue_GetRequests(t *testing.T) { } func Test_decryptionQueue_GetCiphertext(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(3, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -189,6 +201,7 @@ func Test_decryptionQueue_GetCiphertext(t *testing.T) { } func Test_decryptionQueue_GetCiphertext_CiphertextNotFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(3, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -197,6 +210,7 @@ func Test_decryptionQueue_GetCiphertext_CiphertextNotFound(t *testing.T) { } func Test_decryptionQueue_Decrypt_DecryptCalledAfterReadyResult(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(2, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -212,6 +226,7 @@ func Test_decryptionQueue_Decrypt_DecryptCalledAfterReadyResult(t *testing.T) { } func Test_decryptionQueue_ReadyResult_ExpireRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(2, 1000, 64, 100, lggr) @@ -227,6 +242,7 @@ func Test_decryptionQueue_ReadyResult_ExpireRequest(t *testing.T) { } func Test_decryptionQueue_Decrypt_CleanupSuccessfulRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(2, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -246,6 +262,7 @@ func Test_decryptionQueue_Decrypt_CleanupSuccessfulRequest(t *testing.T) { } func Test_decryptionQueue_Decrypt_UserErrorDuringDecryption(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(5, 1000, 64, testutils.WaitTimeout(t), lggr) ciphertextId := []byte{0x12, 0x0f} @@ -262,6 +279,7 @@ func Test_decryptionQueue_Decrypt_UserErrorDuringDecryption(t *testing.T) { } func Test_decryptionQueue_Decrypt_HandleClosedChannelWithoutPlaintextResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(5, 1000, 64, testutils.WaitTimeout(t), lggr) ciphertextId := []byte{0x00, 0xff} @@ -278,6 +296,7 @@ func Test_decryptionQueue_Decrypt_HandleClosedChannelWithoutPlaintextResponse(t } func Test_decryptionQueue_GetRequests_RequestsCountLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(4, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -322,6 +341,7 @@ func Test_decryptionQueue_GetRequests_RequestsCountLimit(t *testing.T) { } func Test_decryptionQueue_GetRequests_TotalBytesLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(4, 10, 64, testutils.WaitTimeout(t), lggr) @@ -366,6 +386,7 @@ func Test_decryptionQueue_GetRequests_TotalBytesLimit(t *testing.T) { } func Test_decryptionQueue_GetRequests_PendingRequestQueueShorterThanRequestCountLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(4, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -388,6 +409,7 @@ func Test_decryptionQueue_GetRequests_PendingRequestQueueShorterThanRequestCount } func Test_decryptionQueue_GetRequests_ExpiredRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(4, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -410,6 +432,7 @@ func Test_decryptionQueue_GetRequests_ExpiredRequest(t *testing.T) { } func Test_decryptionQueue_Start(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(4, 1000, 64, testutils.WaitTimeout(t), lggr) @@ -421,6 +444,7 @@ func Test_decryptionQueue_Start(t *testing.T) { } func Test_decryptionQueue_Close(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) dq := NewDecryptionQueue(4, 1000, 64, testutils.WaitTimeout(t), lggr) diff --git a/core/services/ocr2/plugins/vault/disk_monitor_test.go b/core/services/ocr2/plugins/vault/disk_monitor_test.go index 31a84b6c9e8..f6ea4a19737 100644 --- a/core/services/ocr2/plugins/vault/disk_monitor_test.go +++ b/core/services/ocr2/plugins/vault/disk_monitor_test.go @@ -9,6 +9,7 @@ import ( "go.opentelemetry.io/otel/metric" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -21,6 +22,7 @@ func (m *mockGauge) Record(ctx context.Context, value int64, options ...metric.R } func TestDiskMonitor_emitDirSizeMetric(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) dm := &DiskMonitor{ @@ -38,6 +40,7 @@ func TestDiskMonitor_emitDirSizeMetric(t *testing.T) { } func TestDiskMonitor_emitDirSizeMetric_error(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) dm := &DiskMonitor{ diff --git a/core/services/ocr2/plugins/vault/kvstore_test.go b/core/services/ocr2/plugins/vault/kvstore_test.go index 15be9aa0dbd..b7eb227df4d 100644 --- a/core/services/ocr2/plugins/vault/kvstore_test.go +++ b/core/services/ocr2/plugins/vault/kvstore_test.go @@ -10,6 +10,7 @@ import ( "google.golang.org/protobuf/proto" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/actions/vault" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type response struct { @@ -41,6 +42,7 @@ func (k *kv) Write(key []byte, data []byte) error { var _ (ocr3_1types.KeyValueReadWriter) = (*kv)(nil) func TestKVStore_Secrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kv := &kv{ m: make(map[string]response), } @@ -94,6 +96,7 @@ func TestKVStore_Secrets(t *testing.T) { } func TestKVStore_DeleteSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kv := &kv{ m: make(map[string]response), } @@ -119,6 +122,7 @@ func TestKVStore_DeleteSecrets(t *testing.T) { } func TestKVStore_Metadata(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := "owner" kv := &kv{ m: make(map[string]response), @@ -188,6 +192,7 @@ func TestKVStore_Metadata(t *testing.T) { } func TestKVStore_Metadata_Delete(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := "owner" kv := &kv{ m: make(map[string]response), @@ -225,6 +230,7 @@ func TestKVStore_Metadata_Delete(t *testing.T) { } func TestKVStore_InconsistentWrites(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kv := &kv{ m: make(map[string]response), } diff --git a/core/services/ocr2/plugins/vault/orm_test.go b/core/services/ocr2/plugins/vault/orm_test.go index 35891da5a6b..4055c88357a 100644 --- a/core/services/ocr2/plugins/vault/orm_test.go +++ b/core/services/ocr2/plugins/vault/orm_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/smdkg/dkgocr/dkgocrtypes" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) @@ -58,6 +59,7 @@ func createTestInstanceID() dkgocrtypes.InstanceID { func TestORM_WriteAndReadResultPackage(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -84,6 +86,7 @@ func TestORM_WriteAndReadResultPackage(t *testing.T) { func TestORM_ReadResultPackage_NotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -96,6 +99,7 @@ func TestORM_ReadResultPackage_NotFound(t *testing.T) { func TestORM_WriteResultPackage_Upsert(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm := setupORM(t) @@ -140,6 +144,7 @@ func TestORM_WriteResultPackage_Upsert(t *testing.T) { func TestORM_WriteResultPackage_MultipleSignatures(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -170,6 +175,7 @@ func TestORM_WriteResultPackage_MultipleSignatures(t *testing.T) { func TestORM_WriteResultPackage_DifferentInstanceIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm := setupORM(t) @@ -205,6 +211,7 @@ func TestORM_WriteResultPackage_DifferentInstanceIDs(t *testing.T) { func TestORM_WriteResultPackage_TimestampsUpdated(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm := setupORM(t) @@ -241,6 +248,7 @@ func TestORM_WriteResultPackage_TimestampsUpdated(t *testing.T) { func TestORM_ConfigDigestHandling(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -269,6 +277,7 @@ func TestORM_ConfigDigestHandling(t *testing.T) { func TestORM_WriteResultPackage_ValidationErrors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) diff --git a/core/services/ocr2/plugins/vault/plugin_test.go b/core/services/ocr2/plugins/vault/plugin_test.go index 862d5e96973..3420856063f 100644 --- a/core/services/ocr2/plugins/vault/plugin_test.go +++ b/core/services/ocr2/plugins/vault/plugin_test.go @@ -28,6 +28,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/settings" "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" vaultcap "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaultutils" @@ -69,6 +70,7 @@ func assertLimit[N limits.Number](t *testing.T, expected int, limiter limits.Bou } func TestPlugin_ReportingPluginFactory_UsesDefaultsIfNotProvidedInOffchainConfig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() diff --git a/core/services/ocr2/validate/validate_test.go b/core/services/ocr2/validate/validate_test.go index 1356e0db628..bfc752e5096 100644 --- a/core/services/ocr2/validate/validate_test.go +++ b/core/services/ocr2/validate/validate_test.go @@ -13,6 +13,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" @@ -22,6 +23,7 @@ import ( ) func TestValidateOracleSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string @@ -612,6 +614,7 @@ type envelope struct { } func TestOCR2GenericPluginConfig_Unmarshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") payload := ` [pluginConfig] pluginName = "median" @@ -651,6 +654,7 @@ type envelope2 struct { } func TestOCR2OnchainSigningStrategy_Unmarshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") payload := ` [onchainSigningStrategy] strategyName = "single-chain" diff --git a/core/services/ocr3/promwrapper/factory_test.go b/core/services/ocr3/promwrapper/factory_test.go index 2aaa389c201..f2a29345dea 100644 --- a/core/services/ocr3/promwrapper/factory_test.go +++ b/core/services/ocr3/promwrapper/factory_test.go @@ -9,10 +9,12 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func Test_WrapperFactory(t *testing.T) { + tests.BelongsToCISuite(t, "unit") validFactory := NewReportingPluginFactory( fakeFactory[uint]{}, logger.TestLogger(t), diff --git a/core/services/ocr3/promwrapper/plugin_test.go b/core/services/ocr3/promwrapper/plugin_test.go index ac6aae037ac..8cadc1403f7 100644 --- a/core/services/ocr3/promwrapper/plugin_test.go +++ b/core/services/ocr3/promwrapper/plugin_test.go @@ -12,9 +12,12 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_ReportsGeneratedGauge(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pluginObservationSize := 5 pluginOutcomeSize := 3 @@ -118,6 +121,7 @@ func Test_ReportsGeneratedGauge(t *testing.T) { } func Test_DurationHistograms(t *testing.T) { + tests.BelongsToCISuite(t, "unit") plugin1 := newReportingPlugin( fakePlugin[uint]{}, "evm", "1", "empty", "abc", promOCR3ReportsGenerated, promOCR3Durations, promOCR3Sizes, promOCR3PluginStatus, diff --git a/core/services/ocrbootstrap/database_test.go b/core/services/ocrbootstrap/database_test.go index eaad863c88b..53ecf7ae59f 100644 --- a/core/services/ocrbootstrap/database_test.go +++ b/core/services/ocrbootstrap/database_test.go @@ -8,6 +8,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -36,6 +37,7 @@ func setupDB(t *testing.T) *sqlx.DB { } func Test_DB_ReadWriteConfig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") sqlDB := setupDB(t) config := ocrtypes.ContractConfig{ diff --git a/core/services/ocrbootstrap/validate_test.go b/core/services/ocrbootstrap/validate_test.go index fed62fc03a0..960415774e9 100644 --- a/core/services/ocrbootstrap/validate_test.go +++ b/core/services/ocrbootstrap/validate_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestValidateBootstrapSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string diff --git a/core/services/ocrcommon/adapters_test.go b/core/services/ocrcommon/adapters_test.go index af50dc0d810..907682da5ae 100644 --- a/core/services/ocrcommon/adapters_test.go +++ b/core/services/ocrcommon/adapters_test.go @@ -16,6 +16,7 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" @@ -104,6 +105,7 @@ func (f fakeOnchainKeyring) MaxSignatureLength() int { } func TestOCR3OnchainKeyringAdapter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") kr := ocrcommon.NewOCR3OnchainKeyringAdapter(fakeOnchainKeyring{}) _, err := kr.Sign(configDigest, seqNr, rwi) @@ -115,6 +117,7 @@ func TestOCR3OnchainKeyringAdapter(t *testing.T) { } func TestNewOCR3OnchainKeyringMultiChainAdapter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") evmBundle, err := ocr2key.New(chaintype.EVM) require.NoError(t, err) @@ -188,6 +191,7 @@ func newMultichainAdapter(t *testing.T) *ocrcommon.OCR3OnchainKeyringMultiChainA } func TestNewOCR3OnchainKeyringMultiChainAdapter_VerifyFromDifferentNodesPublicKeys(t *testing.T) { + tests.BelongsToCISuite(t, "unit") firstNodeAdapter := newMultichainAdapter(t) secondNodeAdapter := newMultichainAdapter(t) @@ -264,6 +268,7 @@ func (f fakeContractTransmitter) FromAccount(context.Context) (ocrtypes.Account, } func TestContractTransmitter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) ct := ocrcommon.NewOCR3ContractTransmitterAdapter(fakeContractTransmitter{}) diff --git a/core/services/ocrcommon/data_source_test.go b/core/services/ocrcommon/data_source_test.go index ce120bee694..ecd52ab9cdf 100644 --- a/core/services/ocrcommon/data_source_test.go +++ b/core/services/ocrcommon/data_source_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" serializablebig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -34,6 +35,7 @@ var ( ) func Test_InMemoryDataSource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runner := pipelinemocks.NewRunner(t) runner.On("ExecuteRun", mock.Anything, mock.AnythingOfType("pipeline.Spec"), mock.Anything, mock.Anything). Return(&pipeline.Run{}, pipeline.TaskRunResults{ @@ -53,6 +55,7 @@ func Test_InMemoryDataSource(t *testing.T) { } func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { + tests.BelongsToCISuite(t, "unit") changeResultValue := func(runner *pipelinemocks.Runner, value string, returnErr, once bool) { result := pipeline.Result{ Value: value, @@ -145,6 +148,7 @@ func Test_CachedInMemoryDataSourceErrHandling(t *testing.T) { } func Test_InMemoryDataSourceWithProm(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runner := pipelinemocks.NewRunner(t) jsonParseTask := pipeline.JSONParseTask{ @@ -201,6 +205,7 @@ func (ms *mockSaver) Save(r *pipeline.Run) { } func Test_NewDataSourceV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runner := pipelinemocks.NewRunner(t) ms := &mockSaver{} runner.On("ExecuteRun", mock.Anything, mock.AnythingOfType("pipeline.Spec"), mock.Anything, mock.Anything). @@ -222,6 +227,7 @@ func Test_NewDataSourceV2(t *testing.T) { } func Test_NewDataSourceV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runner := pipelinemocks.NewRunner(t) ms := &mockSaver{} runner.On("ExecuteRun", mock.Anything, mock.AnythingOfType("pipeline.Spec"), mock.Anything, mock.Anything). diff --git a/core/services/ocrcommon/discoverer_database_test.go b/core/services/ocrcommon/discoverer_database_test.go index 2448be29d67..3073f283198 100644 --- a/core/services/ocrcommon/discoverer_database_test.go +++ b/core/services/ocrcommon/discoverer_database_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" @@ -16,6 +17,7 @@ import ( ) func Test_DiscovererDatabase(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) localPeerID1 := mustRandomP2PPeerID(t) diff --git a/core/services/ocrcommon/run_saver_test.go b/core/services/ocrcommon/run_saver_test.go index bc051a9a424..8161b3ebd10 100644 --- a/core/services/ocrcommon/run_saver_test.go +++ b/core/services/ocrcommon/run_saver_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks" ) func TestRunSaver(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pipelineRunner := mocks.NewRunner(t) rs := NewResultRunSaver( pipelineRunner, diff --git a/core/services/ocrcommon/telemetry_test.go b/core/services/ocrcommon/telemetry_test.go index a014fb35702..f317cbfbfc1 100644 --- a/core/services/ocrcommon/telemetry_test.go +++ b/core/services/ocrcommon/telemetry_test.go @@ -20,6 +20,7 @@ import ( mercuryv1 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v1" mercuryv2 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v2" mercuryv4 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -99,6 +100,7 @@ var trrs = pipeline.TaskRunResults{ } func TestShouldCollectTelemetry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := job.Job{ OCROracleSpec: &job.OCROracleSpec{CaptureEATelemetry: true}, OCR2OracleSpec: &job.OCR2OracleSpec{CaptureEATelemetry: true}, @@ -119,6 +121,7 @@ func TestShouldCollectTelemetry(t *testing.T) { } func TestGetContract(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := job.Job{ OCROracleSpec: &job.OCROracleSpec{CaptureEATelemetry: true}, OCR2OracleSpec: &job.OCR2OracleSpec{CaptureEATelemetry: true}, @@ -142,6 +145,7 @@ func TestGetContract(t *testing.T) { } func TestGetChainID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := job.Job{ OCROracleSpec: &job.OCROracleSpec{CaptureEATelemetry: true}, OCR2OracleSpec: &job.OCR2OracleSpec{CaptureEATelemetry: true}, @@ -165,6 +169,7 @@ func TestGetChainID(t *testing.T) { } func TestParseEATelemetry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ea, err := parseEATelemetry([]byte(bridgeResponse)) assert.NoError(t, err) assert.Equal(t, "data-source-name", ea.DataSource) @@ -178,6 +183,7 @@ func TestParseEATelemetry(t *testing.T) { } func TestGetJsonParsedValue(t *testing.T) { + tests.BelongsToCISuite(t, "unit") resp := getJsonParsedValue(trrs[0], &trrs) assert.Equal(t, 123456.123456789, *resp) @@ -190,6 +196,7 @@ func TestGetJsonParsedValue(t *testing.T) { } func TestGetJsonParsedValueHexValues(t *testing.T) { + tests.BelongsToCISuite(t, "unit") trrsHexData := pipeline.TaskRunResults{ pipeline.TaskRunResult{ Task: &pipeline.BridgeTask{ @@ -284,6 +291,7 @@ func TestGetJsonParsedValueHexValues(t *testing.T) { } func TestSendEATelemetry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") wg := sync.WaitGroup{} ingressClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(ingressClient) @@ -372,6 +380,7 @@ func TestSendEATelemetry(t *testing.T) { } func TestGetObservation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := job.Job{ OCROracleSpec: &job.OCROracleSpec{CaptureEATelemetry: true}, OCR2OracleSpec: &job.OCR2OracleSpec{CaptureEATelemetry: true}, @@ -397,6 +406,7 @@ func TestGetObservation(t *testing.T) { } func TestCollectAndSend(t *testing.T) { + tests.BelongsToCISuite(t, "unit") wg := sync.WaitGroup{} ingressClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(ingressClient) @@ -575,6 +585,7 @@ var trrsMercuryV4 = pipeline.TaskRunResults{ } func TestGetPricesFromBridgeByTelemetryField(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zap.WarnLevel) // These are intentionally out of order from the "legacy" method which expects order of `benchmark, bid, ask` jsonParseTaskBid := pipeline.JSONParseTask{ @@ -644,6 +655,7 @@ func TestGetPricesFromBridgeByTelemetryField(t *testing.T) { } func TestGetPricesFromBridgeTaskByOrder(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, logs := logger.TestLoggerObserved(t, zap.WarnLevel) benchmarkPrice, bid, ask := getPricesFromBridgeTask(lggr, trrsMercuryV1[0], trrsMercuryV1, 1) @@ -712,6 +724,7 @@ func TestGetPricesFromBridgeTaskByOrder(t *testing.T) { } func TestShouldCollectEnhancedTelemetryMercury(t *testing.T) { + tests.BelongsToCISuite(t, "unit") j := job.Job{ Type: job.Type(pipeline.OffchainReporting2JobType), OCR2OracleSpec: &job.OCR2OracleSpec{ @@ -728,6 +741,7 @@ func TestShouldCollectEnhancedTelemetryMercury(t *testing.T) { } func TestParseBridgeRequestData(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, bridgeRequestData{}, parseBridgeRequestData("", 2)) reqData := `{"data":{"to":"LINK","from":"USD"}}` @@ -817,6 +831,7 @@ func getViewFunctionTaskRunResults() pipeline.TaskRunResults { } func TestCollectMercuryEnhancedTelemetryV1ViewFunction(t *testing.T) { + tests.BelongsToCISuite(t, "unit") wg := sync.WaitGroup{} ingressClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(ingressClient) @@ -904,6 +919,7 @@ func TestCollectMercuryEnhancedTelemetryV1ViewFunction(t *testing.T) { } func TestCollectMercuryEnhancedTelemetryV1(t *testing.T) { + tests.BelongsToCISuite(t, "unit") wg := sync.WaitGroup{} ingressClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(ingressClient) @@ -1021,6 +1037,7 @@ func TestCollectMercuryEnhancedTelemetryV1(t *testing.T) { } func TestCollectMercuryEnhancedTelemetryV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") wg := sync.WaitGroup{} ingressClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(ingressClient) @@ -1137,6 +1154,7 @@ func TestCollectMercuryEnhancedTelemetryV2(t *testing.T) { } func TestCollectMercuryEnhancedTelemetryV4(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ingressClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(ingressClient) monitoringEndpoint := ingressAgent.GenMonitoringEndpoint("test-network", "test-chainID", "0xa", synchronization.EnhancedEAMercury) diff --git a/core/services/p2p/counter_test.go b/core/services/p2p/counter_test.go index 7d11503ccaa..58c16f4aaa8 100644 --- a/core/services/p2p/counter_test.go +++ b/core/services/p2p/counter_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_groupID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") g := &counter{} assert.Equal(t, [32]byte{}, g.Bytes()) g.Inc() diff --git a/core/services/p2p/peer_test.go b/core/services/p2p/peer_test.go index 3914e95ac68..977f799978f 100644 --- a/core/services/p2p/peer_test.go +++ b/core/services/p2p/peer_test.go @@ -13,12 +13,14 @@ import ( "github.com/smartcontractkit/freeport" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/p2p" ) func TestPeer_CleanStartClose(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) port := freeport.GetOne(t) privKey, _ := newKeyPair(t) diff --git a/core/services/p2p/shared_peer_test.go b/core/services/p2p/shared_peer_test.go index 4701db3df40..80a7501d249 100644 --- a/core/services/p2p/shared_peer_test.go +++ b/core/services/p2p/shared_peer_test.go @@ -13,6 +13,7 @@ import ( ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -26,6 +27,7 @@ import ( ) func TestDon2DonSharedPeer_WithRealSingletonPeerWrapper(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) k, err := keyStore.P2P().Create(testutils.Context(t)) diff --git a/core/services/p2p/signer_test.go b/core/services/p2p/signer_test.go index 4c91375c8e7..78d5678bfd9 100644 --- a/core/services/p2p/signer_test.go +++ b/core/services/p2p/signer_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" ) func TestSigner_InitializeAndSign(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keystoreP2P := ksmocks.NewP2P(t) key, err := p2pkey.NewV2() require.NoError(t, err) diff --git a/core/services/p2p/wrapper/wrapper_test.go b/core/services/p2p/wrapper/wrapper_test.go index 53231b48417..b119ff4cec4 100644 --- a/core/services/p2p/wrapper/wrapper_test.go +++ b/core/services/p2p/wrapper/wrapper_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/freeport" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -20,6 +21,7 @@ import ( ) func TestPeerWrapper_CleanStartClose(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) diff --git a/core/services/periodicbackup/backup_test.go b/core/services/periodicbackup/backup_test.go index 6e7f93d1857..b7957a86e47 100644 --- a/core/services/periodicbackup/backup_test.go +++ b/core/services/periodicbackup/backup_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -31,6 +32,7 @@ func must(t testing.TB, s string) *url.URL { } func TestPeriodicBackup_RunBackup(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") backupConfig := newTestConfig(time.Minute, nil, "", config.DatabaseBackupModeFull) periodicBackup := mustNewDatabaseBackup(t, *(must(t, string(env.DatabaseURL.Get()))), os.TempDir(), backupConfig) assert.False(t, periodicBackup.frequencyIsTooSmall()) @@ -50,6 +52,7 @@ func TestPeriodicBackup_RunBackup(t *testing.T) { } func TestPeriodicBackup_RunBackupInLiteMode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") backupConfig := newTestConfig(time.Minute, nil, "", config.DatabaseBackupModeLite) periodicBackup := mustNewDatabaseBackup(t, *(must(t, string(env.DatabaseURL.Get()))), os.TempDir(), backupConfig) assert.False(t, periodicBackup.frequencyIsTooSmall()) @@ -69,6 +72,7 @@ func TestPeriodicBackup_RunBackupInLiteMode(t *testing.T) { } func TestPeriodicBackup_RunBackupWithoutVersion(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") backupConfig := newTestConfig(time.Minute, nil, "", config.DatabaseBackupModeFull) periodicBackup := mustNewDatabaseBackup(t, *(must(t, string(env.DatabaseURL.Get()))), os.TempDir(), backupConfig) assert.False(t, periodicBackup.frequencyIsTooSmall()) @@ -87,6 +91,7 @@ func TestPeriodicBackup_RunBackupWithoutVersion(t *testing.T) { } func TestPeriodicBackup_RunBackupViaAltUrlAndMaskPassword(t *testing.T) { + tests.BelongsToCISuite(t, "unit") altUrl, _ := url.Parse("postgresql://invalid:some-pass@invalid") backupConfig := newTestConfig(time.Minute, altUrl, "", config.DatabaseBackupModeFull) periodicBackup := mustNewDatabaseBackup(t, *(must(t, string(env.DatabaseURL.Get()))), os.TempDir(), backupConfig) @@ -98,12 +103,14 @@ func TestPeriodicBackup_RunBackupViaAltUrlAndMaskPassword(t *testing.T) { } func TestPeriodicBackup_FrequencyTooSmall(t *testing.T) { + tests.BelongsToCISuite(t, "unit") backupConfig := newTestConfig(time.Second, nil, "", config.DatabaseBackupModeFull) periodicBackup := mustNewDatabaseBackup(t, *(must(t, string(env.DatabaseURL.Get()))), os.TempDir(), backupConfig) assert.True(t, periodicBackup.frequencyIsTooSmall()) } func TestPeriodicBackup_AlternativeOutputDir(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") backupDir := filepath.Join(os.TempDir(), "alternative") backupConfig := newTestConfig(time.Second, nil, backupDir, config.DatabaseBackupModeFull) periodicBackup := mustNewDatabaseBackup(t, *(must(t, string(env.DatabaseURL.Get()))), os.TempDir(), backupConfig) diff --git a/core/services/pg/connection_test.go b/core/services/pg/connection_test.go index d21fb109b32..d760eab3a8f 100644 --- a/core/services/pg/connection_test.go +++ b/core/services/pg/connection_test.go @@ -8,6 +8,8 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var _ Getter = &mockGetter{} @@ -26,6 +28,7 @@ func (m *mockGetter) Get(dest any, query string, args ...any) error { } func Test_checkVersion(t *testing.T) { + tests.BelongsToCISuite(t, "unit") if time.Now().Year() > 2027 { t.Fatal("Postgres version numbers only registered until 2028, please update the postgres version check using: https://www.postgresql.org/support/versioning/ then fix this test") } diff --git a/core/services/pg/lease_lock_test.go b/core/services/pg/lease_lock_test.go index 65bbe3b8610..c9e179ac427 100644 --- a/core/services/pg/lease_lock_test.go +++ b/core/services/pg/lease_lock_test.go @@ -11,6 +11,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -24,6 +25,7 @@ func newLeaseLock(t *testing.T, db *sqlx.DB, cfg pg.LeaseLockConfig) pg.LeaseLoc } func Test_LeaseLock(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") cfg, db := heavyweight.FullTestDBNoFixturesV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { t := true c.Database.Lock.Enabled = &t diff --git a/core/services/pg/locked_db_test.go b/core/services/pg/locked_db_test.go index ef5c9cfe45a..305dc46166e 100644 --- a/core/services/pg/locked_db_test.go +++ b/core/services/pg/locked_db_test.go @@ -13,6 +13,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func lease(c *chainlink.Config, s *chainlink.Secrets) { @@ -23,6 +25,7 @@ func lease(c *chainlink.Config, s *chainlink.Secrets) { } func TestLockedDB_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) config := configtest.NewGeneralConfig(t, lease) lggr := logger.TestLogger(t) @@ -38,6 +41,7 @@ func TestLockedDB_HappyPath(t *testing.T) { } func TestLockedDB_ContextCancelled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testutils.SkipShortDB(t) config := configtest.NewGeneralConfig(t, lease) lggr := logger.TestLogger(t) @@ -51,6 +55,7 @@ func TestLockedDB_ContextCancelled(t *testing.T) { } func TestLockedDB_OpenTwice(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) config := configtest.NewGeneralConfig(t, lease) lggr := logger.TestLogger(t) @@ -64,6 +69,7 @@ func TestLockedDB_OpenTwice(t *testing.T) { } func TestLockedDB_TwoInstances(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) config := configtest.NewGeneralConfig(t, lease) lggr := logger.TestLogger(t) @@ -85,6 +91,7 @@ func TestLockedDB_TwoInstances(t *testing.T) { } func TestOpenUnlockedDB(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) ctx := testutils.Context(t) config := configtest.NewGeneralConfig(t, nil) diff --git a/core/services/pipeline/common_eth_test.go b/core/services/pipeline/common_eth_test.go index e34dc8ca035..4dc868cdb1b 100644 --- a/core/services/pipeline/common_eth_test.go +++ b/core/services/pipeline/common_eth_test.go @@ -11,6 +11,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func mustABIType(t *testing.T, ty string) abi.Type { @@ -21,6 +23,7 @@ func mustABIType(t *testing.T, ty string) abi.Type { func Test_convertToETHABIType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") emptyHash := common.Hash{} emptyAddr := common.Address{} @@ -109,6 +112,7 @@ func Test_convertToETHABIType(t *testing.T) { func Test_convertToETHABIType_Errors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") for _, tt := range []struct { val any @@ -127,6 +131,7 @@ func Test_convertToETHABIType_Errors(t *testing.T) { func Test_convertToETHABIBytes_Errors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") for _, tt := range []struct { val any diff --git a/core/services/pipeline/common_test.go b/core/services/pipeline/common_test.go index 94b1d1a2f49..35bab303d74 100644 --- a/core/services/pipeline/common_test.go +++ b/core/services/pipeline/common_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -18,6 +19,7 @@ import ( ) func TestAtrributesAttribute(t *testing.T) { + tests.BelongsToCISuite(t, "unit") a := `ds1 [type=http method=GET tags=<{"attribute1":"value1", "attribute2":42}>];` p, err := pipeline.Parse(a) require.NoError(t, err) @@ -27,6 +29,7 @@ func TestAtrributesAttribute(t *testing.T) { func TestTimeoutAttribute(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") a := `ds1 [type=http method=GET url="https://chain.link/voter_turnout/USA-2020" requestData=<{"hi": "hello"}> timeout="10s"];` p, err := pipeline.Parse(a) @@ -45,6 +48,7 @@ func TestTimeoutAttribute(t *testing.T) { func TestTaskHTTPUnmarshal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") a := `ds1 [type=http allowunrestrictednetworkaccess=true method=GET url="https://chain.link/voter_turnout/USA-2020" requestData=<{"hi": "hello"}> timeout="10s"];` p, err := pipeline.Parse(a) @@ -57,6 +61,7 @@ func TestTaskHTTPUnmarshal(t *testing.T) { func TestTaskAnyUnmarshal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") a := `ds1 [type=any failEarly=true];` p, err := pipeline.Parse(a) @@ -69,6 +74,7 @@ func TestTaskAnyUnmarshal(t *testing.T) { func TestRetryUnmarshal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -116,6 +122,7 @@ func TestRetryUnmarshal(t *testing.T) { func TestUnmarshalTaskFromMap(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("returns error if task is not the right type", func(t *testing.T) { taskMap := any(nil) @@ -184,6 +191,7 @@ func TestUnmarshalTaskFromMap(t *testing.T) { func TestCheckInputs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") emptyPR := []pipeline.Result{} nonEmptyPR := []pipeline.Result{ @@ -225,6 +233,7 @@ func TestCheckInputs(t *testing.T) { func TestTaskRunResult_IsPending(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") trr := &pipeline.TaskRunResult{} assert.True(t, trr.IsPending()) @@ -238,6 +247,7 @@ func TestTaskRunResult_IsPending(t *testing.T) { func TestSelectGasLimit(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") gcfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].GasEstimator.LimitDefault = ptr(uint64(999)) @@ -294,6 +304,7 @@ func TestSelectGasLimit(t *testing.T) { }) } func TestGetNextTaskOf(t *testing.T) { + tests.BelongsToCISuite(t, "unit") trrs := pipeline.TaskRunResults{ { Task: &pipeline.BridgeTask{ @@ -333,6 +344,7 @@ func TestGetNextTaskOf(t *testing.T) { func TestGetDescendantTasks(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("GetDescendantTasks with multiple levels of tasks", func(t *testing.T) { l3T2 := pipeline.AnyTask{ diff --git a/core/services/pipeline/eautils/eautils_test.go b/core/services/pipeline/eautils/eautils_test.go index 80183b80d2b..8844478b514 100644 --- a/core/services/pipeline/eautils/eautils_test.go +++ b/core/services/pipeline/eautils/eautils_test.go @@ -5,9 +5,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBestEffortExtractEAStatus(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string arg []byte diff --git a/core/services/pipeline/getters_test.go b/core/services/pipeline/getters_test.go index 11a8a92c720..329e92f0458 100644 --- a/core/services/pipeline/getters_test.go +++ b/core/services/pipeline/getters_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestGetters_VarExpr(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") vars := createTestVars() @@ -59,6 +61,7 @@ func TestGetters_VarExpr(t *testing.T) { func TestGetters_JSONWithVarExprs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") vars := createTestVars() @@ -117,6 +120,7 @@ func TestGetters_JSONWithVarExprs(t *testing.T) { func TestGetters_Input(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("returns the requested input's Value and Error if they exist", func(t *testing.T) { expectedVal := "bar" @@ -136,6 +140,7 @@ func TestGetters_Input(t *testing.T) { func TestGetters_Inputs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") theErr := errors.New("some issue") @@ -174,6 +179,7 @@ func TestGetters_Inputs(t *testing.T) { func TestGetters_NonemptyString(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("returns any non-empty string", func(t *testing.T) { val, err := pipeline.NonemptyString("foo bar")() @@ -191,6 +197,7 @@ func TestGetters_NonemptyString(t *testing.T) { func TestGetters_ValidDurationInSeconds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("returns duration in seconds", func(t *testing.T) { val, err := pipeline.ValidDurationInSeconds("10s")() @@ -225,6 +232,7 @@ func TestGetters_ValidDurationInSeconds(t *testing.T) { func TestGetters_From(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("no inputs", func(t *testing.T) { getters := pipeline.From() diff --git a/core/services/pipeline/graph_test.go b/core/services/pipeline/graph_test.go index c6248a38e24..9b874a51bc9 100644 --- a/core/services/pipeline/graph_test.go +++ b/core/services/pipeline/graph_test.go @@ -7,11 +7,13 @@ import ( "github.com/stretchr/testify/require" "gonum.org/v1/gonum/graph" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestGraph_Decode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") expected := map[string]map[string]bool{ "ds1": { @@ -119,6 +121,7 @@ func TestGraph_Decode(t *testing.T) { func TestGraph_TasksInDependencyOrder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") p, err := pipeline.Parse(pipeline.DotStr) require.NoError(t, err) @@ -211,6 +214,7 @@ func TestGraph_TasksInDependencyOrder(t *testing.T) { func TestGraph_HasCycles(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, err := pipeline.Parse(pipeline.DotStr) require.NoError(t, err) @@ -226,6 +230,7 @@ func TestGraph_HasCycles(t *testing.T) { func TestGraph_ImplicitDependencies(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := pipeline.NewGraph() err := g.UnmarshalText([]byte(` @@ -252,6 +257,7 @@ func TestGraph_ImplicitDependencies(t *testing.T) { } func TestParse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, s := range []struct { name string pipeline string diff --git a/core/services/pipeline/keypath_test.go b/core/services/pipeline/keypath_test.go index daac61a25ee..b0f5d4f144c 100644 --- a/core/services/pipeline/keypath_test.go +++ b/core/services/pipeline/keypath_test.go @@ -5,11 +5,13 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestKeypath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("can be constructed from a period-delimited string", func(t *testing.T) { kp, err := pipeline.NewKeypathFromString("") diff --git a/core/services/pipeline/models_test.go b/core/services/pipeline/models_test.go index 26c438ea309..e4c10d795f8 100644 --- a/core/services/pipeline/models_test.go +++ b/core/services/pipeline/models_test.go @@ -11,11 +11,13 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestRun_Status(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") assert.False(t, pipeline.RunStatusUnknown.Finished()) assert.False(t, pipeline.RunStatusRunning.Finished()) @@ -74,6 +76,7 @@ func TestRun_Status(t *testing.T) { } func TestRunErrors_ToError(t *testing.T) { + tests.BelongsToCISuite(t, "unit") runErrors := pipeline.RunErrors{} runErrors = append(runErrors, null.NewString("bad thing happened", true)) runErrors = append(runErrors, null.NewString("pretty bad thing happened", true)) @@ -83,6 +86,7 @@ func TestRunErrors_ToError(t *testing.T) { func TestRun_StringOutputs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("invalid outputs", func(t *testing.T) { run := &pipeline.Run{ diff --git a/core/services/pipeline/orm_test.go b/core/services/pipeline/orm_test.go index b720feab977..5f3e409da90 100644 --- a/core/services/pipeline/orm_test.go +++ b/core/services/pipeline/orm_test.go @@ -19,6 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -84,6 +85,7 @@ func setupLiteORM(t *testing.T) (db *sqlx.DB, orm pipeline.ORM, jorm job.ORM) { } func Test_PipelineORM_CreateSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm, _ := setupLiteORM(t) diff --git a/core/services/pipeline/scheduler_test.go b/core/services/pipeline/scheduler_test.go index e81236d50ff..411e4f9b3b7 100644 --- a/core/services/pipeline/scheduler_test.go +++ b/core/services/pipeline/scheduler_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -18,6 +19,8 @@ type event struct { } func TestScheduler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // NOTE: task type does not matter in the test cases, it's just there so it's parsed successfully tests := []struct { name string diff --git a/core/services/pipeline/task.eth_abi_decode_test.go b/core/services/pipeline/task.eth_abi_decode_test.go index a47875a103c..4b3f78d906c 100644 --- a/core/services/pipeline/task.eth_abi_decode_test.go +++ b/core/services/pipeline/task.eth_abi_decode_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -121,6 +122,7 @@ var testsABIDecode = []struct { } func TestETHABIDecodeTask(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range testsABIDecode { t.Run(test.name, func(t *testing.T) { task := ETHABIDecodeTask{ diff --git a/core/services/registrysyncer/local_registry_test.go b/core/services/registrysyncer/local_registry_test.go index 44dcb9cc82f..475bcad4f88 100644 --- a/core/services/registrysyncer/local_registry_test.go +++ b/core/services/registrysyncer/local_registry_test.go @@ -9,9 +9,11 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestLocalRegistry_DONsForCapability(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) getPeerID := func() (types.PeerID, error) { return [32]byte{0: 1}, nil diff --git a/core/services/registrysyncer/monitoring_test.go b/core/services/registrysyncer/monitoring_test.go index 56ca8207af4..9ee05ec6775 100644 --- a/core/services/registrysyncer/monitoring_test.go +++ b/core/services/registrysyncer/monitoring_test.go @@ -6,14 +6,17 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/metrics" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_InitMonitoringResources(t *testing.T) { + tests.BelongsToCISuite(t, "unit") _, err := newSyncerMetricLabeler() require.NoError(t, err) } func Test_SyncerMetricsLabeler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testSyncerMetricLabeler := syncerMetricLabeler{metrics.NewLabeler(), nil, nil} testSyncerMetricLabeler2 := testSyncerMetricLabeler.with("foo", "baz") require.Equal(t, "baz", testSyncerMetricLabeler2.Labels["foo"]) diff --git a/core/services/registrysyncer/orm_test.go b/core/services/registrysyncer/orm_test.go index 5573e58affc..25aeb8ed452 100644 --- a/core/services/registrysyncer/orm_test.go +++ b/core/services/registrysyncer/orm_test.go @@ -19,12 +19,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-protos/cre/go/values" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" ) func TestRegistrySyncerORM_InsertAndRetrieval(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.Test(t) diff --git a/core/services/registrysyncer/v2/monitoring_test.go b/core/services/registrysyncer/v2/monitoring_test.go index b35901a4ba6..af80110ab56 100644 --- a/core/services/registrysyncer/v2/monitoring_test.go +++ b/core/services/registrysyncer/v2/monitoring_test.go @@ -6,14 +6,17 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/metrics" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_InitMonitoringResources(t *testing.T) { + tests.BelongsToCISuite(t, "unit") _, err := newSyncerMetricLabeler() require.NoError(t, err) } func Test_SyncerMetricsLabeler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testSyncerMetricLabeler := syncerMetricLabeler{metrics.NewLabeler(), nil, nil} testSyncerMetricLabeler2 := testSyncerMetricLabeler.with("foo", "baz") require.Equal(t, "baz", testSyncerMetricLabeler2.Labels["foo"]) diff --git a/core/services/registrysyncer/v2/syncer_test.go b/core/services/registrysyncer/v2/syncer_test.go index 5f2a997cc53..e1908b53533 100644 --- a/core/services/registrysyncer/v2/syncer_test.go +++ b/core/services/registrysyncer/v2/syncer_test.go @@ -35,6 +35,7 @@ import ( "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" @@ -164,6 +165,7 @@ func toPeerIDs(ids [][32]byte) []p2ptypes.PeerID { } func TestReader_Integration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -392,6 +394,7 @@ func TestReader_Integration(t *testing.T) { } func TestSyncer_V2_DBIntegration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -559,6 +562,7 @@ func TestSyncer_V2_DBIntegration(t *testing.T) { } func TestSyncer_V2_LocalNode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -674,6 +678,7 @@ func TestSyncer_V2_LocalNode(t *testing.T) { } func TestReader_V2_FamilyOperations(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.TestLogger(t) diff --git a/core/services/relay/evm/ccip_test.go b/core/services/relay/evm/ccip_test.go index 8c0bfe182e1..cc2e7affde4 100644 --- a/core/services/relay/evm/ccip_test.go +++ b/core/services/relay/evm/ccip_test.go @@ -5,9 +5,13 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_CCIPSubjectUUID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // We want the function to be // (1) an actual function (i.e., deterministic) assert.Equal(t, chainToUUID(big.NewInt(1)), chainToUUID(big.NewInt(1))) diff --git a/core/services/relay/evm/config_poller_test.go b/core/services/relay/evm/config_poller_test.go index b3efccd8755..f041f246b01 100644 --- a/core/services/relay/evm/config_poller_test.go +++ b/core/services/relay/evm/config_poller_test.go @@ -39,12 +39,14 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/testutils" evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestConfigPoller(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1757") lggr := logger.Test(t) var ethClient *client.SimulatedBackendClient diff --git a/core/services/relay/evm/functions/config_poller_test.go b/core/services/relay/evm/functions/config_poller_test.go index 8ca1afd6c0b..4d022b5ef96 100644 --- a/core/services/relay/evm/functions/config_poller_test.go +++ b/core/services/relay/evm/functions/config_poller_test.go @@ -30,6 +30,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/testutils" evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" functionsConfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/testhelpers" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" @@ -38,6 +39,7 @@ import ( ) func TestFunctionsConfigPoller(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("FunctionsPlugin", func(t *testing.T) { runTest(t, functions.FunctionsPlugin, functions.FunctionsDigestPrefix) }) diff --git a/core/services/relay/evm/functions/logpoller_wrapper_test.go b/core/services/relay/evm/functions/logpoller_wrapper_test.go index 3a305937966..dc89a604451 100644 --- a/core/services/relay/evm/functions/logpoller_wrapper_test.go +++ b/core/services/relay/evm/functions/logpoller_wrapper_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/functions/generated/functions_coordinator" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" evmconfig "github.com/smartcontractkit/chainlink-evm/pkg/config" @@ -87,6 +88,7 @@ func getMockedRequestLog(t *testing.T) logpoller.Log { func TestLogPollerWrapper_SingleSubscriberEmptyEvents(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lp, lpWrapper, client := setUp(t, 100_000) // check only once lp.On("LatestBlock", mock.Anything).Return(logpoller.Block{BlockNumber: int64(100)}, nil) @@ -109,6 +111,7 @@ func TestLogPollerWrapper_SingleSubscriberEmptyEvents(t *testing.T) { func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lp, lpWrapper, client := setUp(t, 100_000) // check only once lp.On("LatestBlock", mock.Anything).Return(logpoller.Block{BlockNumber: int64(100)}, nil) @@ -122,6 +125,7 @@ func TestLogPollerWrapper_ErrorOnZeroAddresses(t *testing.T) { func TestLogPollerWrapper_LatestEvents_ReorgHandling(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lp, lpWrapper, client := setUp(t, 100_000) lp.On("LatestBlock", mock.Anything).Return(logpoller.Block{BlockNumber: int64(100)}, nil) @@ -158,6 +162,7 @@ func TestLogPollerWrapper_LatestEvents_ReorgHandling(t *testing.T) { func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, lpWrapper, _ := setUp(t, 100_000) inputLogs := make([]logpoller.Log, maxLogsToProcess+100) @@ -176,6 +181,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_TruncatesLogs(t *testin func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, lpWrapper, _ := setUp(t, 100_000) inputLogs := []logpoller.Log{getMockedRequestLog(t)} inputLogs[0].Topics = [][]byte{[]byte("invalid topic")} @@ -191,6 +197,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_SkipsInvalidLog(t *test func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetectedEvent(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, lpWrapper, _ := setUp(t, 100_000) mockedRequestLog := getMockedRequestLog(t) inputLogs := []logpoller.Log{mockedRequestLog} @@ -218,6 +225,7 @@ func TestLogPollerWrapper_FilterPreviouslyDetectedEvents_FiltersPreviouslyDetect func TestLogPollerWrapper_UnregisterOldFiltersOnRouteUpgrade(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lp, lpWrapper, _ := setUp(t, 100_000) // check only once wrapper := lpWrapper.(*logPollerWrapper) diff --git a/core/services/relay/evm/mercury/config_digest_test.go b/core/services/relay/evm/mercury/config_digest_test.go index 274717c28ca..28e9e53878f 100644 --- a/core/services/relay/evm/mercury/config_digest_test.go +++ b/core/services/relay/evm/mercury/config_digest_test.go @@ -19,12 +19,14 @@ import ( "github.com/smartcontractkit/wsrpc/credentials" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/llo-feeds/generated/exposed_verifier" ) // Adapted from: https://github.com/smartcontractkit/offchain-reporting/blob/991ebe1462fd56826a1ddfb34287d542acb2baee/lib/offchainreporting2/chains/evmutil/config_digest_test.go func TestConfigCalculationMatches(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key, err := crypto.GenerateKey() require.NoError(t, err, "could not make private key for EOA owner") owner, err := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337)) diff --git a/core/services/relay/evm/mercury/config_poller_test.go b/core/services/relay/evm/mercury/config_poller_test.go index 2296bab6788..9d3e6460acc 100644 --- a/core/services/relay/evm/mercury/config_poller_test.go +++ b/core/services/relay/evm/mercury/config_poller_test.go @@ -15,12 +15,14 @@ import ( "github.com/stretchr/testify/require" "github.com/umbracle/ethgo/abi" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestMercuryConfigPoller(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") feedID := evmutils.NewHash() feedIDBytes := [32]byte(feedID) diff --git a/core/services/relay/evm/mercury/utils/feeds_test.go b/core/services/relay/evm/mercury/utils/feeds_test.go index d6db7a4a8c4..72dcb91943e 100644 --- a/core/services/relay/evm/mercury/utils/feeds_test.go +++ b/core/services/relay/evm/mercury/utils/feeds_test.go @@ -4,6 +4,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var ( @@ -16,6 +18,7 @@ var ( ) func Test_FeedID_Version(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("versioned feed ID", func(t *testing.T) { assert.Equal(t, REPORT_V1, v1FeedID.Version()) assert.True(t, v1FeedID.IsV1()) diff --git a/core/services/relay/evm/mercury/v2/data_source_test.go b/core/services/relay/evm/mercury/v2/data_source_test.go index ea4eb587499..d06c70d801a 100644 --- a/core/services/relay/evm/mercury/v2/data_source_test.go +++ b/core/services/relay/evm/mercury/v2/data_source_test.go @@ -15,6 +15,7 @@ import ( v2 "github.com/smartcontractkit/chainlink-data-streams/mercury/v2" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" mercurymocks "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/mocks" @@ -73,6 +74,7 @@ func (ms *mockSaver) Save(r *pipeline.Run) { } func Test_Datasource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") orm := &mockORM{} jb := job.Job{ Type: job.Type(pipeline.OffchainReporting2JobType), diff --git a/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go index e1bb07a236b..c87d7eaad3d 100644 --- a/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go +++ b/core/services/relay/evm/mercury/v2/reportcodec/report_codec_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" v2 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" ) @@ -25,6 +26,7 @@ func newValidReportFields() v2.ReportFields { } func Test_ReportCodec_BuildReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("BuildReport errors on zero values", func(t *testing.T) { @@ -119,6 +121,7 @@ func buildSampleReport(ts int64) []byte { } func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("ObservationTimestampFromReport extracts observation timestamp from a valid report", func(t *testing.T) { @@ -142,6 +145,7 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) { } func Test_ReportCodec_BenchmarkPriceFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("BenchmarkPriceFromReport extracts the benchmark price from valid report", func(t *testing.T) { diff --git a/core/services/relay/evm/mercury/v3/data_source_test.go b/core/services/relay/evm/mercury/v3/data_source_test.go index 604e706cfc4..88c2a4aefe7 100644 --- a/core/services/relay/evm/mercury/v3/data_source_test.go +++ b/core/services/relay/evm/mercury/v3/data_source_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" mercurytypes "github.com/smartcontractkit/chainlink-common/pkg/types/mercury" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -76,6 +77,7 @@ func (ms *mockSaver) Save(r *pipeline.Run) { } func Test_Datasource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") orm := &mockORM{} jb := job.Job{ Type: job.Type(pipeline.OffchainReporting2JobType), diff --git a/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go index 39592c49ae9..246b7139a47 100644 --- a/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go +++ b/core/services/relay/evm/mercury/v3/reportcodec/report_codec_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" v3 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" ) @@ -27,6 +28,7 @@ func newValidReportFields() v3.ReportFields { } func Test_ReportCodec_BuildReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("BuildReport errors on zero values", func(t *testing.T) { @@ -125,6 +127,7 @@ func buildSampleReport(ts int64) []byte { } func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("ObservationTimestampFromReport extracts observation timestamp from a valid report", func(t *testing.T) { @@ -148,6 +151,7 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) { } func Test_ReportCodec_BenchmarkPriceFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("BenchmarkPriceFromReport extracts the benchmark price from valid report", func(t *testing.T) { diff --git a/core/services/relay/evm/mercury/v4/data_source_test.go b/core/services/relay/evm/mercury/v4/data_source_test.go index 57b788402df..b3cf0eed174 100644 --- a/core/services/relay/evm/mercury/v4/data_source_test.go +++ b/core/services/relay/evm/mercury/v4/data_source_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" mercurytypes "github.com/smartcontractkit/chainlink-common/pkg/types/mercury" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" relaymercuryv4 "github.com/smartcontractkit/chainlink-data-streams/mercury/v4" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -72,6 +73,7 @@ func (ms *mockSaver) Save(r *pipeline.Run) { } func Test_Datasource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") orm := &mockORM{} jb := job.Job{ Type: job.Type(pipeline.OffchainReporting2JobType), diff --git a/core/services/relay/evm/mercury/v4/reportcodec/report_codec_test.go b/core/services/relay/evm/mercury/v4/reportcodec/report_codec_test.go index 2caa4f4d75a..ae57da2c51d 100644 --- a/core/services/relay/evm/mercury/v4/reportcodec/report_codec_test.go +++ b/core/services/relay/evm/mercury/v4/reportcodec/report_codec_test.go @@ -10,6 +10,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" v4 "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func newValidReportFields() v4.ReportFields { @@ -25,6 +26,7 @@ func newValidReportFields() v4.ReportFields { } func Test_ReportCodec_BuildReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("BuildReport errors on zero values", func(t *testing.T) { @@ -121,6 +123,7 @@ func buildSampleReport(ts int64) []byte { } func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("ObservationTimestampFromReport extracts observation timestamp from a valid report", func(t *testing.T) { @@ -144,6 +147,7 @@ func Test_ReportCodec_ObservationTimestampFromReport(t *testing.T) { } func Test_ReportCodec_BenchmarkPriceFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := ReportCodec{} t.Run("BenchmarkPriceFromReport extracts the benchmark price from valid report", func(t *testing.T) { diff --git a/core/services/relay/evm/mercury/verifier/verifier_test.go b/core/services/relay/evm/mercury/verifier/verifier_test.go index f32e2e702f3..a79ec4529a2 100644 --- a/core/services/relay/evm/mercury/verifier/verifier_test.go +++ b/core/services/relay/evm/mercury/verifier/verifier_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury" ) func Test_Verifier(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") signedReportBinary := hexutil.MustDecode(`0x0006e1dde86b8a12add45546a14ea7e5efd10b67a373c6f4c41ecfa17d0005350000000000000000000000000000000000000000000000000000000000000201000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002800001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000034c9214519c942ad0aa84a3dd31870e6efe8b3fcab4e176c5226879b26c77000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000669150aa0000000000000000000000000000000000001504e1e6c380271bb8b129ac8f7c0000000000000000000000000000000000001504e1e6c380271bb8b129ac8f7c00000000000000000000000000000000000000000000000000000000669150ab0000000000000000000000000000000000000000000000000000002482116240000000000000000000000000000000000000000000000000000000247625a04000000000000000000000000000000000000000000000000000000024880743400000000000000000000000000000000000000000000000000000000000000002710ac21df88ab70c8822b68be53d7bed65c82ffc9204c1d7ccf3c6c4048b3ca2cafb26e7bbd8f13fe626c946baa5ffcb444319c4229b945ea65d0c99c21978a100000000000000000000000000000000000000000000000000000000000000022c07843f17aa3ecd55f52e99e889906f825f49e4ddfa9c74ca487dd4ff101cc636108a5323be838e658dffa1be67bd91e99f68c4bf86936b76c5d8193b707597`) m := make(map[string]any) diff --git a/core/services/relay/evm/mercury/wsrpc/cache/cache_set_test.go b/core/services/relay/evm/mercury/wsrpc/cache/cache_set_test.go index c7eac22261a..1237caaf959 100644 --- a/core/services/relay/evm/mercury/wsrpc/cache/cache_set_test.go +++ b/core/services/relay/evm/mercury/wsrpc/cache/cache_set_test.go @@ -9,10 +9,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" ) func Test_CacheSet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) cs := newCacheSet(lggr, Config{LatestReportTTL: 1}) disabledCs := newCacheSet(lggr, Config{LatestReportTTL: 0}) diff --git a/core/services/relay/evm/mercury/wsrpc/cache/cache_test.go b/core/services/relay/evm/mercury/wsrpc/cache/cache_test.go index 83d43795ae4..5da2ca0d896 100644 --- a/core/services/relay/evm/mercury/wsrpc/cache/cache_test.go +++ b/core/services/relay/evm/mercury/wsrpc/cache/cache_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" mercuryutils "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" @@ -20,6 +21,7 @@ import ( const neverExpireTTL = 1000 * time.Hour // some massive value that will never expire during a test func Test_Cache(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) client := &mockClient{} cfg := Config{} diff --git a/core/services/relay/evm/mercury/wsrpc/client_test.go b/core/services/relay/evm/mercury/wsrpc/client_test.go index 482a990ad93..411771ea0ff 100644 --- a/core/services/relay/evm/mercury/wsrpc/client_test.go +++ b/core/services/relay/evm/mercury/wsrpc/client_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/cache" @@ -58,6 +59,7 @@ func newNoopCacheSet() cache.CacheSet { } func Test_Client_Transmit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) req := &pb.TransmitRequest{} @@ -128,6 +130,7 @@ func Test_Client_Transmit(t *testing.T) { } func Test_Client_LatestReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) ctx := testutils.Context(t) cacheReads := 5 diff --git a/core/services/relay/evm/mercury/wsrpc/pool_test.go b/core/services/relay/evm/mercury/wsrpc/pool_test.go index fe50c96d190..50095e684f9 100644 --- a/core/services/relay/evm/mercury/wsrpc/pool_test.go +++ b/core/services/relay/evm/mercury/wsrpc/pool_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" @@ -50,6 +51,7 @@ func newMockClient(lggr logger.Logger) *mockClient { } func Test_Pool(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Sugared(logger.Test(t)).Named("PoolTestLogger") ctx := testutils.Context(t) diff --git a/core/services/relay/evm/read/batch_caller_test.go b/core/services/relay/evm/read/batch_caller_test.go index 4b9c6ba6d88..64251d9465b 100644 --- a/core/services/relay/evm/read/batch_caller_test.go +++ b/core/services/relay/evm/read/batch_caller_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/codec" "github.com/smartcontractkit/chainlink-evm/pkg/config" @@ -22,6 +23,7 @@ import ( ) func TestDefaultEvmBatchCaller_BatchCallDynamicLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string maxBatchSize uint @@ -105,6 +107,7 @@ func TestDefaultEvmBatchCaller_BatchCallDynamicLimit(t *testing.T) { } func TestDefaultEvmBatchCaller_batchCallLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) testCases := []struct { numCalls uint diff --git a/core/services/relay/evm/read/bindings_test.go b/core/services/relay/evm/read/bindings_test.go index d78784d1082..0c366135f96 100644 --- a/core/services/relay/evm/read/bindings_test.go +++ b/core/services/relay/evm/read/bindings_test.go @@ -11,6 +11,7 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/read" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/read/mocks" @@ -29,6 +30,7 @@ var ( func TestBindingsRegistry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("readers are addable, bindable, and retrievable", func(t *testing.T) { t.Parallel() diff --git a/core/services/relay/evm/read/event_test.go b/core/services/relay/evm/read/event_test.go index 5681d355b4d..2ec4f38426a 100644 --- a/core/services/relay/evm/read/event_test.go +++ b/core/services/relay/evm/read/event_test.go @@ -15,11 +15,13 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp" "github.com/smartcontractkit/chainlink-ccip/pkg/chainaccessor" "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" ) func Test_DecodeHardcodedType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("decode hardcoded type offramp CoommitReportAccess success", func(t *testing.T) { fixtLog := getFixtureOfframpLog() diff --git a/core/services/relay/evm/read/multieventtype_test.go b/core/services/relay/evm/read/multieventtype_test.go index 447eab010e3..a9879fa8204 100644 --- a/core/services/relay/evm/read/multieventtype_test.go +++ b/core/services/relay/evm/read/multieventtype_test.go @@ -8,9 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestCreateQueryName(t *testing.T) { + tests.BelongsToCISuite(t, "unit") eventQueries := []EventQuery{ { Filter: query.KeyFilter{Key: "key1"}, @@ -51,6 +53,7 @@ func TestCreateQueryName(t *testing.T) { } func TestValidateEventQueries(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string eventQueries []EventQuery diff --git a/core/services/s4/address_range_test.go b/core/services/s4/address_range_test.go index 6ed9c36c476..556058f907c 100644 --- a/core/services/s4/address_range_test.go +++ b/core/services/s4/address_range_test.go @@ -7,10 +7,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestAddressRange_NewFullAddressRange(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") full := s4.NewFullAddressRange() assert.Equal(t, s4.MinAddress, full.MinAddress) @@ -25,6 +28,7 @@ func TestAddressRange_NewFullAddressRange(t *testing.T) { func TestAddressRange_NewSingleAddressRange(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") addr := big.NewI(0x123) sar, err := s4.NewSingleAddressRange(addr) @@ -40,6 +44,7 @@ func TestAddressRange_NewSingleAddressRange(t *testing.T) { func TestAddressRange_NewInitialAddressRangeForIntervals(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("invalid intervals", func(t *testing.T) { _, err := s4.NewInitialAddressRangeForIntervals(0) @@ -89,6 +94,7 @@ func TestAddressRange_NewInitialAddressRangeForIntervals(t *testing.T) { func TestAddressRange_Contains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") r, err := s4.NewInitialAddressRangeForIntervals(256) assert.NoError(t, err) diff --git a/core/services/s4/cached_orm_wrapper_test.go b/core/services/s4/cached_orm_wrapper_test.go index 918dd18be61..937c8f6b778 100644 --- a/core/services/s4/cached_orm_wrapper_test.go +++ b/core/services/s4/cached_orm_wrapper_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -21,6 +22,7 @@ import ( ) func TestGetSnapshotEmpty(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("OK-no_rows", func(t *testing.T) { ctx := testutils.Context(t) psqlORM := setupORM(t, "test") diff --git a/core/services/signatures/ethdss/ethdss_test.go b/core/services/signatures/ethdss/ethdss_test.go index 59e1b084896..4cc0f02539a 100644 --- a/core/services/signatures/ethdss/ethdss_test.go +++ b/core/services/signatures/ethdss/ethdss_test.go @@ -14,6 +14,8 @@ import ( "go.dedis.ch/kyber/v3" dkg "go.dedis.ch/kyber/v3/share/dkg/rabin" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var suite = secp256k1.NewBlakeKeccackSecp256k1() @@ -51,6 +53,7 @@ func init() { } func TestDSSNew(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dssArgs := DSSArgs{secret: partSec[0], participants: partPubs, long: longterms[0], random: randoms[0], msg: msg, T: 4} dss, err := NewDSS(dssArgs) @@ -63,6 +66,7 @@ func TestDSSNew(t *testing.T) { } func TestDSSPartialSigs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dss0 := getDSS(0) dss1 := getDSS(1) ps0, err := dss0.PartialSig() @@ -148,6 +152,7 @@ func printTest(t *testing.T, msg *big.Int, public kyber.Point, } func TestDSSSignature(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dsss := make([]*DSS, nbParticipants) pss := make([]*PartialSig, nbParticipants) for i := range nbParticipants { @@ -179,6 +184,7 @@ func TestDSSSignature(t *testing.T) { } func TestPartialSig_Hash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") observedHashes := make(map[*big.Int]bool) for i := range nbParticipants { psig, err := getDSS(i).PartialSig() diff --git a/core/services/signatures/ethschnorr/ethschnorr_test.go b/core/services/signatures/ethschnorr/ethschnorr_test.go index 3d3bce3b7e6..771a862c8a6 100644 --- a/core/services/signatures/ethschnorr/ethschnorr_test.go +++ b/core/services/signatures/ethschnorr/ethschnorr_test.go @@ -14,6 +14,7 @@ import ( "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/group/curve25519" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/cryptotest" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" ) @@ -36,6 +37,7 @@ func printTest(t *testing.T, msg *big.Int, private kyber.Scalar, } func TestShortSchnorr_SignAndVerify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") if printTests { t.Log("tests = [\n") } @@ -95,11 +97,13 @@ func TestShortSchnorr_SignAndVerify(t *testing.T) { } func TestShortSchnorr_NewSignature(t *testing.T) { + tests.BelongsToCISuite(t, "unit") s := NewSignature() require.Equal(t, s.Signature, big.NewInt(0)) } func TestShortSchnorr_ChallengeHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") point := secp256k1Group.Point() var hash [20]byte h, err := ChallengeHash(point, hash, big.NewInt(-1)) diff --git a/core/services/signatures/secp256k1/curve_test.go b/core/services/signatures/secp256k1/curve_test.go index 325bae20d41..4dddfd5f584 100644 --- a/core/services/signatures/secp256k1/curve_test.go +++ b/core/services/signatures/secp256k1/curve_test.go @@ -4,15 +4,19 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var group = &Secp256k1{} func TestSecp256k1_String(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, "Secp256k1", group.String()) } func TestSecp256k1_Constructors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, 32, group.ScalarLen()) require.Equal(t, ToInt(group.Scalar()), bigZero) require.Equal(t, 33, group.PointLen()) diff --git a/core/services/signatures/secp256k1/field_test.go b/core/services/signatures/secp256k1/field_test.go index 70c4f15d2fe..9da07f2c634 100644 --- a/core/services/signatures/secp256k1/field_test.go +++ b/core/services/signatures/secp256k1/field_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/cryptotest" ) @@ -30,6 +31,7 @@ func observedFieldElt(t *testing.T, s *fieldElt) { var randomStream = cryptotest.NewStream(&testing.T{}, 0) func TestField_SetIntAndEqual(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []int64{5, 67108864, 67108865, 4294967295} g := newFieldZero() for _, test := range tests { @@ -46,16 +48,19 @@ func TestField_SetIntAndEqual(t *testing.T) { } func TestField_String(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, "fieldElt{0}", fieldZero.String()) } func TestField_Equal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.True(t, (*fieldElt)(nil).Equal((*fieldElt)(nil))) require.False(t, (*fieldElt)(nil).Equal(fieldZero)) require.False(t, fieldZero.Equal((*fieldElt)(nil))) } func TestField_Set(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := fieldEltFromInt(1) g := newFieldZero() g.Set(f) @@ -65,12 +70,14 @@ func TestField_Set(t *testing.T) { } func TestFieldEltFromInt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.Equal(t, fieldEltFromInt(1), // Also tests fieldElt.modQ fieldEltFromBigInt(new(big.Int).Add(q, big.NewInt(1))), "only one representation of a ℤ/qℤ element should be used") } func TestField_SmokeTestPick(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newFieldZero() f.Pick(randomStream) observedFieldElt(t, f) @@ -79,6 +86,7 @@ func TestField_SmokeTestPick(t *testing.T) { } func TestField_Neg(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newFieldZero() for range numFieldSamples { f.Pick(randomStream) @@ -92,6 +100,7 @@ func TestField_Neg(t *testing.T) { } func TestField_Sub(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newFieldZero() for range numFieldSamples { f.Pick(randomStream) @@ -103,6 +112,7 @@ func TestField_Sub(t *testing.T) { } func TestField_Clone(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := fieldEltFromInt(1) g := f.Clone() h := f.Clone() @@ -112,6 +122,7 @@ func TestField_Clone(t *testing.T) { } func TestField_SetBytesAndBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newFieldZero() g := newFieldZero() for range numFieldSamples { @@ -125,6 +136,7 @@ func TestField_SetBytesAndBytes(t *testing.T) { } func TestField_MaybeSquareRootInField(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newFieldZero() minusOne := fieldEltFromInt(-1) assert.Nil(t, maybeSqrtInField(minusOne), "-1 is not a square, in this field") @@ -153,6 +165,7 @@ func TestField_MaybeSquareRootInField(t *testing.T) { } func TestField_RightHandSide(t *testing.T) { + tests.BelongsToCISuite(t, "unit") assert.Equal(t, rightHandSide(fieldEltFromInt(1)), fieldEltFromInt(8)) assert.Equal(t, rightHandSide(fieldEltFromInt(2)), fieldEltFromInt(15)) } diff --git a/core/services/signatures/secp256k1/point_test.go b/core/services/signatures/secp256k1/point_test.go index b415825d0bd..075ba7dde40 100644 --- a/core/services/signatures/secp256k1/point_test.go +++ b/core/services/signatures/secp256k1/point_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/cryptotest" ) @@ -20,10 +21,12 @@ var numPointSamples = 10 var randomStreamPoint = cryptotest.NewStream(&testing.T{}, 0) func TestPoint_String(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, "Secp256k1{X: fieldElt{0}, Y: fieldElt{0}}", newPoint().String()) } func TestPoint_CloneAndEqual(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newPoint() for range numPointSamples { g := f.Clone() @@ -39,6 +42,7 @@ func TestPoint_CloneAndEqual(t *testing.T) { } func TestPoint_NullAndAdd(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f, g := newPoint(), newPoint() for range numPointSamples { g.Null() @@ -49,6 +53,7 @@ func TestPoint_NullAndAdd(t *testing.T) { } func TestPoint_Set(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := newPoint() base := newPoint().Base() assert.NotEqual(t, p, base, "generator should not be zero") @@ -57,6 +62,7 @@ func TestPoint_Set(t *testing.T) { } func TestPoint_Embed(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := newPoint() for range numPointSamples { data := make([]byte, p.EmbedLen()) @@ -93,6 +99,7 @@ func TestPoint_Embed(t *testing.T) { } func TestPoint_AddSubAndNeg(t *testing.T) { + tests.BelongsToCISuite(t, "unit") zero := newPoint().Null() p := newPoint() for range numPointSamples { @@ -116,6 +123,7 @@ func TestPoint_AddSubAndNeg(t *testing.T) { } func TestPoint_Mul(t *testing.T) { + tests.BelongsToCISuite(t, "unit") zero := newPoint().Null() multiplier := newScalar(bigZero) one := newScalar(big.NewInt(int64(1))) @@ -148,6 +156,7 @@ func TestPoint_Mul(t *testing.T) { } func TestPoint_Marshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := newPoint() for range numPointSamples { p.Pick(randomStreamPoint) @@ -185,6 +194,7 @@ func TestPoint_Marshal(t *testing.T) { } func TestPoint_BaseTakesCopy(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := newPoint().Base() p.Add(p, p) q := newPoint().Base() @@ -193,6 +203,8 @@ func TestPoint_BaseTakesCopy(t *testing.T) { } func TestPoint_EthereumAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Example taken from // https://theethereum.wiki/w/index.php/Accounts,_Addresses,_Public_And_Private_Keys,_And_Tokens pString := "3a1076bf45ab87712ad64ccb3b10217737f7faacbf2872e88fdd9a537d8fe266" @@ -205,23 +217,27 @@ func TestPoint_EthereumAddress(t *testing.T) { } func TestIsSecp256k1Point(t *testing.T) { + tests.BelongsToCISuite(t, "unit") p := curve25519.NewBlakeSHA256Curve25519(false).Point() require.False(t, IsSecp256k1Point(p)) require.True(t, IsSecp256k1Point(newPoint())) } func TestCoordinates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") x, y := Coordinates(newPoint()) require.Equal(t, x, bigZero) require.Equal(t, y, bigZero) } func TestValidPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.False(t, ValidPublicKey(newPoint()), "zero is not a valid key") require.True(t, ValidPublicKey(newPoint().Base())) } func TestGenerate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for !ValidPublicKey(Generate(randomStreamPoint).Public) { } diff --git a/core/services/signatures/secp256k1/public_key_test.go b/core/services/signatures/secp256k1/public_key_test.go index 428aba2e7ad..7335c4e8b5e 100644 --- a/core/services/signatures/secp256k1/public_key_test.go +++ b/core/services/signatures/secp256k1/public_key_test.go @@ -7,9 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValueScanIdentityPointSet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") randomStream := cryptotest.NewStream(t, 0) for range 10 { p := NewBlakeKeccackSecp256k1().Point().Pick(randomStream) @@ -34,6 +37,7 @@ func TestValueScanIdentityPointSet(t *testing.T) { // Tests that PublicKey.Hash gives the same result as the VRFCoordinator's func TestHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pk, err := NewPublicKeyFromHex("0x9dc09a0f898f3b5e8047204e7ce7e44b587920932f08431e29c9bf6923b8450a01") assert.NoError(t, err) assert.Equal(t, "0xc4406d555db624837188b91514a5f47e34d825d935ab887a35c06a3e7c41de69", pk.MustHash().String()) diff --git a/core/services/signatures/secp256k1/scalar_test.go b/core/services/signatures/secp256k1/scalar_test.go index 266db370263..5f7899c8cc4 100644 --- a/core/services/signatures/secp256k1/scalar_test.go +++ b/core/services/signatures/secp256k1/scalar_test.go @@ -12,6 +12,7 @@ import ( "go.dedis.ch/kyber/v3" "go.dedis.ch/kyber/v3/group/curve25519" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/cryptotest" ) @@ -35,6 +36,7 @@ func observedScalar(t *testing.T, s kyber.Scalar) { var randomStreamScalar = cryptotest.NewStream(&testing.T{}, 0) func TestScalar_SetAndEqual(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []int64{5, 67108864, 67108865, 4294967295} g := newScalar(scalarZero) for _, test := range tests { @@ -49,6 +51,7 @@ func TestScalar_SetAndEqual(t *testing.T) { } func TestNewScalar(t *testing.T) { + tests.BelongsToCISuite(t, "unit") one := newScalar(big.NewInt(1)) assert.Equal(t, ToInt(one), ToInt(newScalar(big.NewInt(0).Add(ToInt(one), GroupOrder))), @@ -56,6 +59,7 @@ func TestNewScalar(t *testing.T) { } func TestScalar_SmokeTestPick(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newScalar(scalarZero).Clone() for range numScalarSamples { f.Pick(randomStreamScalar) @@ -66,6 +70,7 @@ func TestScalar_SmokeTestPick(t *testing.T) { } func TestScalar_Neg(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newScalar(scalarZero).Clone() for range numScalarSamples { f.Pick(randomStreamScalar) @@ -77,6 +82,7 @@ func TestScalar_Neg(t *testing.T) { } func TestScalar_Sub(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newScalar(scalarZero).Clone() for range numScalarSamples { f.Pick(randomStreamScalar) @@ -87,6 +93,7 @@ func TestScalar_Sub(t *testing.T) { } func TestScalar_Clone(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newScalar(big.NewInt(1)) g := f.Clone() h := f.Clone() @@ -96,6 +103,7 @@ func TestScalar_Clone(t *testing.T) { } func TestScalar_Marshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newScalar(scalarZero) g := newScalar(scalarZero) for range numFieldSamples { @@ -121,6 +129,7 @@ func TestScalar_Marshal(t *testing.T) { } func TestScalar_MulDivInv(t *testing.T) { + tests.BelongsToCISuite(t, "unit") f := newScalar(scalarZero) g := newScalar(scalarZero) h := newScalar(scalarZero) @@ -145,43 +154,51 @@ func TestScalar_MulDivInv(t *testing.T) { } func TestScalar_AllowVarTime(t *testing.T) { + tests.BelongsToCISuite(t, "unit") defer func() { require.Contains(t, recover(), "not constant-time!") }() newScalar(bigZero).(*secp256k1Scalar).AllowVarTime(false) } func TestScalar_String(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, "scalar{0}", newScalar(bigZero).String()) } func TestScalar_SetInt64(t *testing.T) { + tests.BelongsToCISuite(t, "unit") require.Equal(t, newScalar(bigZero).SetInt64(1), newScalar(big.NewInt(1))) require.True(t, newScalar(big.NewInt(1)).Zero().Equal(newScalar(bigZero))) require.Equal(t, newScalar(bigZero).One(), newScalar(big.NewInt(1))) } func TestScalar_DivPanicsOnZeroDivisor(t *testing.T) { + tests.BelongsToCISuite(t, "unit") defer func() { require.Contains(t, recover(), "divide by zero") }() newScalar(bigZero).Div(newScalar(bigZero).One(), newScalar(bigZero)) } func TestScalar_InvPanicsOnZero(t *testing.T) { + tests.BelongsToCISuite(t, "unit") defer func() { require.Contains(t, recover(), "divide by zero") }() newScalar(bigZero).Inv(newScalar(bigZero)) } func TestScalar_SetBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") u256Cardinality := zero().Lsh(big.NewInt(1), 256) newScalar(bigZero).(*secp256k1Scalar).int().Cmp( zero().Sub(u256Cardinality, GroupOrder)) } func TestScalar_IsSecp256k1Scalar(t *testing.T) { + tests.BelongsToCISuite(t, "unit") c := curve25519.NewBlakeSHA256Curve25519(true) require.False(t, IsSecp256k1Scalar(c.Scalar())) require.True(t, IsSecp256k1Scalar(newScalar(bigZero))) } func TestScalar_IntToScalar(t *testing.T) { + tests.BelongsToCISuite(t, "unit") u256Cardinality := zero().Lsh(big.NewInt(1), 256) IntToScalar(u256Cardinality) require.Equal(t, u256Cardinality, zero().Sub(zero().Lsh(big.NewInt(1), 256), diff --git a/core/services/signatures/secp256k1/suite_test.go b/core/services/signatures/secp256k1/suite_test.go index f9c48999d1a..3205a31ff8b 100644 --- a/core/services/signatures/secp256k1/suite_test.go +++ b/core/services/signatures/secp256k1/suite_test.go @@ -5,9 +5,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestSuite(t *testing.T) { + tests.BelongsToCISuite(t, "unit") s := NewBlakeKeccackSecp256k1() emptyHashAsHex := hex.EncodeToString(s.Hash().Sum(nil)) require.Equal(t, "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", emptyHashAsHex) diff --git a/core/services/standardcapabilities/delegate_test.go b/core/services/standardcapabilities/delegate_test.go index 96d5e2c343a..1dcab5aabff 100644 --- a/core/services/standardcapabilities/delegate_test.go +++ b/core/services/standardcapabilities/delegate_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/standardcapabilities" ) func Test_ValidatedStandardCapabilitiesSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type testCase struct { name string tomlString string diff --git a/core/services/standardcapabilities/standard_capabilities_test.go b/core/services/standardcapabilities/standard_capabilities_test.go index 5ea431b2f72..9c3442deb4e 100644 --- a/core/services/standardcapabilities/standard_capabilities_test.go +++ b/core/services/standardcapabilities/standard_capabilities_test.go @@ -15,12 +15,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/plugins" ) func TestStandardCapabilityStart(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("NOK-not_found_binary_does_not_block", func(t *testing.T) { ctx := t.Context() lggr := logger.TestLogger(t) diff --git a/core/services/streams/delegate_test.go b/core/services/streams/delegate_test.go index 4d14c31b11b..5f5c6ff4a64 100644 --- a/core/services/streams/delegate_test.go +++ b/core/services/streams/delegate_test.go @@ -11,6 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type mockRegistry struct{} @@ -27,6 +29,7 @@ func (m *mockDelegateConfig) MaxSuccessfulRuns() uint64 { return 0 } func (m *mockDelegateConfig) ResultWriteQueueDepth() uint64 { return 0 } func Test_Delegate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) registry := &mockRegistry{} runner := &mockRunner{} @@ -57,6 +60,7 @@ func Test_Delegate(t *testing.T) { } func Test_ValidatedStreamSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string diff --git a/core/services/streams/stream_registry_test.go b/core/services/streams/stream_registry_test.go index e20b29e9262..e393c5f3ad6 100644 --- a/core/services/streams/stream_registry_test.go +++ b/core/services/streams/stream_registry_test.go @@ -10,6 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var _ Pipeline = &mockPipeline{} @@ -31,6 +33,7 @@ func (m *mockPipeline) StreamIDs() []StreamID { } func Test_Registry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) runner := &mockRunner{} diff --git a/core/services/streams/stream_test.go b/core/services/streams/stream_test.go index 48b762d7ca9..be9e2bbd2f8 100644 --- a/core/services/streams/stream_test.go +++ b/core/services/streams/stream_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -57,6 +58,7 @@ func (m *MockTask) TaskMinBackoff() time.Duration { return 0 } func (m *MockTask) TaskMaxBackoff() time.Duration { return 0 } func Test_Stream(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) runner := &mockRunner{} ctx := testutils.Context(t) diff --git a/core/services/synchronization/telemetry_ingress_batch_client_test.go b/core/services/synchronization/telemetry_ingress_batch_client_test.go index c745bb00352..381a5b785cc 100644 --- a/core/services/synchronization/telemetry_ingress_batch_client_test.go +++ b/core/services/synchronization/telemetry_ingress_batch_client_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" @@ -22,6 +23,7 @@ import ( ) func TestTelemetryIngressBatchClient_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "unit") g := gomega.NewWithT(t) // Create mocks diff --git a/core/services/synchronization/telemetry_ingress_batch_worker_test.go b/core/services/synchronization/telemetry_ingress_batch_worker_test.go index 61c2d45953b..3a77a4bb424 100644 --- a/core/services/synchronization/telemetry_ingress_batch_worker_test.go +++ b/core/services/synchronization/telemetry_ingress_batch_worker_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/mocks" ) func TestTelemetryIngressWorker_BuildTelemBatchReq(t *testing.T) { + tests.BelongsToCISuite(t, "unit") telemPayload := synchronization.TelemPayload{ Telemetry: []byte("Mock telemetry"), ContractID: "0xa", diff --git a/core/services/synchronization/telemetry_ingress_client_test.go b/core/services/synchronization/telemetry_ingress_client_test.go index eebc03515a5..6298f5a7b98 100644 --- a/core/services/synchronization/telemetry_ingress_client_test.go +++ b/core/services/synchronization/telemetry_ingress_client_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" ksmocks "github.com/smartcontractkit/chainlink/v2/core/services/keystore/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" @@ -23,6 +24,8 @@ import ( ) func TestTelemetryIngressClient_Send_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Create mocks telemClient := mocks.NewTelemClient(t) diff --git a/core/services/telemetry/chip_ingress_test.go b/core/services/telemetry/chip_ingress_test.go index 807e7805c3f..e8d9ed9cc0a 100644 --- a/core/services/telemetry/chip_ingress_test.go +++ b/core/services/telemetry/chip_ingress_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" ) @@ -23,6 +24,7 @@ func (m *MockEmitter) Emit(ctx context.Context, body []byte, attrKVs ...any) err } func TestNewChipIngressAdapter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Success - Ethereum Mainnet", func(t *testing.T) { mockEmitter := new(MockEmitter) lggr := logger.TestLogger(t) @@ -115,6 +117,7 @@ func TestNewChipIngressAdapter(t *testing.T) { } func TestChipIngressAdapter_SendLog(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("Success - sends to beholder", func(t *testing.T) { mockEmitter := new(MockEmitter) lggr := logger.TestLogger(t) @@ -206,6 +209,7 @@ func TestChipIngressAdapter_SendLog(t *testing.T) { } func TestChipIngressAdapter_ExportedFields(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockEmitter := new(MockEmitter) lggr := logger.TestLogger(t) contractID := "0x1234567890" @@ -240,6 +244,8 @@ func TestChipIngressAdapter_ExportedFields(t *testing.T) { } func TestChipIngressAdapter_InterfaceCompliance(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // This test verifies that ChipIngressAdapter implements commontypes.MonitoringEndpoint mockEmitter := new(MockEmitter) lggr := logger.TestLogger(t) diff --git a/core/services/telemetry/ingress_batch_test.go b/core/services/telemetry/ingress_batch_test.go index 91e6a07ad7f..3025204b753 100644 --- a/core/services/telemetry/ingress_batch_test.go +++ b/core/services/telemetry/ingress_batch_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/telemetry" ) func TestIngressAgentBatch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") telemetryBatchClient := mocks.NewTelemetryService(t) ingressAgentBatch := telemetry.NewIngressAgentWrapper(telemetryBatchClient) monitoringEndpoint := ingressAgentBatch.GenMonitoringEndpoint("test-network", "test-chainID", "0xa", synchronization.OCR) diff --git a/core/services/telemetry/ingress_test.go b/core/services/telemetry/ingress_test.go index 7e83384dc6c..b5b7edb8975 100644 --- a/core/services/telemetry/ingress_test.go +++ b/core/services/telemetry/ingress_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/telemetry" ) func TestIngressAgent(t *testing.T) { + tests.BelongsToCISuite(t, "unit") telemetryClient := mocks.NewTelemetryService(t) ingressAgent := telemetry.NewIngressAgentWrapper(telemetryClient) monitoringEndpoint := ingressAgent.GenMonitoringEndpoint("test-network", "test-chainID", "0xa", synchronization.OCR) diff --git a/core/services/telemetry/manager_test.go b/core/services/telemetry/manager_test.go index 1473fdef867..0f111da11e5 100644 --- a/core/services/telemetry/manager_test.go +++ b/core/services/telemetry/manager_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -38,6 +39,7 @@ func setupMockConfig(t *testing.T, useBatchSend bool, chipIngressEnabled bool) * } func TestManagerAgents(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tic := setupMockConfig(t, true, false) te := mocks.NewTelemetryIngressEndpoint(t) te.On("Network").Return("network-1") @@ -65,6 +67,7 @@ func TestManagerAgents(t *testing.T) { } func TestNewManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type endpointTest struct { network string chainID string @@ -197,6 +200,7 @@ func TestNewManager(t *testing.T) { } func TestCorrectEndpointRouting(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tic := setupMockConfig(t, true, false) tic.On("Endpoints").Return(nil) @@ -285,6 +289,7 @@ func TestCorrectEndpointRouting(t *testing.T) { // add test for current changes in manager func TestManager_ChipIngressClient(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("disabled chip ingress", func(t *testing.T) { tic := setupMockConfig(t, true, false) tic.On("Endpoints").Return(nil) diff --git a/core/services/versioning/orm_test.go b/core/services/versioning/orm_test.go index 94934132ba3..14fd25db835 100644 --- a/core/services/versioning/orm_test.go +++ b/core/services/versioning/orm_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -14,6 +15,7 @@ import ( ) func TestORM_NodeVersion_UpsertNodeVersion(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() db := pgtest.NewSqlxDB(t) diff --git a/core/services/vrf/delegate_test.go b/core/services/vrf/delegate_test.go index 9bb379d16a7..4c747428598 100644 --- a/core/services/vrf/delegate_test.go +++ b/core/services/vrf/delegate_test.go @@ -24,6 +24,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" evmutils "github.com/smartcontractkit/chainlink-evm/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_coordinator_interface" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/log" @@ -194,6 +195,7 @@ func setup(t *testing.T) (vrfUniverse, *v1.Listener, job.Job) { } func TestDelegate_ReorgAttackProtection(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") vuni, listener, jb := setup(t) // Same request has already been fulfilled twice diff --git a/core/services/vrf/proof/proof_response_test.go b/core/services/vrf/proof/proof_response_test.go index 35fc6f8a12c..10372a0b325 100644 --- a/core/services/vrf/proof/proof_response_test.go +++ b/core/services/vrf/proof/proof_response_test.go @@ -12,6 +12,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_verifier_wrapper" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -21,6 +22,7 @@ import ( ) func TestMarshaledProof(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) diff --git a/core/services/vrf/solidity_cross_tests/vrf_consumer_base_test.go b/core/services/vrf/solidity_cross_tests/vrf_consumer_base_test.go index e876d653d71..bb04e1bf20c 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_consumer_base_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_consumer_base_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrftesthelpers" ) func TestConsumerBaseRejectsBadVRFCoordinator(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coordinator := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) keyHash, _ /* jobID */, fee := registerProvingKey(t, coordinator) diff --git a/core/services/vrf/solidity_cross_tests/vrf_coordinator_interface_test.go b/core/services/vrf/solidity_cross_tests/vrf_coordinator_interface_test.go index 47c47af7c9b..f09fa1c70b7 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_coordinator_interface_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_coordinator_interface_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/solidity_cross_tests" ) @@ -40,6 +41,7 @@ var ( ) func TestVRFParseRandomnessRequestLog(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := solidity_cross_tests.RawRandomnessRequestLogToRandomnessRequestLog(&raw) rawLog, err := r.RawData() require.NoError(t, err) diff --git a/core/services/vrf/solidity_cross_tests/vrf_coordinator_solidity_crosscheck_test.go b/core/services/vrf/solidity_cross_tests/vrf_coordinator_solidity_crosscheck_test.go index 32f4f18f491..71305991690 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_coordinator_solidity_crosscheck_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_coordinator_solidity_crosscheck_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey" @@ -20,6 +21,7 @@ import ( const defaultGasLimit uint32 = 500000 func TestRequestIDMatches(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keyHash := common.HexToHash("0x01") key := cltest.MustGenerateRandomKey(t) baseContract := vrftesthelpers.NewVRFCoordinatorUniverse(t, key).RequestIDBase @@ -54,6 +56,7 @@ func registerProvingKey(t *testing.T, coordinator vrftesthelpers.CoordinatorUniv } func TestRegisterProvingKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coord := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) keyHash, jobID, fee := registerProvingKey(t, coord) @@ -77,6 +80,7 @@ func TestRegisterProvingKey(t *testing.T) { } func TestFailToRegisterProvingKeyFromANonOwnerAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coordinator := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) @@ -130,6 +134,7 @@ func requestRandomnessV08(t *testing.T, coordinator vrftesthelpers.CoordinatorUn } func TestRandomnessRequestLog(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coord := vrftesthelpers.NewVRFCoordinatorUniverseWithV08Consumer(t, key) keyHash_, jobID_, fee := registerProvingKey(t, coord) @@ -207,6 +212,7 @@ func fulfillRandomnessRequest(t *testing.T, coordinator vrftesthelpers.Coordinat } func TestFulfillRandomness(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coordinator := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) keyHash, _, fee := registerProvingKey(t, coordinator) @@ -232,6 +238,7 @@ func TestFulfillRandomness(t *testing.T) { } func TestWithdraw(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coordinator := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) keyHash, _, fee := registerProvingKey(t, coordinator) diff --git a/core/services/vrf/solidity_cross_tests/vrf_fulfillment_cost_test.go b/core/services/vrf/solidity_cross_tests/vrf_fulfillment_cost_test.go index 0e12fe668c0..86286bdb035 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_fulfillment_cost_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_fulfillment_cost_test.go @@ -10,11 +10,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // TestMeasureFulfillmentGasCost establishes rough bounds on the cost of // providing a proof to the VRF coordinator. func TestMeasureFulfillmentGasCost(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coordinator := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) keyHash, _, fee := registerProvingKey(t, coordinator) diff --git a/core/services/vrf/solidity_cross_tests/vrf_hash_to_curve_cost_test.go b/core/services/vrf/solidity_cross_tests/vrf_hash_to_curve_cost_test.go index fcf3b574c41..bb499c8cad2 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_hash_to_curve_cost_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_hash_to_curve_cost_test.go @@ -17,6 +17,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_verifier_wrapper" "github.com/smartcontractkit/chainlink-evm/pkg/assets" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -91,6 +92,7 @@ func HashToCurveGasCostBound(numOrdinates uint64) uint64 { } func TestMeasureHashToCurveGasCost(t *testing.T) { + tests.BelongsToCISuite(t, "unit") contract, owner := deployVRFContract(t) numSamples := int64(numSamples()) for i := range numSamples { diff --git a/core/services/vrf/solidity_cross_tests/vrf_randomness_output_cost_test.go b/core/services/vrf/solidity_cross_tests/vrf_randomness_output_cost_test.go index d62e28a49d7..0f380650766 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_randomness_output_cost_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_randomness_output_cost_test.go @@ -9,11 +9,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" ) func TestMeasureRandomValueFromVRFProofGasCost(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(10)) sk := randomScalar(t, r) skNum := secp256k1.ToInt(sk) diff --git a/core/services/vrf/solidity_cross_tests/vrf_request_cost_test.go b/core/services/vrf/solidity_cross_tests/vrf_request_cost_test.go index 5d183358582..3e05be1a674 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_request_cost_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_request_cost_test.go @@ -6,11 +6,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrftesthelpers" ) func TestMeasureRandomnessRequestGasCost(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) coordinator := vrftesthelpers.NewVRFCoordinatorUniverse(t, key) keyHash_, _, fee := registerProvingKey(t, coordinator) diff --git a/core/services/vrf/solidity_cross_tests/vrf_solidity_crosscheck_test.go b/core/services/vrf/solidity_cross_tests/vrf_solidity_crosscheck_test.go index 667a8ce05ea..1444643e4f7 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_solidity_crosscheck_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_solidity_crosscheck_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_verifier_wrapper" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" @@ -69,6 +70,7 @@ func numSamples() int { func TestVRF_CompareProjectiveECAddToVerifier(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(11)) for j := 0; j < numSamples(); j++ { p := randomPoint(t, r) @@ -88,6 +90,7 @@ func TestVRF_CompareProjectiveECAddToVerifier(t *testing.T) { func TestVRF_CompareBigModExpToVerifier(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(0)) for j := 0; j < numSamples(); j++ { base := randomUint256(t, r) @@ -103,6 +106,7 @@ func TestVRF_CompareBigModExpToVerifier(t *testing.T) { func TestVRF_CompareSquareRoot(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(1)) for j := 0; j < numSamples(); j++ { maybeSquare := randomUint256(t, r) // Might not be square; should get same result anyway @@ -124,6 +128,7 @@ func TestVRF_CompareSquareRoot(t *testing.T) { func TestVRF_CompareYSquared(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(2)) for i := 0; i < numSamples(); i++ { x := randomUint256(t, r) @@ -136,6 +141,7 @@ func TestVRF_CompareYSquared(t *testing.T) { func TestVRF_CompareFieldHash(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(3)) msg := make([]byte, 32) for j := 0; j < numSamples(); j++ { @@ -168,6 +174,7 @@ func asPair(p kyber.Point) [2]*big.Int { return pair(secp256k1.Coordinates(p)) } func TestVRF_CompareHashToCurve(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(4)) for i := 0; i < numSamples(); i++ { input := randomUint256(t, r) @@ -219,6 +226,7 @@ func randomScalar(t *testing.T, r *mrand.Rand) kyber.Scalar { func TestVRF_CheckSolidityPointAddition(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(5)) for j := 0; j < numSamples(); j++ { p1 := randomPoint(t, r) @@ -247,6 +255,7 @@ func TestVRF_CheckSolidityPointAddition(t *testing.T) { func TestVRF_CheckSolidityECMulVerify(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(6)) for j := 0; j < numSamples(); j++ { p := randomPoint(t, r) @@ -268,6 +277,7 @@ func TestVRF_CheckSolidityECMulVerify(t *testing.T) { func TestVRF_CheckSolidityVerifyLinearCombinationWithGenerator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(7)) for j := 0; j < numSamples(); j++ { c := randomScalar(t, r) @@ -296,6 +306,7 @@ func TestVRF_CheckSolidityVerifyLinearCombinationWithGenerator(t *testing.T) { func TestVRF_CheckSolidityLinearComination(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(8)) for j := 0; j < numSamples(); j++ { c := randomScalar(t, r) @@ -333,6 +344,7 @@ func TestVRF_CheckSolidityLinearComination(t *testing.T) { func TestVRF_CompareSolidityScalarFromCurvePoints(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(9)) for j := 0; j < numSamples(); j++ { hash, hashPair := randomPointWithPair(t, r) @@ -353,6 +365,7 @@ func TestVRF_CompareSolidityScalarFromCurvePoints(t *testing.T) { func TestVRF_MarshalProof(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(10)) for j := 0; j < numSamples(); j++ { sk := randomScalar(t, r) diff --git a/core/services/vrf/solidity_cross_tests/vrf_v08_solidity_crosscheck_test.go b/core/services/vrf/solidity_cross_tests/vrf_v08_solidity_crosscheck_test.go index 078bba47637..1dad467f04d 100644 --- a/core/services/vrf/solidity_cross_tests/vrf_v08_solidity_crosscheck_test.go +++ b/core/services/vrf/solidity_cross_tests/vrf_v08_solidity_crosscheck_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -38,6 +39,7 @@ func deployVRFV08TestHelper(t *testing.T) *solidity_vrf_v08_verifier_wrapper.VRF } func TestVRFV08_InvalidPointCoordinates(t *testing.T) { + tests.BelongsToCISuite(t, "unit") verifier := deployVRFV08TestHelper(t) // A value outside [0, ..., FIELD_SIZE-1] should fail _, err := verifier.IsOnCurve(nil, @@ -59,6 +61,7 @@ func TestVRFV08_InvalidPointCoordinates(t *testing.T) { func TestVRFV08_CompareProjectiveECAddToVerifier(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(11)) for j := 0; j < numSamples(); j++ { p := randomPoint(t, r) @@ -78,6 +81,7 @@ func TestVRFV08_CompareProjectiveECAddToVerifier(t *testing.T) { func TestVRFV08_CompareBigModExpToVerifier(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(0)) for j := 0; j < numSamples(); j++ { base := randomUint256(t, r) @@ -93,6 +97,7 @@ func TestVRFV08_CompareBigModExpToVerifier(t *testing.T) { func TestVRFV08_CompareSquareRoot(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(1)) for j := 0; j < numSamples(); j++ { maybeSquare := randomUint256(t, r) // Might not be square; should get same result anyway @@ -114,6 +119,7 @@ func TestVRFV08_CompareSquareRoot(t *testing.T) { func TestVRFV08_CompareYSquared(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(2)) for i := 0; i < numSamples(); i++ { x := randomUint256(t, r) @@ -126,6 +132,7 @@ func TestVRFV08_CompareYSquared(t *testing.T) { func TestVRFV08_CompareFieldHash(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(3)) msg := make([]byte, 32) for j := 0; j < numSamples(); j++ { @@ -141,6 +148,7 @@ func TestVRFV08_CompareFieldHash(t *testing.T) { func TestVRFV08_CompareHashToCurve(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(4)) for i := 0; i < numSamples(); i++ { input := randomUint256(t, r) @@ -158,6 +166,7 @@ func TestVRFV08_CompareHashToCurve(t *testing.T) { func TestVRFV08_CheckSolidityPointAddition(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(5)) for j := 0; j < numSamples(); j++ { p1 := randomPoint(t, r) @@ -186,6 +195,7 @@ func TestVRFV08_CheckSolidityPointAddition(t *testing.T) { func TestVRFV08_CheckSolidityECMulVerify(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(6)) for j := 0; j < numSamples(); j++ { p := randomPoint(t, r) @@ -207,6 +217,7 @@ func TestVRFV08_CheckSolidityECMulVerify(t *testing.T) { func TestVRFV08_CheckSolidityVerifyLinearCombinationWithGenerator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(7)) for j := 0; j < numSamples(); j++ { c := randomScalar(t, r) @@ -235,6 +246,7 @@ func TestVRFV08_CheckSolidityVerifyLinearCombinationWithGenerator(t *testing.T) func TestVRFV08_CheckSolidityLinearComination(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(8)) for j := 0; j < numSamples(); j++ { c := randomScalar(t, r) @@ -272,6 +284,7 @@ func TestVRFV08_CheckSolidityLinearComination(t *testing.T) { func TestVRFV08_CompareSolidityScalarFromCurvePoints(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(9)) for j := 0; j < numSamples(); j++ { hash, hashPair := randomPointWithPair(t, r) @@ -292,6 +305,7 @@ func TestVRFV08_CompareSolidityScalarFromCurvePoints(t *testing.T) { func TestVRFV08_MarshalProof(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") r := mrand.New(mrand.NewSource(10)) for j := 0; j < numSamples(); j++ { sk := randomScalar(t, r) diff --git a/core/services/vrf/v1/integration_test.go b/core/services/vrf/v1/integration_test.go index 2c41f9b1650..a8eed7d3895 100644 --- a/core/services/vrf/v1/integration_test.go +++ b/core/services/vrf/v1/integration_test.go @@ -16,6 +16,7 @@ import ( "gopkg.in/guregu/null.v4" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_coordinator_interface" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" @@ -35,6 +36,7 @@ import ( func TestIntegration_VRF_JPV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string eip1559 bool @@ -133,6 +135,7 @@ func TestIntegration_VRF_JPV2(t *testing.T) { func TestIntegration_VRF_WithBHS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].GasEstimator.EIP1559DynamicFees = ptr(true) diff --git a/core/services/vrf/v1/listener_v1_test.go b/core/services/vrf/v1/listener_v1_test.go index ac25a1912fa..1278e51c620 100644 --- a/core/services/vrf/v1/listener_v1_test.go +++ b/core/services/vrf/v1/listener_v1_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/theodesp/go-heaps/pairing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_coordinator_interface" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ) func TestConfirmedLogExtraction(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lsn := Listener{} lsn.Reqs = []request{ { @@ -50,6 +52,7 @@ func TestConfirmedLogExtraction(t *testing.T) { } func TestResponsePruning(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lsn := Listener{} lsn.LatestHead = 10000 lsn.ResponseCount = map[[32]byte]uint64{ diff --git a/core/services/vrf/v2/listener_v2_log_listener_test.go b/core/services/vrf/v2/listener_v2_log_listener_test.go index 03cd2ce0275..7d064f4b04c 100644 --- a/core/services/vrf/v2/listener_v2_log_listener_test.go +++ b/core/services/vrf/v2/listener_v2_log_listener_test.go @@ -31,6 +31,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evmmocks "github.com/smartcontractkit/chainlink/v2/common/chains/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -239,6 +240,8 @@ func TestInitProcessedBlock_NoVRFReqs(t *testing.T) { func TestLogPollerFilterRegistered(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + // Instantiate listener. th := setupVRFLogPollerListenerTH(t) @@ -829,6 +832,7 @@ func SetupGetUnfulfilledTH(t *testing.T) (*listenerV2, *ubig.Big) { func TestGetUnfulfilled_NoVRFReqs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") listener, chainID := SetupGetUnfulfilledTH(t) @@ -858,6 +862,7 @@ func TestGetUnfulfilled_NoVRFReqs(t *testing.T) { func TestGetUnfulfilled_NoUnfulfilledVRFReqs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") listener, chainID := SetupGetUnfulfilledTH(t) @@ -916,6 +921,7 @@ func TestGetUnfulfilled_NoUnfulfilledVRFReqs(t *testing.T) { func TestGetUnfulfilled_OneUnfulfilledVRFReq(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") listener, chainID := SetupGetUnfulfilledTH(t) @@ -957,6 +963,7 @@ func TestGetUnfulfilled_OneUnfulfilledVRFReq(t *testing.T) { func TestGetUnfulfilled_SomeUnfulfilledVRFReq(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") listener, chainID := SetupGetUnfulfilledTH(t) @@ -1004,6 +1011,7 @@ func TestGetUnfulfilled_SomeUnfulfilledVRFReq(t *testing.T) { func TestGetUnfulfilled_UnfulfilledNFulfilledVRFReqs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") listener, chainID := SetupGetUnfulfilledTH(t) diff --git a/core/services/vrf/v2/listener_v2_test.go b/core/services/vrf/v2/listener_v2_test.go index 0e067cbadbf..cd11852e809 100644 --- a/core/services/vrf/v2/listener_v2_test.go +++ b/core/services/vrf/v2/listener_v2_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" clnull "github.com/smartcontractkit/chainlink-common/pkg/utils/null" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/vrf_coordinator_v2" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -253,6 +254,7 @@ func testMaybeSubtractReservedLink(t *testing.T, vrfVersion vrfcommon.Version) { } func TestMaybeSubtractReservedLinkV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testMaybeSubtractReservedLink(t, vrfcommon.V2) } diff --git a/core/services/vrf/vrfcommon/log_dedupe_test.go b/core/services/vrf/vrfcommon/log_dedupe_test.go index f606b95e2a4..079b16407c5 100644 --- a/core/services/vrf/vrfcommon/log_dedupe_test.go +++ b/core/services/vrf/vrfcommon/log_dedupe_test.go @@ -6,9 +6,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestLogDeduper(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string logs []types.Log diff --git a/core/services/vrf/vrfcommon/validate_test.go b/core/services/vrf/vrfcommon/validate_test.go index 5afa182bee1..7f89776bed6 100644 --- a/core/services/vrf/vrfcommon/validate_test.go +++ b/core/services/vrf/vrfcommon/validate_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestValidateVRFJobSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string diff --git a/core/services/webhook/authorizer_test.go b/core/services/webhook/authorizer_test.go index 202791c26c2..3a30704c9eb 100644 --- a/core/services/webhook/authorizer_test.go +++ b/core/services/webhook/authorizer_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -24,6 +25,7 @@ type eiDisabledCfg struct{} func (eiDisabledCfg) ExternalInitiatorsEnabled() bool { return false } func Test_Authorizer(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) borm := bridges.NewORM(db) diff --git a/core/services/workflows/artifacts/orm_test.go b/core/services/workflows/artifacts/orm_test.go index ecba9cad1fc..864a98c39f9 100644 --- a/core/services/workflows/artifacts/orm_test.go +++ b/core/services/workflows/artifacts/orm_test.go @@ -16,9 +16,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestWorkflowArtifactsORM_GetAndUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) diff --git a/core/services/workflows/artifacts/v2/orm_test.go b/core/services/workflows/artifacts/v2/orm_test.go index 9be9309d98a..3f167725d34 100644 --- a/core/services/workflows/artifacts/v2/orm_test.go +++ b/core/services/workflows/artifacts/v2/orm_test.go @@ -11,9 +11,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_UpsertWorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("inserts new spec", func(t *testing.T) { db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) diff --git a/core/services/workflows/cmd/cre/examples/compile_test.go b/core/services/workflows/cmd/cre/examples/compile_test.go index cc1abb934bd..4f7b8f0ffe1 100644 --- a/core/services/workflows/cmd/cre/examples/compile_test.go +++ b/core/services/workflows/cmd/cre/examples/compile_test.go @@ -6,12 +6,14 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/wasmtest" ) const pathPrefix = "core/services/workflows/cmd/cre/examples" func Test_AllExampleWorkflowsCompileToWASM(t *testing.T) { + tests.BelongsToCISuite(t, "unit") paths := []string{ "legacy/data_feeds", "v2/http_read", diff --git a/core/services/workflows/cmd/cre/utils/runner_test.go b/core/services/workflows/cmd/cre/utils/runner_test.go index 37aa21eb08f..aaa4e13c789 100644 --- a/core/services/workflows/cmd/cre/utils/runner_test.go +++ b/core/services/workflows/cmd/cre/utils/runner_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/wasmtest" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -17,6 +18,7 @@ import ( func TestRunner(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("happy path with an empty workflow", func(t *testing.T) { t.Parallel() diff --git a/core/services/workflows/delegate_test.go b/core/services/workflows/delegate_test.go index 0fb1b3d0df8..714009aaf3e 100644 --- a/core/services/workflows/delegate_test.go +++ b/core/services/workflows/delegate_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/workflows" "github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs" @@ -12,6 +13,7 @@ import ( func TestDelegate_JobSpecValidator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string workflowTomlFn func() string diff --git a/core/services/workflows/engine_test.go b/core/services/workflows/engine_test.go index 29fd238baf6..09c41a63e64 100644 --- a/core/services/workflows/engine_test.go +++ b/core/services/workflows/engine_test.go @@ -367,6 +367,7 @@ func (m *mockTriggerCapability) UnregisterTrigger(ctx context.Context, req capab func TestEngine_Metering_ValidBillingClient(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") const meteringSimpleWorkflow = ` triggers: @@ -689,6 +690,7 @@ targets: } func TestEngineWithHardcodedWorkflow(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) beholderTester := tests.Beholder(t) @@ -860,6 +862,7 @@ func (m *mc) UnregisterFromWorkflow(ctx context.Context, request capabilities.Un } func TestEngine_WriteStepHasZeroStepTimeout(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cmd := "core/services/workflows/test/zerotimeout/cmd" ctx := t.Context() @@ -1065,6 +1068,7 @@ func mockTarget(id string) *mockCapability { } func TestEngine_RateLimit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) t.Run("per user rate limit", func(t *testing.T) { ctx := testutils.Context(t) @@ -1353,6 +1357,7 @@ func TestEngine_RateLimit(t *testing.T) { func TestEngine_ErrorsTheWorkflowIfAStepErrors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -1377,6 +1382,7 @@ func TestEngine_ErrorsTheWorkflowIfAStepErrors(t *testing.T) { func TestEngine_GracefulEarlyTermination(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -1467,6 +1473,7 @@ func mockAction(t *testing.T) (*mockCapability, values.Value) { func TestEngine_MultiStepDependencies(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -1554,6 +1561,7 @@ targets: func TestEngine_WrapsTargets(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -1600,6 +1608,7 @@ func TestEngine_WrapsTargets(t *testing.T) { func TestEngine_GetsNodeInfoDuringInitialization(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -1692,6 +1701,7 @@ targets: ` func TestEngine_PassthroughInterpolation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -1740,6 +1750,7 @@ func TestEngine_PassthroughInterpolation(t *testing.T) { } func TestEngine_Error(t *testing.T) { + tests.BelongsToCISuite(t, "unit") err := errors.New("some error") tests := []struct { name string @@ -1807,6 +1818,7 @@ func TestEngine_Error(t *testing.T) { } func TestEngine_MergesWorkflowConfigAndCRConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) writeID = "write_polygon-testnet-mumbai@1.0.0" @@ -1936,6 +1948,7 @@ targets: // TestEngine_MergesWorkflowConfigAndCRConfig_CRConfigPrecedence tests that the engine merges the // workflow config with the CR config correctly, with the CR config taking precedence. func TestEngine_MergesWorkflowConfigAndCRConfig_CRConfigPrecedence(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ctx = testutils.Context(t) actionID = "custom-compute@1.0.0" @@ -2018,6 +2031,7 @@ func TestEngine_MergesWorkflowConfigAndCRConfig_CRConfigPrecedence(t *testing.T) } func TestEngine_HandlesNilConfigOnchain(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -2069,6 +2083,8 @@ func TestEngine_HandlesNilConfigOnchain(t *testing.T) { } func TestEngine_MultiBranchExecution(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // This workflow describes 2 branches in the workflow graph. // A -> B -> C // A -> D -> E @@ -2186,6 +2202,7 @@ func basicTestTrigger(t *testing.T) *mockTriggerCapability { } func TestEngine_WithCustomComputeStep(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cmd := "core/services/workflows/test/wasm/legacy/cmd" ctx := testutils.Context(t) @@ -2261,6 +2278,7 @@ func TestEngine_WithCustomComputeStep(t *testing.T) { } func TestEngine_CustomComputePropagatesBreaks(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cmd := "core/services/workflows/test/break/cmd" ctx := testutils.Context(t) @@ -2381,6 +2399,7 @@ targets: ` func TestEngine_FetchesSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -2446,6 +2465,7 @@ func TestEngine_FetchesSecrets(t *testing.T) { } func TestEngine_CloseHappensOnlyIfWorkflowHasBeenRegistered(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -2496,6 +2516,7 @@ func TestEngine_CloseHappensOnlyIfWorkflowHasBeenRegistered(t *testing.T) { } func TestEngine_CloseUnregisterFails_NotFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -2576,6 +2597,7 @@ func (t mockRuntimeTrigger) UnregisterTrigger(ctx context.Context, request capab } func TestMerge(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string baseConfig map[string]any @@ -2661,6 +2683,7 @@ func TestMerge(t *testing.T) { // Test_stepUpdateManager ensures that the manager is concurrency safe by sending concurrent // requests to send and remove a given execution ID. func Test_stepUpdateManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( wg sync.WaitGroup ctx = testutils.Context(t) @@ -2771,6 +2794,7 @@ func TestEngine_ConcurrentExecutions(t *testing.T) { func TestEngine_WorkflowRegistry_BillingClientCalls(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") const testWorkflow = ` triggers: diff --git a/core/services/workflows/events/emit_test.go b/core/services/workflows/events/emit_test.go index 883572ea748..19b1be0c48f 100644 --- a/core/services/workflows/events/emit_test.go +++ b/core/services/workflows/events/emit_test.go @@ -13,12 +13,15 @@ import ( pb "github.com/smartcontractkit/chainlink-protos/workflows/go/events" eventsv2 "github.com/smartcontractkit/chainlink-protos/workflows/go/v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/platform" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/events" ) func TestEmit(t *testing.T) { // t.Parallel() // TODO: the beholder tester uses t.SetEnv and cannot use t.Parallel + tests.BelongsToCISuite(t, "unit") + triggerID := "trigger_" + uuid.NewString() executionID := "execution_" + uuid.NewString() capabilityID := "capability_" + uuid.NewString() diff --git a/core/services/workflows/internal/retry_test.go b/core/services/workflows/internal/retry_test.go index 223df4d8af7..6219729d3c3 100644 --- a/core/services/workflows/internal/retry_test.go +++ b/core/services/workflows/internal/retry_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestRetryableZeroMaxRetries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) defer cancel() @@ -28,6 +30,7 @@ func TestRetryableZeroMaxRetries(t *testing.T) { func TestRetryableSuccessOnFirstAttempt(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := t.Context() @@ -41,6 +44,7 @@ func TestRetryableSuccessOnFirstAttempt(t *testing.T) { func TestRetryableSuccessAfterRetries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := t.Context() @@ -60,6 +64,7 @@ func TestRetryableSuccessAfterRetries(t *testing.T) { func TestRetryableErrorOnFirstTryNoRetries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := t.Context() @@ -74,6 +79,7 @@ func TestRetryableErrorOnFirstTryNoRetries(t *testing.T) { func TestRetryableErrorAfterMultipleRetries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := t.Context() @@ -92,6 +98,7 @@ func TestRetryableErrorAfterMultipleRetries(t *testing.T) { func TestRetryableCancellationHandling(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx, cancel := context.WithCancel(context.Background()) diff --git a/core/services/workflows/metering/balance_store_test.go b/core/services/workflows/metering/balance_store_test.go index 1551a295288..71e94a224b0 100644 --- a/core/services/workflows/metering/balance_store_test.go +++ b/core/services/workflows/metering/balance_store_test.go @@ -6,10 +6,13 @@ import ( "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBalanceStore(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") one := decimal.NewFromInt(1) two := decimal.NewFromInt(2) diff --git a/core/services/workflows/metering/metering_test.go b/core/services/workflows/metering/metering_test.go index f7736109867..7888a4d57bc 100644 --- a/core/services/workflows/metering/metering_test.go +++ b/core/services/workflows/metering/metering_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/metrics" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" billing "github.com/smartcontractkit/chainlink-protos/billing/go" "github.com/smartcontractkit/chainlink-protos/cre/go/values" eventspb "github.com/smartcontractkit/chainlink-protos/workflows/go/events" @@ -113,6 +114,7 @@ var ( func Test_Report(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("error if incorrect labels", func(t *testing.T) { t.Parallel() @@ -125,6 +127,7 @@ func Test_Report(t *testing.T) { func Test_Report_MeteringMode(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("Reserve switches to metering mode", func(t *testing.T) { t.Parallel() @@ -407,6 +410,7 @@ func Test_Report_MeteringMode(t *testing.T) { func Test_medianSpend(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tt := []struct { name string @@ -471,6 +475,7 @@ func Test_medianSpend(t *testing.T) { func Test_Report_Reserve(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("returns an error if insufficient funding", func(t *testing.T) { t.Parallel() @@ -517,6 +522,7 @@ func Test_Report_Reserve(t *testing.T) { func Test_Report_Deduct(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") one := decimal.NewFromInt(1) two := decimal.NewFromInt(2) @@ -802,6 +808,7 @@ func Test_Report_Deduct(t *testing.T) { func Test_Report_Settle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("returns an error if not initialized", func(t *testing.T) { t.Parallel() @@ -1023,6 +1030,7 @@ func Test_Report_Settle(t *testing.T) { func Test_Report_FormatReport(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("does not contain metadata", func(t *testing.T) { t.Parallel() @@ -1296,6 +1304,7 @@ func Test_Report_FormatReport(t *testing.T) { func Test_Report_SendReceipt(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("returns an error if not initialized", func(t *testing.T) { t.Parallel() @@ -1496,6 +1505,7 @@ func Test_Report_SendReceipt(t *testing.T) { } func Test_Report_EmitReceipt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("happy path", func(t *testing.T) { // No parallel beholderTester := beholdertest.NewObserver(t) @@ -1612,6 +1622,7 @@ func Test_Report_EmitReceipt(t *testing.T) { func Test_MeterReports(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") workflowExecutionID1 := "exec1" capabilityCall1 := "ref1" @@ -1687,6 +1698,7 @@ func Test_MeterReports(t *testing.T) { func Test_MeterReports_Length(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") billingClient := mocks.NewBillingClient(t) @@ -1719,6 +1731,7 @@ func Test_MeterReports_Length(t *testing.T) { func Test_MeterReports_Start(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("can only start report once", func(t *testing.T) { t.Parallel() @@ -1740,6 +1753,7 @@ func Test_MeterReports_Start(t *testing.T) { func Test_MeterReports_Get(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("returns when report exists", func(t *testing.T) { t.Parallel() @@ -1774,6 +1788,7 @@ func Test_MeterReports_Get(t *testing.T) { func Test_MeterReports_End(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("can only end existing report", func(t *testing.T) { t.Parallel() @@ -1836,6 +1851,7 @@ func Test_MeterReports_End(t *testing.T) { func TestRatiosFromConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("happy path", func(t *testing.T) { t.Parallel() diff --git a/core/services/workflows/models_test.go b/core/services/workflows/models_test.go index f7cb25f2edc..787476133b6 100644 --- a/core/services/workflows/models_test.go +++ b/core/services/workflows/models_test.go @@ -8,12 +8,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/workflows" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestParse_Graph(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string yaml string @@ -322,6 +324,7 @@ targets: } func TestParsesIntsCorrectly(t *testing.T) { + tests.BelongsToCISuite(t, "unit") spec, _, _, err := job.YAMLSpecFactory{}.Spec(testutils.Context(t), hardcodedWorkflow, "") require.NoError(t, err) diff --git a/core/services/workflows/monitoring/monitoring_test.go b/core/services/workflows/monitoring/monitoring_test.go index 235b6a10c75..1a43356456a 100644 --- a/core/services/workflows/monitoring/monitoring_test.go +++ b/core/services/workflows/monitoring/monitoring_test.go @@ -6,15 +6,18 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/metrics" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/monitoring" ) func Test_InitMonitoringResources(t *testing.T) { + tests.BelongsToCISuite(t, "unit") _, err := monitoring.InitMonitoringResources() require.NoError(t, err) } func Test_WorkflowMetricsLabeler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testWorkflowsMetricLabeler := monitoring.NewWorkflowsMetricLabeler(metrics.NewLabeler(), &monitoring.EngineMetrics{}) testWorkflowsMetricLabeler2 := testWorkflowsMetricLabeler.With("foo", "baz") require.Equal(t, "baz", testWorkflowsMetricLabeler2.Labels["foo"]) diff --git a/core/services/workflows/ratelimiter/ratelimiter_test.go b/core/services/workflows/ratelimiter/ratelimiter_test.go index 3599a0b7f7e..1fbb0b5f6c4 100644 --- a/core/services/workflows/ratelimiter/ratelimiter_test.go +++ b/core/services/workflows/ratelimiter/ratelimiter_test.go @@ -8,10 +8,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/contexts" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestRateLimiter(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := Config{ GlobalRPS: 3.0, diff --git a/core/services/workflows/store/models_test.go b/core/services/workflows/store/models_test.go index 21a3a50b6b3..6063db7f085 100644 --- a/core/services/workflows/store/models_test.go +++ b/core/services/workflows/store/models_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-protos/cre/go/values" ) func TestWorkflowExecution_DeepCopy(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() inputs, err := values.NewMap(map[string]int{}) require.NoError(t, err) diff --git a/core/services/workflows/store/store_memory_test.go b/core/services/workflows/store/store_memory_test.go index e5a08668599..a6acefaf65a 100644 --- a/core/services/workflows/store/store_memory_test.go +++ b/core/services/workflows/store/store_memory_test.go @@ -10,10 +10,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestInMemoryStore_Add(t *testing.T) { + tests.BelongsToCISuite(t, "unit") store := NewInMemoryStore(logger.TestLogger(t), clockwork.NewFakeClock()) execution, err := store.Add(context.Background(), map[string]*WorkflowExecutionStep{ @@ -34,6 +36,7 @@ func TestInMemoryStore_Add(t *testing.T) { } func TestInMemoryStore_UpsertStep(t *testing.T) { + tests.BelongsToCISuite(t, "unit") fakeClock := clockwork.NewFakeClock() store := NewInMemoryStore(logger.TestLogger(t), fakeClock) @@ -53,6 +56,7 @@ func TestInMemoryStore_UpsertStep(t *testing.T) { } func TestInMemoryStore_Get(t *testing.T) { + tests.BelongsToCISuite(t, "unit") store := NewInMemoryStore(logger.TestLogger(t), clockwork.NewFakeClock()) _, err := store.Add(context.Background(), map[string]*WorkflowExecutionStep{}, "test-id", "w1", StatusStarted) require.NoError(t, err) @@ -65,6 +69,7 @@ func TestInMemoryStore_Get(t *testing.T) { } func TestInMemoryStore_FinishedExecution(t *testing.T) { + tests.BelongsToCISuite(t, "unit") store := NewInMemoryStoreWithPruneConfiguration(logger.TestLogger(t), clockwork.NewRealClock(), 10*time.Millisecond, 1*time.Hour) servicetest.Run(t, store) @@ -87,6 +92,7 @@ func TestInMemoryStore_FinishedExecution(t *testing.T) { } func TestInMemoryStore_ExpiresNonCompletedExecutions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") expirationDuration := 50 * time.Millisecond store := NewInMemoryStoreWithPruneConfiguration(logger.TestLogger(t), clockwork.NewRealClock(), diff --git a/core/services/workflows/syncer/engine_registry_test.go b/core/services/workflows/syncer/engine_registry_test.go index 8dec866d10a..d9f13cf243b 100644 --- a/core/services/workflows/syncer/engine_registry_test.go +++ b/core/services/workflows/syncer/engine_registry_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/types" ) func TestEngineRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var srv services.Service = &fakeService{} const id1 = "foo" @@ -72,6 +74,7 @@ func TestEngineRegistry(t *testing.T) { } func TestEngineRegistry_keyFor(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := []byte("owner") k := EngineRegistryKey{Owner: owner, Name: "name"} assert.Equal(t, k.keyFor(), fmt.Sprintf("%x-name", owner)) diff --git a/core/services/workflows/syncer/fetcher_test.go b/core/services/workflows/syncer/fetcher_test.go index 65ec6330443..daa36948ab4 100644 --- a/core/services/workflows/syncer/fetcher_test.go +++ b/core/services/workflows/syncer/fetcher_test.go @@ -22,6 +22,7 @@ import ( jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/common" @@ -48,6 +49,7 @@ func (w *wrapper) GetGatewayConnector() connector.GatewayConnector { } func TestNewFetcherService(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := context.Background() lggr := logger.TestLogger(t) connector := gcmocks.NewGatewayConnector(t) @@ -298,6 +300,7 @@ func TestNewFetcherService(t *testing.T) { } func TestNewFetcherFunc(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) ctx := context.Background() testContent := []byte("test content") diff --git a/core/services/workflows/syncer/handler_test.go b/core/services/workflows/syncer/handler_test.go index 63714fd346e..2bae201d2ad 100644 --- a/core/services/workflows/syncer/handler_test.go +++ b/core/services/workflows/syncer/handler_test.go @@ -36,6 +36,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type mockFetchResp struct { @@ -118,6 +120,7 @@ func newMockDecrypter() *mockDecrypter { } func Test_Handler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) emitter := custmsg.NewLabeler() wfStore := store.NewInMemoryStore(lggr, clockwork.NewFakeClock()) @@ -315,6 +318,7 @@ const ( ) func Test_workflowRegisteredHandler(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") binaryURL := "http://example.com/binary" secretsURL := "http://example.com/secrets" configURL := "http://example.com/config" diff --git a/core/services/workflows/syncer/v2/engine_registry_test.go b/core/services/workflows/syncer/v2/engine_registry_test.go index d0c37e91d1e..f800f775f7d 100644 --- a/core/services/workflows/syncer/v2/engine_registry_test.go +++ b/core/services/workflows/syncer/v2/engine_registry_test.go @@ -7,10 +7,12 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/types" ) func TestEngineRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") workflowID1 := types.WorkflowID([32]byte{0, 1, 2, 3, 4}) workflowID2 := types.WorkflowID([32]byte{0, 1, 2, 3, 4, 5}) diff --git a/core/services/workflows/syncer/v2/fetcher_test.go b/core/services/workflows/syncer/v2/fetcher_test.go index c4d1c0d6c34..ec626431e25 100644 --- a/core/services/workflows/syncer/v2/fetcher_test.go +++ b/core/services/workflows/syncer/v2/fetcher_test.go @@ -22,6 +22,7 @@ import ( jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" "github.com/smartcontractkit/chainlink-common/pkg/types/gateway" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" storage_service "github.com/smartcontractkit/chainlink-protos/storage-service/go" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/gateway/api" @@ -50,6 +51,7 @@ func (w *wrapper) GetGatewayConnector() connector.GatewayConnector { } func TestNewFetcherService(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := context.Background() lggr := logger.TestLogger(t) storageService := mocks.NewWorkflowClient(t) @@ -347,6 +349,7 @@ func TestNewFetcherService(t *testing.T) { } func TestNewFetcherFunc(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) ctx := context.Background() testContent := []byte("test content") diff --git a/core/services/workflows/syncer/v2/handler_test.go b/core/services/workflows/syncer/v2/handler_test.go index 1ae98f5288f..754581d51c9 100644 --- a/core/services/workflows/syncer/v2/handler_test.go +++ b/core/services/workflows/syncer/v2/handler_test.go @@ -31,6 +31,7 @@ import ( v2 "github.com/smartcontractkit/chainlink/v2/core/services/workflows/v2" "github.com/smartcontractkit/chainlink-common/pkg/services/orgresolver" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -115,6 +116,7 @@ func mockEngineFactory(ctx context.Context, wfid string, owner string, name type } func Test_Handler(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("fails with unsupported event type", func(t *testing.T) { lggr := logger.TestLogger(t) lf := limits.Factory{Logger: lggr} @@ -167,6 +169,7 @@ const ( ) func Test_workflowRegisteredHandler(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") binaryURLFactory := func(wfID string) string { return "http://example.com/" + wfID + "/binary" } diff --git a/core/services/workflows/syncer/versioning/contracts_test.go b/core/services/workflows/syncer/versioning/contracts_test.go index d660288ccee..e7eac768e65 100644 --- a/core/services/workflows/syncer/versioning/contracts_test.go +++ b/core/services/workflows/syncer/versioning/contracts_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/balance_reader" "github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/log_emitter" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/capabilities/testutils" @@ -18,6 +19,7 @@ import ( func TestContracts_TypeAndVersion(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("happy path", func(t *testing.T) { t.Parallel() @@ -97,6 +99,7 @@ func TestContracts_TypeAndVersion(t *testing.T) { func TestContracts_VerifyTypeAndVersion(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("incorrect type", func(t *testing.T) { t.Parallel() @@ -121,6 +124,7 @@ func TestContracts_VerifyTypeAndVersion(t *testing.T) { func TestContracts_ParseTypeAndVersion(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("valid string", func(t *testing.T) { t.Parallel() @@ -150,6 +154,7 @@ func TestContracts_ParseTypeAndVersion(t *testing.T) { func TestContracts_RunWithRetries(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("returns an error if max retries are exceeded", func(t *testing.T) { t.Parallel() diff --git a/core/services/workflows/syncerlimiter/limiter_test.go b/core/services/workflows/syncerlimiter/limiter_test.go index a67871e2f4e..ce39617e90b 100644 --- a/core/services/workflows/syncerlimiter/limiter_test.go +++ b/core/services/workflows/syncerlimiter/limiter_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/contexts" "github.com/smartcontractkit/chainlink-common/pkg/settings" "github.com/smartcontractkit/chainlink-common/pkg/settings/limits" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -22,6 +23,7 @@ var ( func TestWorkflowLimits(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) config := Config{ diff --git a/core/services/workflows/types/workflow_meta_test.go b/core/services/workflows/types/workflow_meta_test.go index 7803fd21030..8af953ba749 100644 --- a/core/services/workflows/types/workflow_meta_test.go +++ b/core/services/workflows/types/workflow_meta_test.go @@ -4,10 +4,13 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestWorkflowName_Validate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, err := NewWorkflowName("") require.Error(t, err) @@ -20,6 +23,7 @@ func TestWorkflowName_Validate(t *testing.T) { func TestWorkflowID_FromHex(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, err := WorkflowIDFromHex("wrong chars") require.Error(t, err) @@ -32,6 +36,7 @@ func TestWorkflowID_FromHex(t *testing.T) { func TestValidateWorkflowOwner(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") require.Error(t, ValidateWorkflowOwner("wrong chars")) require.Error(t, ValidateWorkflowOwner("00112233")) // wrong length require.NoError(t, ValidateWorkflowOwner("aabbccddeeff00112233aabbccddeeff00112233")) diff --git a/core/services/workflows/v2/config_test.go b/core/services/workflows/v2/config_test.go index 2789f0f3ccf..111db981414 100644 --- a/core/services/workflows/v2/config_test.go +++ b/core/services/workflows/v2/config_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/workflows/dontime" modulemocks "github.com/smartcontractkit/chainlink-common/pkg/workflows/wasm/host/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" capmocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/mocks" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/workflowkey" @@ -42,6 +43,7 @@ const ( func TestEngineConfig_Validate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cfg := defaultTestConfig(t, nil) t.Run("nil module", func(t *testing.T) { diff --git a/core/services/workflows/v2/engine_test.go b/core/services/workflows/v2/engine_test.go index b42a2de38f4..72f4dfbf151 100644 --- a/core/services/workflows/v2/engine_test.go +++ b/core/services/workflows/v2/engine_test.go @@ -63,12 +63,15 @@ import ( basicactionmock "github.com/smartcontractkit/cre-sdk-go/internal_testing/capabilities/basicaction/mock" "github.com/smartcontractkit/cre-sdk-go/internal_testing/capabilities/basictrigger" ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const triggerID = "basic-test-trigger@1.0.0" func TestEngine_Init(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) capreg := regmocks.NewCapabilitiesRegistry(t) @@ -100,6 +103,7 @@ func TestEngine_Init(t *testing.T) { func TestEngine_Start_RateLimited(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") sLimiter, err := syncerlimiter.NewWorkflowLimits(logger.Test(t), syncerlimiter.Config{ Global: 2, PerOwner: 1, @@ -166,6 +170,7 @@ func TestEngine_Start_RateLimited(t *testing.T) { func TestEngine_TriggerSubscriptions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -277,6 +282,7 @@ func newTriggerSubs(n int) *sdkpb.ExecutionResult { func TestEngine_OrganizationIdLogger(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -363,6 +369,7 @@ func TestEngine_OrganizationIdLogger(t *testing.T) { func TestEngine_OrganizationIdLogger_OrgResolverFailure(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -477,6 +484,7 @@ func (m *mockOrgResolver) Ready() error { } func TestEngine_Execution(t *testing.T) { + tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-1725") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -588,6 +596,7 @@ func TestEngine_Execution(t *testing.T) { func TestEngine_ExecutionTimeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -675,6 +684,7 @@ func TestEngine_ExecutionTimeout(t *testing.T) { func TestEngine_Metering_ValidBillingClient(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -1075,6 +1085,7 @@ func TestEngine_Metering_ValidBillingClient(t *testing.T) { func TestEngine_CapabilityCallTimeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") module := modulemocks.NewModuleV2(t) module.EXPECT().Start() @@ -1194,6 +1205,7 @@ func TestEngine_CapabilityCallTimeout(t *testing.T) { } func TestEngine_WASMBinary_Simple(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cmd := "core/services/workflows/test/wasm/v2/cmd" log := logger.Test(t) binaryB := wasmtest.CreateTestBinary(cmd, false, t) @@ -1299,6 +1311,7 @@ func TestEngine_WASMBinary_Simple(t *testing.T) { // TODO fix func TestEngine_WASMBinary_With_Config(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cmd := "core/services/workflows/test/wasm/v2/cmd/with_config" binaryB := wasmtest.CreateTestBinary(cmd, false, t) @@ -1394,6 +1407,7 @@ func TestEngine_WASMBinary_With_Config(t *testing.T) { } func TestSecretsFetcher_Integration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cmd := "core/services/workflows/test/wasm/v2/cmd/with_secrets" binaryB := wasmtest.CreateTestBinary(cmd, false, t) @@ -1584,6 +1598,7 @@ func TestSecretsFetcher_Integration(t *testing.T) { func TestEngine_HandleNewDON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("subscribe and update successfully", func(t *testing.T) { module := modulemocks.NewModuleV2(t) @@ -1794,6 +1809,7 @@ func TestEngine_HandleNewDON(t *testing.T) { // 4. Verify that the beholder logger labels are updated to reflect ConfigVersion = 2 func TestEngine_DonVersionLabelUpdate(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() diff --git a/core/services/workflows/v2/secrets_test.go b/core/services/workflows/v2/secrets_test.go index c7f6e354073..f2825d3caf0 100644 --- a/core/services/workflows/v2/secrets_test.go +++ b/core/services/workflows/v2/secrets_test.go @@ -24,6 +24,7 @@ import ( sdkpb "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" "github.com/smartcontractkit/chainlink-protos/cre/go/values" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" coreCap "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/workflowkey" @@ -40,6 +41,7 @@ func MetricsLabelerTest(t *testing.T) *monitoring.WorkflowsMetricLabeler { } func TestSecretsFetcher_BulkFetchesSecretsFromCapability(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) reg := coreCap.NewRegistry(lggr) peer := coreCap.RandomUTF8BytesWord() @@ -214,6 +216,7 @@ func TestSecretsFetcher_BulkFetchesSecretsFromCapability(t *testing.T) { } func TestSecretsFetcher_ReturnsErrorIfCapabilityNoFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) reg := coreCap.NewRegistry(lggr) peer := coreCap.RandomUTF8BytesWord() @@ -249,6 +252,7 @@ func TestSecretsFetcher_ReturnsErrorIfCapabilityNoFound(t *testing.T) { } func TestSecretsFetcher_ReturnsErrorIfCapabilityErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) reg := coreCap.NewRegistry(lggr) peer := coreCap.RandomUTF8BytesWord() @@ -293,6 +297,7 @@ func TestSecretsFetcher_ReturnsErrorIfCapabilityErrors(t *testing.T) { } func TestSecretsFetcher_ReturnsErrorIfNoResponseForRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) reg := coreCap.NewRegistry(lggr) peer := coreCap.RandomUTF8BytesWord() @@ -345,6 +350,7 @@ func TestSecretsFetcher_ReturnsErrorIfNoResponseForRequest(t *testing.T) { } func TestSecretsFetcher_ReturnsErrorIfMissingEncryptionSharesForNode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) reg := coreCap.NewRegistry(lggr) peer := coreCap.RandomUTF8BytesWord() @@ -417,6 +423,7 @@ func TestSecretsFetcher_ReturnsErrorIfMissingEncryptionSharesForNode(t *testing. } func TestSecretsFetcher_ReturnsErrorIfCantCombineShares(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) reg := coreCap.NewRegistry(lggr) peer := coreCap.RandomUTF8BytesWord() diff --git a/core/sessions/ldapauth/ldap_test.go b/core/sessions/ldapauth/ldap_test.go index 928252fbc2b..5182cbdba4a 100644 --- a/core/sessions/ldapauth/ldap_test.go +++ b/core/sessions/ldapauth/ldap_test.go @@ -13,6 +13,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -41,6 +42,7 @@ func setupAuthenticationProvider(t *testing.T, ldapClient ldapauth.LDAPClient) ( func TestORM_FindUser_Empty(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -64,6 +66,7 @@ func TestORM_FindUser_Empty(t *testing.T) { func TestORM_FindUser_NoGroups(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -104,6 +107,7 @@ func TestORM_FindUser_NoGroups(t *testing.T) { func TestORM_FindUser_NotActive(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -144,6 +148,7 @@ func TestORM_FindUser_NotActive(t *testing.T) { func TestORM_FindUser_Single(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -202,6 +207,7 @@ func TestORM_FindUser_Single(t *testing.T) { func TestORM_FindUser_FallbackMatchLocalAdmin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Initilaize LDAP Authentication Provider with mock client @@ -216,6 +222,7 @@ func TestORM_FindUser_FallbackMatchLocalAdmin(t *testing.T) { } func TestORM_FindUserByAPIToken_Success(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Initilaize LDAP Authentication Provider with mock client mockLdapClient := mocks.NewLDAPClient(t) diff --git a/core/sessions/localauth/orm_test.go b/core/sessions/localauth/orm_test.go index bed51ba9a30..ed4589bd33b 100644 --- a/core/sessions/localauth/orm_test.go +++ b/core/sessions/localauth/orm_test.go @@ -13,6 +13,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -35,6 +36,7 @@ func setupORM(t *testing.T) (*sqlx.DB, sessions.AuthenticationProvider) { func TestORM_FindUser(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm := setupORM(t) @@ -54,6 +56,7 @@ func TestORM_FindUser(t *testing.T) { func TestORM_AuthorizedUserWithSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -99,6 +102,7 @@ func TestORM_AuthorizedUserWithSession(t *testing.T) { func TestORM_DeleteUser(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -114,6 +118,7 @@ func TestORM_DeleteUser(t *testing.T) { func TestORM_DeleteUserSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm := setupORM(t) @@ -137,6 +142,7 @@ func TestORM_DeleteUserSession(t *testing.T) { } func TestORM_DeleteUserCascade(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm := setupORM(t) diff --git a/core/sessions/oidcauth/oidc_test.go b/core/sessions/oidcauth/oidc_test.go index c42b4857954..63427b6ea0b 100644 --- a/core/sessions/oidcauth/oidc_test.go +++ b/core/sessions/oidcauth/oidc_test.go @@ -11,6 +11,7 @@ import ( "github.com/jmoiron/sqlx" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -36,6 +37,7 @@ func setupAuthenticationProvider(t *testing.T) (*sqlx.DB, sessions.Authenticatio func TestORM_FindUser_Empty(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Init OIDC authenticator _, oidcAuthProvider := setupAuthenticationProvider(t) @@ -46,6 +48,7 @@ func TestORM_FindUser_Empty(t *testing.T) { func TestORM_FindUser_Single(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Init OIDC authenticator db, oidcAuthProvider := setupAuthenticationProvider(t) @@ -67,6 +70,7 @@ func TestORM_FindUser_Single(t *testing.T) { } func TestORM_FindUserByAPIToken_Success(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Init OIDC authenticator db, oidcAuthProvider := setupAuthenticationProvider(t) diff --git a/core/sessions/user_test.go b/core/sessions/user_test.go index 6805d90d6ce..a3970984139 100644 --- a/core/sessions/user_test.go +++ b/core/sessions/user_test.go @@ -11,10 +11,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNewUser(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { email, pwd string @@ -50,6 +53,7 @@ func TestNewUser(t *testing.T) { } func TestUserGenerateAuthToken(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var user sessions.User token, err := user.GenerateAuthToken() require.NoError(t, err) @@ -58,6 +62,7 @@ func TestUserGenerateAuthToken(t *testing.T) { } func TestAuthenticateUserByToken(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var user sessions.User token, err := user.GenerateAuthToken() diff --git a/core/sessions/webauthn_test.go b/core/sessions/webauthn_test.go index 34797738492..d0fb000ec9d 100644 --- a/core/sessions/webauthn_test.go +++ b/core/sessions/webauthn_test.go @@ -12,10 +12,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestWebAuthnSessionStore(t *testing.T) { + tests.BelongsToCISuite(t, "unit") const key = "test-key" data := webauthn.SessionData{ Challenge: "challenge-string", diff --git a/core/shutdown/shutdown_test.go b/core/shutdown/shutdown_test.go index a712cc0a23f..4c54adf3d63 100644 --- a/core/shutdown/shutdown_test.go +++ b/core/shutdown/shutdown_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestHandleShutdown(t *testing.T) { + tests.BelongsToCISuite(t, "unit") proc, err := os.FindProcess(os.Getpid()) require.NoError(t, err) diff --git a/core/static/static_test.go b/core/static/static_test.go index 24dc6d58e35..1d68a215f8c 100644 --- a/core/static/static_test.go +++ b/core/static/static_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_short(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, tt := range []struct { ver, sha string expVer, expSha string diff --git a/core/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index a41c8672951..5772c6bf94f 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evmcfg "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -69,6 +70,7 @@ func getOCR2Spec100() OffchainReporting2OracleSpec100 { } func TestMigrate_0100_BootstrapConfigs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") cfg, db := heavyweight.FullTestDBEmptyV2(t, nil) lggr := logger.TestLogger(t) p, err := migrate.NewProvider(testutils.Context(t), db.DB) @@ -341,6 +343,7 @@ ON jobs.offchainreporting2_oracle_spec_id = ocr2.id` } func TestMigrate_101_GenericOCR2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, db := heavyweight.FullTestDBEmptyV2(t, nil) ctx := testutils.Context(t) p, err := migrate.NewProvider(ctx, db.DB) @@ -394,6 +397,7 @@ func TestMigrate_101_GenericOCR2(t *testing.T) { } func TestMigrate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, db := heavyweight.FullTestDBEmptyV2(t, nil) @@ -422,6 +426,7 @@ func TestMigrate(t *testing.T) { } func TestSetMigrationENVVars(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("ValidEVMConfig", func(t *testing.T) { chainID := ubig.New(big.NewInt(1337)) testConfig := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -450,6 +455,7 @@ func TestSetMigrationENVVars(t *testing.T) { } func TestNoTriggers(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, db := heavyweight.FullTestDBEmptyV2(t, nil) p, err := migrate.NewProvider(testutils.Context(t), db.DB) require.NoError(t, err) @@ -529,6 +535,7 @@ func BenchmarkBackfillingRecordsWithMigration202(b *testing.B) { } func TestRollback_247_TxStateEnumUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, db := heavyweight.FullTestDBV2(t, nil) p, err := migrate.NewProvider(ctx, db.DB) diff --git a/core/store/models/common_test.go b/core/store/models/common_test.go index bc85a3ee7ec..c677cd9f65a 100644 --- a/core/store/models/common_test.go +++ b/core/store/models/common_test.go @@ -13,10 +13,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestJSON_Merge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -94,6 +97,7 @@ func TestJSON_Merge(t *testing.T) { } func TestJSON_MergeNull(t *testing.T) { + tests.BelongsToCISuite(t, "unit") merged, err := models.Merge(models.JSON{}, models.JSON{}) require.NoError(t, err) assert.Equal(t, `{}`, merged.String()) @@ -101,6 +105,7 @@ func TestJSON_MergeNull(t *testing.T) { func TestJSON_UnmarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -122,6 +127,7 @@ func TestJSON_UnmarshalJSON(t *testing.T) { func TestJSON_ParseJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -145,6 +151,7 @@ func TestJSON_ParseJSON(t *testing.T) { func TestWebURL_UnmarshalJSON_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") j := []byte(`"NotAUrl"`) wurl := &models.WebURL{} err := json.Unmarshal(j, wurl) @@ -153,6 +160,7 @@ func TestWebURL_UnmarshalJSON_Error(t *testing.T) { func TestWebURL_UnmarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") j := []byte(`"http://www.duckduckgo.com"`) wurl := &models.WebURL{} err := json.Unmarshal(j, wurl) @@ -161,6 +169,7 @@ func TestWebURL_UnmarshalJSON(t *testing.T) { func TestWebURL_MarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") str := "http://www.duckduckgo.com" parsed, err := url.ParseRequestURI(str) @@ -173,6 +182,7 @@ func TestWebURL_MarshalJSON(t *testing.T) { func TestWebURL_String_HasURL(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") u, _ := url.Parse("http://www.duckduckgo.com") w := models.WebURL(*u) @@ -182,6 +192,7 @@ func TestWebURL_String_HasURL(t *testing.T) { func TestWebURL_String_HasNilURL(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") w := models.WebURL{} @@ -190,6 +201,7 @@ func TestWebURL_String_HasNilURL(t *testing.T) { func TestCron_UnmarshalJSON_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -209,6 +221,7 @@ func TestCron_UnmarshalJSON_Success(t *testing.T) { func TestCron_UnmarshalJSON_Invalid(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -228,6 +241,7 @@ func TestCron_UnmarshalJSON_Invalid(t *testing.T) { func TestSha256Hash_MarshalJSON_UnmarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hash := models.MustSha256HashFromHex("f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5") json, err := hash.MarshalJSON() @@ -243,6 +257,7 @@ func TestSha256Hash_MarshalJSON_UnmarshalJSON(t *testing.T) { func TestSha256Hash_Sha256HashFromHex(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, err := models.Sha256HashFromHex("abczzz") require.Error(t, err) @@ -256,6 +271,7 @@ func TestSha256Hash_Sha256HashFromHex(t *testing.T) { func TestSha256Hash_String(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hash := models.MustSha256HashFromHex("f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5") assert.Equal(t, "f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5", hash.String()) @@ -263,6 +279,7 @@ func TestSha256Hash_String(t *testing.T) { func TestSha256Hash_Scan_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hash := models.MustSha256HashFromHex("f5bf259689b26f1374efb3c9a9868796953a0f814bb2d39b968d0e61b58620a5") val, err := hash.Value() @@ -277,6 +294,7 @@ func TestSha256Hash_Scan_Value(t *testing.T) { func TestAddressCollection_Scan_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ac := models.AddressCollection{ common.HexToAddress(strings.Repeat("AA", 20)), @@ -295,6 +313,7 @@ func TestAddressCollection_Scan_Value(t *testing.T) { func TestAddressCollection_ToStrings(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hex1 := "0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa" hex2 := "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB" @@ -312,6 +331,7 @@ func TestAddressCollection_ToStrings(t *testing.T) { func TestWebURL_Scan_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") u, err := url.Parse("https://chain.link") require.NoError(t, err) @@ -330,6 +350,7 @@ func TestWebURL_Scan_Value(t *testing.T) { func TestJSON_Scan_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") js, err := models.ParseJSON([]byte(`{"foo":123}`)) require.NoError(t, err) @@ -346,6 +367,7 @@ func TestJSON_Scan_Value(t *testing.T) { func TestJSON_Bytes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") jsBytes := []byte(`{"foo":123}`) @@ -357,6 +379,7 @@ func TestJSON_Bytes(t *testing.T) { func TestJSON_MarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") jsBytes := []byte(`{"foo":123}`) @@ -371,6 +394,7 @@ func TestJSON_MarshalJSON(t *testing.T) { func TestJSON_UnmarshalTOML(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") jsBytes := []byte(`{"foo":123}`) diff --git a/core/store/models/errors_test.go b/core/store/models/errors_test.go index 58a6238e121..86d715c0a02 100644 --- a/core/store/models/errors_test.go +++ b/core/store/models/errors_test.go @@ -6,11 +6,13 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func TestNewJSONAPIErrors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") res := models.NewJSONAPIErrors() require.NotNil(t, res) @@ -20,6 +22,7 @@ func TestNewJSONAPIErrors(t *testing.T) { func TestNewJSONAPIErrorsWith(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") res := models.NewJSONAPIErrorsWith("foo") require.NotNil(t, res) @@ -30,6 +33,7 @@ func TestNewJSONAPIErrorsWith(t *testing.T) { func TestJSONAPIErrors_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") res := models.NewJSONAPIErrorsWith("foo") require.NotNil(t, res) @@ -41,6 +45,7 @@ func TestJSONAPIErrors_Error(t *testing.T) { func TestJSONAPIErrors_CoerceEmptyToNil(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") res := models.NewJSONAPIErrors() require.NotNil(t, res) @@ -57,6 +62,7 @@ func TestJSONAPIErrors_CoerceEmptyToNil(t *testing.T) { func TestJSONAPIErrors_Merge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") res1 := models.NewJSONAPIErrorsWith("foo") require.NotNil(t, res1) diff --git a/core/utils/backoff_ticker_test.go b/core/utils/backoff_ticker_test.go index c9de6e021d3..356479d6d19 100644 --- a/core/utils/backoff_ticker_test.go +++ b/core/utils/backoff_ticker_test.go @@ -6,10 +6,13 @@ import ( "time" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBackoffTicker_Bounds(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") bt := NewBackoffTicker(1*time.Millisecond, 2*time.Second) min, max := bt.Bounds() @@ -19,6 +22,7 @@ func TestBackoffTicker_Bounds(t *testing.T) { func TestBackoffTicker_StartTwice(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") bt := NewBackoffTicker(1*time.Second, 10*time.Second) defer bt.Stop() @@ -32,6 +36,7 @@ func TestBackoffTicker_StartTwice(t *testing.T) { func TestBackoffTicker_StopTwice(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") bt := NewBackoffTicker(1*time.Second, 10*time.Second) ok := bt.Start() @@ -46,6 +51,7 @@ func TestBackoffTicker_StopTwice(t *testing.T) { func TestBackoffTicker_NoTicksAfterStop(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") min := 100 * time.Millisecond max := 5 * time.Second @@ -79,6 +85,7 @@ func TestBackoffTicker_NoTicksAfterStop(t *testing.T) { func TestBackoffTicker_Ticks(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") min := 100 * time.Millisecond max := 5 * time.Second @@ -124,6 +131,7 @@ func TestBackoffTicker_Ticks(t *testing.T) { func TestBackoffTicker_Restart(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") min := 1 * time.Second max := 10 * time.Second diff --git a/core/utils/big_math/big_math_test.go b/core/utils/big_math/big_math_test.go index 40cbd7bc97c..0127f1ee639 100644 --- a/core/utils/big_math/big_math_test.go +++ b/core/utils/big_math/big_math_test.go @@ -5,19 +5,24 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestMax(t *testing.T) { + tests.BelongsToCISuite(t, "unit") m := Max(big.NewInt(1), big.NewInt(2)) require.Equal(t, 0, big.NewInt(2).Cmp(m)) } func TestMin(t *testing.T) { + tests.BelongsToCISuite(t, "unit") m := Min(big.NewInt(1), big.NewInt(2)) require.Equal(t, 0, big.NewInt(1).Cmp(m)) } func TestAccumulate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") s := []*big.Int{ big.NewInt(1), big.NewInt(2), diff --git a/core/utils/collection_test.go b/core/utils/collection_test.go index 3866fa78cbe..bea44b458f6 100644 --- a/core/utils/collection_test.go +++ b/core/utils/collection_test.go @@ -4,9 +4,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestBatchSplit(t *testing.T) { + tests.BelongsToCISuite(t, "unit") list := []int{} for i := range 100 { list = append(list, i) diff --git a/core/utils/crypto/private_key_test.go b/core/utils/crypto/private_key_test.go index fa26b477290..d3c7ff49415 100644 --- a/core/utils/crypto/private_key_test.go +++ b/core/utils/crypto/private_key_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func Test_EncryptedPrivateKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") privatekey := []byte("privatekey") passphrase := "passphrase" @@ -28,6 +30,7 @@ func Test_EncryptedPrivateKey(t *testing.T) { func Test_EncryptedPrivateKey_Decrypt(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") passphrase := []byte("passphrase") _, privkey, err := ed25519.GenerateKey(nil) @@ -45,6 +48,7 @@ func Test_EncryptedPrivateKey_Decrypt(t *testing.T) { func Test_EncryptedPrivateKey_Scan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, privKey, err := ed25519.GenerateKey(nil) require.NoError(t, err) @@ -76,6 +80,7 @@ func Test_EncryptedPrivateKey_Scan(t *testing.T) { func Test_EncryptedPrivateKey_Value(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") _, privKey, err := ed25519.GenerateKey(nil) require.NoError(t, err) diff --git a/core/utils/crypto/public_key_test.go b/core/utils/crypto/public_key_test.go index 680ef48a3d3..c8855caf08d 100644 --- a/core/utils/crypto/public_key_test.go +++ b/core/utils/crypto/public_key_test.go @@ -8,10 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_PublicKey_String(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pubKey, _, err := ed25519.GenerateKey(nil) require.NoError(t, err) @@ -24,6 +27,7 @@ func Test_PublicKey_String(t *testing.T) { func Test_PublicKey_MarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pubKey, _, err := ed25519.GenerateKey(nil) require.NoError(t, err) @@ -38,6 +42,7 @@ func Test_PublicKey_MarshalJSON(t *testing.T) { func Test_PublicKey_UnmarshalJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") pubKey, _, err := ed25519.GenerateKey(nil) require.NoError(t, err) @@ -51,6 +56,7 @@ func Test_PublicKey_UnmarshalJSON(t *testing.T) { } func Test_PublicKey_Scan(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pubKey, _, err := ed25519.GenerateKey(nil) require.NoError(t, err) @@ -73,6 +79,7 @@ func Test_PublicKey_Scan(t *testing.T) { } func Test_PublicKey_Value(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pubKey, _, err := ed25519.GenerateKey(nil) require.NoError(t, err) diff --git a/core/utils/decimal_test.go b/core/utils/decimal_test.go index 068376ebbba..d3a3e515005 100644 --- a/core/utils/decimal_test.go +++ b/core/utils/decimal_test.go @@ -7,10 +7,13 @@ import ( "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDecimal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") dec := decimal.New(1, 0) big := big.NewInt(1) diff --git a/core/utils/deferable_write_closer_test.go b/core/utils/deferable_write_closer_test.go index 18d08bd80c2..523a721e77b 100644 --- a/core/utils/deferable_write_closer_test.go +++ b/core/utils/deferable_write_closer_test.go @@ -8,9 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDeferableWriteCloser_Close(t *testing.T) { + tests.BelongsToCISuite(t, "unit") d := t.TempDir() f, err := os.Create(filepath.Join(d, "test-file")) require.NoError(t, err) diff --git a/core/utils/eth_signatures_test.go b/core/utils/eth_signatures_test.go index 85b94500d68..9da3cbf5456 100644 --- a/core/utils/eth_signatures_test.go +++ b/core/utils/eth_signatures_test.go @@ -6,9 +6,12 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestGetSignersEthAddress_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privateKey, err := crypto.GenerateKey() require.NoError(t, err) address := crypto.PubkeyToAddress(privateKey.PublicKey) @@ -23,6 +26,7 @@ func TestGetSignersEthAddress_Success(t *testing.T) { } func TestGetSignersEthAddress_InvalidSignatureLength(t *testing.T) { + tests.BelongsToCISuite(t, "unit") msg := []byte("test message") sig := []byte("invalid signature length") _, err := GetSignersEthAddress(msg, sig) @@ -30,6 +34,7 @@ func TestGetSignersEthAddress_InvalidSignatureLength(t *testing.T) { } func TestGenerateEthPrefixedMsgHash(t *testing.T) { + tests.BelongsToCISuite(t, "unit") msg := []byte("test message") expectedPrefix := "\x19Ethereum Signed Message:\n" expectedHash := crypto.Keccak256Hash([]byte(expectedPrefix + "12" + string(msg))) @@ -39,6 +44,7 @@ func TestGenerateEthPrefixedMsgHash(t *testing.T) { } func TestGenerateEthSignature(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privateKey, err := crypto.GenerateKey() assert.NoError(t, err) diff --git a/core/utils/files_test.go b/core/utils/files_test.go index f7df0c454c0..7e467ab721d 100644 --- a/core/utils/files_test.go +++ b/core/utils/files_test.go @@ -9,6 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func tempFileName() string { @@ -22,6 +24,7 @@ func tempFileName() string { func TestFileExists(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") exists, err := FileExists(tempFileName()) require.NoError(t, err) @@ -34,6 +37,7 @@ func TestFileExists(t *testing.T) { func TestTooPermissive(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") res := TooPermissive(os.FileMode(0700), os.FileMode(0600)) assert.True(t, res) @@ -47,6 +51,7 @@ func TestTooPermissive(t *testing.T) { func TestFileSize_MarshalText_String(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { input FileSize @@ -77,6 +82,7 @@ func TestFileSize_MarshalText_String(t *testing.T) { func TestFileSize_UnmarshalText(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { input string diff --git a/core/utils/finite_ticker_test.go b/core/utils/finite_ticker_test.go index 575df7e6749..2006324c6b2 100644 --- a/core/utils/finite_ticker_test.go +++ b/core/utils/finite_ticker_test.go @@ -8,12 +8,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestFiniteTicker(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var counter atomic.Int32 diff --git a/core/utils/jwt_test.go b/core/utils/jwt_test.go index 7fa6e2ac6fc..e4537f88aa0 100644 --- a/core/utils/jwt_test.go +++ b/core/utils/jwt_test.go @@ -11,9 +11,11 @@ import ( "github.com/stretchr/testify/require" jsonrpc "github.com/smartcontractkit/chainlink-common/pkg/jsonrpc2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestSigningMethodEth_Sign(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("valid ECDSA key", func(t *testing.T) { privateKey, err := crypto.GenerateKey() require.NoError(t, err) @@ -37,6 +39,7 @@ func TestSigningMethodEth_Sign(t *testing.T) { } func TestSigningMethodEth_Verify(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privateKey, err := crypto.GenerateKey() require.NoError(t, err) address := crypto.PubkeyToAddress(privateKey.PublicKey) @@ -84,6 +87,7 @@ func TestSigningMethodEth_Verify(t *testing.T) { } func TestWithExpiry(t *testing.T) { + tests.BelongsToCISuite(t, "unit") duration := 30 * time.Minute opts := &jwtOptions{} @@ -94,6 +98,7 @@ func TestWithExpiry(t *testing.T) { } func TestWithIssuer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") issuer := "test-issuer" opts := &jwtOptions{} @@ -104,6 +109,7 @@ func TestWithIssuer(t *testing.T) { } func TestWithAudience(t *testing.T) { + tests.BelongsToCISuite(t, "unit") audience := []string{"aud1", "aud2"} opts := &jwtOptions{} @@ -113,6 +119,7 @@ func TestWithAudience(t *testing.T) { } func TestWithSubject(t *testing.T) { + tests.BelongsToCISuite(t, "unit") subject := "test-subject" opts := &jwtOptions{} @@ -123,6 +130,7 @@ func TestWithSubject(t *testing.T) { } func TestWithMaxExpiryDuration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") duration := 10 * time.Minute opts := &verifyOptions{} @@ -133,6 +141,7 @@ func TestWithMaxExpiryDuration(t *testing.T) { } func TestWithIssuedAtTolerance(t *testing.T) { + tests.BelongsToCISuite(t, "unit") duration := 10 * time.Minute opts := &verifyOptions{} @@ -153,6 +162,7 @@ func testRequest(t *testing.T) jsonrpc.Request[json.RawMessage] { } func TestCreateRequestJWT(t *testing.T) { + tests.BelongsToCISuite(t, "unit") req := testRequest(t) t.Run("default options", func(t *testing.T) { @@ -199,6 +209,7 @@ func TestCreateRequestJWT(t *testing.T) { } func TestSplitToken(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("valid token format", func(t *testing.T) { tokenString := "header.payload.signature" @@ -224,6 +235,7 @@ func TestSplitToken(t *testing.T) { } func TestVerifyRequestJWT_Integration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privateKey, err := crypto.GenerateKey() require.NoError(t, err) @@ -489,6 +501,7 @@ func TestVerifyRequestJWT_Integration(t *testing.T) { } func TestSigningMethodRegistration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") method := jwt.GetSigningMethod("ETH") require.NotNil(t, method) diff --git a/core/utils/password_test.go b/core/utils/password_test.go index 737bbc6ecac..7ef84b7fea4 100644 --- a/core/utils/password_test.go +++ b/core/utils/password_test.go @@ -7,11 +7,13 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func TestVerifyPasswordComplexity(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { password string @@ -52,6 +54,7 @@ func TestVerifyPasswordComplexity(t *testing.T) { func TestPasswordFromFile(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { password string diff --git a/core/utils/plainhex_test.go b/core/utils/plainhex_test.go index 9597391a63f..30f30b8562e 100644 --- a/core/utils/plainhex_test.go +++ b/core/utils/plainhex_test.go @@ -5,6 +5,8 @@ import ( "encoding/hex" "encoding/json" "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type marshalTest struct { @@ -48,6 +50,7 @@ var ( ) func TestUnmarshalBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range unmarshalBytesTests { var v PlainHexBytes err := json.Unmarshal([]byte(test.input), &v) @@ -62,6 +65,7 @@ func TestUnmarshalBytes(t *testing.T) { } func TestMarshalBytes(t *testing.T) { + tests.BelongsToCISuite(t, "unit") for _, test := range encodeBytesTests { in := test.input.([]byte) out, err := json.Marshal(PlainHexBytes(in)) diff --git a/core/utils/safe/safe_test.go b/core/utils/safe/safe_test.go index e177fc3117a..906e4203f2f 100644 --- a/core/utils/safe/safe_test.go +++ b/core/utils/safe/safe_test.go @@ -4,9 +4,13 @@ import ( "math" "math/big" "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestIntToUint64(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Test Case 1: Positive integer within the range of uint64 t.Run("PositiveInteger", func(t *testing.T) { input := 12345 diff --git a/core/utils/safe_math_test.go b/core/utils/safe_math_test.go index 8295c81ff45..61930ddc032 100644 --- a/core/utils/safe_math_test.go +++ b/core/utils/safe_math_test.go @@ -5,10 +5,12 @@ import ( "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" ) func Test_NonNegativeInt64ToUint64(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { input int64 expected uint64 diff --git a/core/utils/stringutils/string_utils_test.go b/core/utils/stringutils/string_utils_test.go index f4206609d7c..389b5b9fb53 100644 --- a/core/utils/stringutils/string_utils_test.go +++ b/core/utils/stringutils/string_utils_test.go @@ -5,10 +5,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestStringUtils_ToInt64(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") want := int64(12) @@ -20,6 +23,7 @@ func TestStringUtils_ToInt64(t *testing.T) { func TestStringUtils_FromInt64(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") want := "12" @@ -30,6 +34,7 @@ func TestStringUtils_FromInt64(t *testing.T) { func TestStringUtils_ToInt32(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") want := int32(32) @@ -41,6 +46,7 @@ func TestStringUtils_ToInt32(t *testing.T) { func TestStringUtils_FromInt32(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") want := "32" diff --git a/core/utils/thread_control_test.go b/core/utils/thread_control_test.go index 4254d8106ee..9499d4b2b9b 100644 --- a/core/utils/thread_control_test.go +++ b/core/utils/thread_control_test.go @@ -9,9 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestThreadControl_Close(t *testing.T) { + tests.BelongsToCISuite(t, "unit") n := 10 tc := NewThreadControl() @@ -30,6 +33,7 @@ func TestThreadControl_Close(t *testing.T) { } func TestThreadControl_GoCtx(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tc := NewThreadControl() defer tc.Close() diff --git a/core/utils/tomlutils/toml_test.go b/core/utils/tomlutils/toml_test.go index b640eee73eb..4809d77fd4b 100644 --- a/core/utils/tomlutils/toml_test.go +++ b/core/utils/tomlutils/toml_test.go @@ -4,10 +4,13 @@ import ( "testing" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestUtils_TomlFloat32_Success_Decimal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tomlF32 Float32 @@ -19,6 +22,7 @@ func TestUtils_TomlFloat32_Success_Decimal(t *testing.T) { func TestUtils_TomlFloat32_Success_Integer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tomlF32 Float32 @@ -30,6 +34,7 @@ func TestUtils_TomlFloat32_Success_Integer(t *testing.T) { func TestUtils_TomlFloat32_Failure(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tomlF32 Float32 @@ -40,6 +45,7 @@ func TestUtils_TomlFloat32_Failure(t *testing.T) { func TestUtils_TomlFloat64_Success_Decimal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tomlF64 Float64 @@ -51,6 +57,7 @@ func TestUtils_TomlFloat64_Success_Decimal(t *testing.T) { func TestUtils_TomlFloat64_Success_Integer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tomlF64 Float64 @@ -62,6 +69,7 @@ func TestUtils_TomlFloat64_Success_Integer(t *testing.T) { func TestUtils_TomlFloat64_Failure(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tomlF64 Float64 diff --git a/core/utils/utils_test.go b/core/utils/utils_test.go index 50ba08477b4..01eb119c8cb 100644 --- a/core/utils/utils_test.go +++ b/core/utils/utils_test.go @@ -16,10 +16,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestUtils_NewBytes32ID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") id := utils.NewBytes32ID() assert.NotContains(t, id, "-") @@ -27,6 +30,7 @@ func TestUtils_NewBytes32ID(t *testing.T) { func TestUtils_NewSecret(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { numOfBytes int @@ -46,6 +50,7 @@ func TestUtils_NewSecret(t *testing.T) { func TestUtils_StringToHex(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { utf8 string @@ -67,6 +72,7 @@ func TestUtils_StringToHex(t *testing.T) { func TestUtils_DurationFromNow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") future := time.Now().Add(time.Second) duration := utils.DurationFromNow(future) @@ -75,6 +81,7 @@ func TestUtils_DurationFromNow(t *testing.T) { func TestBoundedQueue(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") q := utils.NewBoundedQueue[int](3) require.True(t, q.Empty()) @@ -115,6 +122,7 @@ func TestBoundedQueue(t *testing.T) { func TestBoundedPriorityQueue(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") q := utils.NewBoundedPriorityQueue[int](map[uint]int{ 1: 3, @@ -167,6 +175,7 @@ func TestBoundedPriorityQueue(t *testing.T) { func Test_WithJitter(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") d := 10 * time.Second @@ -179,6 +188,7 @@ func Test_WithJitter(t *testing.T) { func TestIsEmpty(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") b := make([]byte, 32) assert.True(t, utils.IsEmpty(b)) @@ -189,6 +199,7 @@ func TestIsEmpty(t *testing.T) { func TestHashPassword(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") h, err := utils.HashPassword("Qwerty123!") assert.NoError(t, err) @@ -203,6 +214,7 @@ func TestHashPassword(t *testing.T) { func TestISO8601UTC(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ts := time.Unix(1651818206, 0) str := utils.ISO8601UTC(ts) @@ -211,6 +223,7 @@ func TestISO8601UTC(t *testing.T) { func TestFormatJSON(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") json := `{"foo":123}` formatted, err := utils.FormatJSON(json) @@ -220,6 +233,7 @@ func TestFormatJSON(t *testing.T) { func TestMustUnmarshalToMap(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") json := `{"foo":123.45}` expected := make(map[string]any) @@ -238,6 +252,7 @@ func TestMustUnmarshalToMap(t *testing.T) { func TestSha256(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") hexHash, err := utils.Sha256("test") assert.NoError(t, err) @@ -249,6 +264,7 @@ func TestSha256(t *testing.T) { func TestWithCloseChan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") assertCtxCancelled := func(ctx context.Context, t *testing.T) { select { @@ -298,6 +314,7 @@ func TestWithCloseChan(t *testing.T) { func TestContextFromChan(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ch := make(chan struct{}) ctx, cancel := utils.ContextFromChan(ch) @@ -314,6 +331,7 @@ func TestContextFromChan(t *testing.T) { func TestContextFromChanWithTimeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") assertCtxCancelled := func(ctx context.Context, t *testing.T) { select { @@ -348,6 +366,7 @@ func TestContextFromChanWithTimeout(t *testing.T) { func TestLeftPadBitString(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") for _, test := range []struct { str string @@ -367,6 +386,7 @@ func TestLeftPadBitString(t *testing.T) { func TestValidateCronSchedule(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") err := utils.ValidateCronSchedule("") assert.Error(t, err) @@ -383,6 +403,7 @@ func TestValidateCronSchedule(t *testing.T) { func TestPausableTicker(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var counter atomic.Int32 @@ -418,6 +439,7 @@ func TestPausableTicker(t *testing.T) { func TestCronTicker(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var counter atomic.Int32 @@ -450,6 +472,7 @@ func TestCronTicker(t *testing.T) { func TestErrorBuffer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") err1 := errors.New("err1") err2 := errors.New("err2") diff --git a/core/web/api_test.go b/core/web/api_test.go index 76ea1951db0..72e241a6eb8 100644 --- a/core/web/api_test.go +++ b/core/web/api_test.go @@ -6,10 +6,13 @@ import ( "github.com/manyminds/api2go/jsonapi" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestApi_ParsePaginatedRequest(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -58,6 +61,7 @@ func (r *TestResource) SetID(value string) error { func TestApi_NewPaginatedResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -123,6 +127,7 @@ func TestApi_NewPaginatedResponse(t *testing.T) { func TestPagination_ParsePaginatedResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var docs []TestResource var links jsonapi.Links @@ -151,6 +156,7 @@ func (d DummyResource) GetID() string { func TestNewJSONAPIResponse(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") buffer, err := NewJSONAPIResponse(12981) assert.Error(t, err) diff --git a/core/web/aptos_keys_controller_test.go b/core/web/aptos_keys_controller_test.go index 30ea49d9ded..f9331201b77 100644 --- a/core/web/aptos_keys_controller_test.go +++ b/core/web/aptos_keys_controller_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" @@ -17,6 +18,7 @@ import ( func TestAptosKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupAptosKeysControllerTests(t) keys, _ := keyStore.Aptos().GetAll() @@ -37,6 +39,7 @@ func TestAptosKeysController_Index_HappyPath(t *testing.T) { func TestAptosKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -63,6 +66,7 @@ func TestAptosKeysController_Create_HappyPath(t *testing.T) { func TestAptosKeysController_Delete_NonExistentAptosKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupAptosKeysControllerTests(t) @@ -74,6 +78,7 @@ func TestAptosKeysController_Delete_NonExistentAptosKeyID(t *testing.T) { func TestAptosKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupAptosKeysControllerTests(t) diff --git a/core/web/auth/auth_test.go b/core/web/auth/auth_test.go index e5d973efa95..6a8bb0775a9 100644 --- a/core/web/auth/auth_test.go +++ b/core/web/auth/auth_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -61,6 +62,7 @@ func (u userFindSuccesser) FindUserByAPIToken(ctx context.Context, token string) } func TestAuthenticateByToken_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") user := cltest.MustRandomUser(t) key, secret := uuid.New().String(), uuid.New().String() apiToken := auth.Token{AccessKey: key, Secret: secret} @@ -87,6 +89,7 @@ func TestAuthenticateByToken_Success(t *testing.T) { } func TestAuthenticateByToken_AuthFailed(t *testing.T) { + tests.BelongsToCISuite(t, "unit") authr := userFindFailer{err: auth.ErrorAuthFailed} called := false @@ -108,6 +111,7 @@ func TestAuthenticateByToken_AuthFailed(t *testing.T) { } func TestAuthenticateByToken_RejectsBlankAccessKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") user := cltest.MustRandomUser(t) key, secret := "", uuid.New().String() apiToken := auth.Token{AccessKey: key, Secret: secret} @@ -134,6 +138,7 @@ func TestAuthenticateByToken_RejectsBlankAccessKey(t *testing.T) { } func TestRequireAuth_NoneRequired(t *testing.T) { + tests.BelongsToCISuite(t, "unit") called := false var authr webauth.Authenticator @@ -153,6 +158,7 @@ func TestRequireAuth_NoneRequired(t *testing.T) { } func TestRequireAuth_AuthFailed(t *testing.T) { + tests.BelongsToCISuite(t, "unit") called := false var authr webauth.Authenticator router := gin.New() @@ -171,6 +177,7 @@ func TestRequireAuth_AuthFailed(t *testing.T) { } func TestRequireAuth_LastAuthSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") called := false var authr webauth.Authenticator router := gin.New() @@ -189,6 +196,7 @@ func TestRequireAuth_LastAuthSuccess(t *testing.T) { } func TestRequireAuth_Error(t *testing.T) { + tests.BelongsToCISuite(t, "unit") called := false var authr webauth.Authenticator router := gin.New() @@ -343,6 +351,7 @@ var routesRolesMap = [...]routeRules{ // Iterate over the above routesRolesMap and assert each path is wrapped and // the user role is enforced with the correct middleware func TestRBAC_Routemap_Admin(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -381,6 +390,7 @@ func TestRBAC_Routemap_Admin(t *testing.T) { } func TestRBAC_Routemap_Edit(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -428,6 +438,7 @@ func TestRBAC_Routemap_Edit(t *testing.T) { } func TestRBAC_Routemap_Run(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -475,6 +486,7 @@ func TestRBAC_Routemap_Run(t *testing.T) { } func TestRBAC_Routemap_ViewOnly(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) diff --git a/core/web/auth/gql_test.go b/core/web/auth/gql_test.go index 16ecdbf6883..cfa471f97a2 100644 --- a/core/web/auth/gql_test.go +++ b/core/web/auth/gql_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -21,6 +22,7 @@ import ( func Test_AuthenticateGQL_Unauthenticated(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") sessionORM := mocks.NewAuthenticationProvider(t) sessionStore := cookie.NewStore([]byte("secret")) @@ -44,6 +46,7 @@ func Test_AuthenticateGQL_Unauthenticated(t *testing.T) { func Test_AuthenticateGQL_Authenticated(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") sessionORM := mocks.NewAuthenticationProvider(t) sessionStore := cookie.NewStore([]byte(cltest.SessionSecret)) @@ -73,6 +76,7 @@ func Test_AuthenticateGQL_Authenticated(t *testing.T) { func Test_GetAndSetGQLAuthenticatedSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) user := clsessions.User{Email: cltest.APIEmailAdmin, Role: clsessions.UserRoleAdmin} diff --git a/core/web/bridge_types_controller_test.go b/core/web/bridge_types_controller_test.go index 28e590d2901..fabdc536436 100644 --- a/core/web/bridge_types_controller_test.go +++ b/core/web/bridge_types_controller_test.go @@ -18,10 +18,13 @@ import ( "github.com/manyminds/api2go/jsonapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidateBridgeType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { description string @@ -113,6 +116,7 @@ func TestValidateBridgeType(t *testing.T) { func TestValidateBridgeNotExist(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) @@ -145,6 +149,7 @@ func BenchmarkBridgeTypesController_Index(b *testing.B) { func TestBridgeTypesController_Index(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -214,6 +219,7 @@ func setupBridgeControllerIndex(t testing.TB, orm bridges.ORM) ([]*bridges.Bridg func TestBridgeTypesController_Create_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -243,6 +249,7 @@ func TestBridgeTypesController_Create_Success(t *testing.T) { func TestBridgeTypesController_Update_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -269,6 +276,7 @@ func TestBridgeTypesController_Update_Success(t *testing.T) { func TestBridgeController_Show(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -300,6 +308,7 @@ func TestBridgeController_Show(t *testing.T) { func TestBridgeTypesController_Create_AdapterExistsError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -316,6 +325,7 @@ func TestBridgeTypesController_Create_AdapterExistsError(t *testing.T) { func TestBridgeTypesController_Create_BindJSONError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -332,6 +342,7 @@ func TestBridgeTypesController_Create_BindJSONError(t *testing.T) { func TestBridgeTypesController_Create_DatabaseError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) diff --git a/core/web/build_info_controller_test.go b/core/web/build_info_controller_test.go index 5448ad82a21..a3c671ee896 100644 --- a/core/web/build_info_controller_test.go +++ b/core/web/build_info_controller_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" clhttptest "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/httptest" @@ -14,6 +15,7 @@ import ( func TestBuildInfoController_Show_APICredentials(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) ctx := testutils.Context(t) @@ -33,6 +35,7 @@ func TestBuildInfoController_Show_APICredentials(t *testing.T) { func TestBuildInfoController_Show_NoCredentials(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) ctx := testutils.Context(t) diff --git a/core/web/capability_controller_test.go b/core/web/capability_controller_test.go index 65b87ebbf42..24851878f50 100644 --- a/core/web/capability_controller_test.go +++ b/core/web/capability_controller_test.go @@ -18,12 +18,14 @@ import ( "github.com/smartcontractkit/chainlink-protos/cre/go/values" capmock "github.com/smartcontractkit/chainlink/v2/core/capabilities/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" appmocks "github.com/smartcontractkit/chainlink/v2/core/internal/mocks" "github.com/smartcontractkit/chainlink/v2/core/web" ) func TestCapabilityController_ExecuteCapability_MissingBody(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockApp := appmocks.NewApplication(t) controller := web.CapabilityController{App: mockApp} @@ -41,6 +43,7 @@ func TestCapabilityController_ExecuteCapability_MissingBody(t *testing.T) { } func TestCapabilityController_ExecuteCapability_RegistryNotInitialized(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockApp := appmocks.NewApplication(t) requestBody := web.CapabilityRequestOuter{ CapabilityName: "test-capability", @@ -64,6 +67,7 @@ func TestCapabilityController_ExecuteCapability_RegistryNotInitialized(t *testin } func TestCapabilityController_ExecuteCapability_MissingRequiredFields(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockApp := appmocks.NewApplication(t) mockApp.EXPECT().GetCapabilitiesRegistry().Return(nil) @@ -84,6 +88,7 @@ func TestCapabilityController_ExecuteCapability_MissingRequiredFields(t *testing } func TestCapabilityController_ExecuteCapability(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockApp := appmocks.NewApplication(t) mockRegistry := registrymock.NewCapabilitiesRegistry(t) mockApp.EXPECT().GetCapabilitiesRegistry().Return(&capabilities.Registry{ diff --git a/core/web/chains_controller_test.go b/core/web/chains_controller_test.go index 01ec1c357ad..482ec554179 100644 --- a/core/web/chains_controller_test.go +++ b/core/web/chains_controller_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -33,6 +34,7 @@ import ( func Test_EVMChainsController_Show(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") validID := ubig.New(testutils.NewRandomEVMChainID()) @@ -110,6 +112,7 @@ func Test_EVMChainsController_Show(t *testing.T) { } func Test_EVMChainsController_Index(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1795") t.Parallel() @@ -232,6 +235,7 @@ func setupEVMChainsControllerTest(t *testing.T, cfg chainlink.GeneralConfig) *Te func Test_SolanaChainsController_Show(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") const validID = "Chainlink-12" @@ -355,6 +359,7 @@ FinalizedBlockOffset = 50 func Test_SolanaChainsController_Index(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") chainA := &config.TOMLConfig{ ChainID: ptr(fmt.Sprintf("ChainlinktestA-%d", rand.Int31n(999999))), diff --git a/core/web/cors_test.go b/core/web/cors_test.go index c08e11bc125..246d85d6c83 100644 --- a/core/web/cors_test.go +++ b/core/web/cors_test.go @@ -4,6 +4,7 @@ import ( "net/http" "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" @@ -11,6 +12,7 @@ import ( func TestCors_DefaultOrigins(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.WebServer.AllowOrigins = ptr("http://localhost:3000,http://localhost:6689") @@ -41,6 +43,7 @@ func TestCors_DefaultOrigins(t *testing.T) { func TestCors_OverrideOrigins(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { allow string diff --git a/core/web/cosmos_keys_controller_test.go b/core/web/cosmos_keys_controller_test.go index c5377c3d3a9..59dfc98d6c1 100644 --- a/core/web/cosmos_keys_controller_test.go +++ b/core/web/cosmos_keys_controller_test.go @@ -13,10 +13,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestCosmosKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupCosmosKeysControllerTests(t) keys, _ := keyStore.Cosmos().GetAll() @@ -37,6 +40,7 @@ func TestCosmosKeysController_Index_HappyPath(t *testing.T) { func TestCosmosKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) ctx := testutils.Context(t) @@ -64,6 +68,7 @@ func TestCosmosKeysController_Create_HappyPath(t *testing.T) { func TestCosmosKeysController_Delete_NonExistentCosmosKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupCosmosKeysControllerTests(t) @@ -75,6 +80,7 @@ func TestCosmosKeysController_Delete_NonExistentCosmosKeyID(t *testing.T) { func TestCosmosKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupCosmosKeysControllerTests(t) diff --git a/core/web/dkg_recipient_keys_controller_test.go b/core/web/dkg_recipient_keys_controller_test.go index 34e3bfafd02..14416dee80f 100644 --- a/core/web/dkg_recipient_keys_controller_test.go +++ b/core/web/dkg_recipient_keys_controller_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func setupDKGRecipientKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore.Master) { @@ -30,6 +32,7 @@ func setupDKGRecipientKeysControllerTests(t *testing.T) (cltest.HTTPClientCleane } func TestDKGRecipientKeysController_Index_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupDKGRecipientKeysControllerTests(t) keys, err := keyStore.DKGRecipient().GetAll() require.NoError(t, err) diff --git a/core/web/eth_keys_controller_test.go b/core/web/eth_keys_controller_test.go index 5effbcbd6e6..ace12def0ed 100644 --- a/core/web/eth_keys_controller_test.go +++ b/core/web/eth_keys_controller_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" @@ -28,6 +29,7 @@ import ( func TestETHKeysController_Index_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -79,6 +81,7 @@ func TestETHKeysController_Index_Success(t *testing.T) { func TestETHKeysController_Index_Errors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -117,6 +120,7 @@ func TestETHKeysController_Index_Errors(t *testing.T) { func TestETHKeysController_Index_Disabled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -151,6 +155,7 @@ func TestETHKeysController_Index_Disabled(t *testing.T) { func TestETHKeysController_Index_NotDev(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := cltest.NewEthMocksWithStartupAssertions(t) ethClient.On("NonceAt", mock.Anything, mock.Anything, mock.Anything).Return(uint64(0), nil).Once() @@ -187,6 +192,7 @@ func TestETHKeysController_Index_NotDev(t *testing.T) { func TestETHKeysController_Index_NoAccounts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) ctx := testutils.Context(t) @@ -206,6 +212,7 @@ func TestETHKeysController_Index_NoAccounts(t *testing.T) { func TestETHKeysController_CreateSuccess(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].BalanceMonitor.Enabled = ptr(false) @@ -247,6 +254,7 @@ func TestETHKeysController_CreateSuccess(t *testing.T) { func TestETHKeysController_ChainSuccess_UpdateNonce(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -289,6 +297,7 @@ func TestETHKeysController_ChainSuccess_UpdateNonce(t *testing.T) { func TestETHKeysController_ChainSuccess_Disable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -334,6 +343,7 @@ func TestETHKeysController_ChainSuccess_Disable(t *testing.T) { func TestETHKeysController_ChainSuccess_Enable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -378,6 +388,7 @@ func TestETHKeysController_ChainSuccess_Enable(t *testing.T) { func TestETHKeysController_ChainSuccess_ResetWithAbandon(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -451,6 +462,7 @@ func TestETHKeysController_ChainSuccess_ResetWithAbandon(t *testing.T) { func TestETHKeysController_ChainFailure_InvalidAbandon(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -485,6 +497,7 @@ func TestETHKeysController_ChainFailure_InvalidAbandon(t *testing.T) { func TestETHKeysController_ChainFailure_InvalidEnabled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -519,6 +532,7 @@ func TestETHKeysController_ChainFailure_InvalidEnabled(t *testing.T) { func TestETHKeysController_ChainFailure_InvalidAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -548,6 +562,7 @@ func TestETHKeysController_ChainFailure_InvalidAddress(t *testing.T) { func TestETHKeysController_ChainFailure_MissingAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -577,6 +592,7 @@ func TestETHKeysController_ChainFailure_MissingAddress(t *testing.T) { func TestETHKeysController_ChainFailure_InvalidChainID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -606,6 +622,7 @@ func TestETHKeysController_ChainFailure_InvalidChainID(t *testing.T) { func TestETHKeysController_ChainFailure_MissingChainID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -639,6 +656,7 @@ func TestETHKeysController_ChainFailure_MissingChainID(t *testing.T) { func TestETHKeysController_DeleteSuccess(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) ethClient.On("NonceAt", mock.Anything, mock.Anything, mock.Anything).Return(uint64(0), nil).Twice() @@ -690,6 +708,7 @@ func TestETHKeysController_DeleteSuccess(t *testing.T) { func TestETHKeysController_DeleteFailure_InvalidAddress(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -712,6 +731,7 @@ func TestETHKeysController_DeleteFailure_InvalidAddress(t *testing.T) { func TestETHKeysController_DeleteFailure_KeyMissing(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { diff --git a/core/web/evm_forwarders_controller_test.go b/core/web/evm_forwarders_controller_test.go index a5167987ad8..81a434e3050 100644 --- a/core/web/evm_forwarders_controller_test.go +++ b/core/web/evm_forwarders_controller_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -44,6 +45,7 @@ func setupEVMForwardersControllerTest(t *testing.T, overrideFn func(c *chainlink func Test_EVMForwardersController_Track(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") chainId := big.New(testutils.NewRandomEVMChainID()) controller := setupEVMForwardersControllerTest(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -81,6 +83,7 @@ func Test_EVMForwardersController_Track(t *testing.T) { func Test_EVMForwardersController_Index(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") chainId := big.New(testutils.NewRandomEVMChainID()) controller := setupEVMForwardersControllerTest(t, func(c *chainlink.Config, s *chainlink.Secrets) { diff --git a/core/web/evm_transactions_controller_test.go b/core/web/evm_transactions_controller_test.go index 462e929b622..e611262e2cf 100644 --- a/core/web/evm_transactions_controller_test.go +++ b/core/web/evm_transactions_controller_test.go @@ -17,10 +17,13 @@ import ( "github.com/manyminds/api2go/jsonapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTransactionsController_Index_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) ctx := testutils.Context(t) @@ -67,6 +70,7 @@ func TestTransactionsController_Index_Success(t *testing.T) { func TestTransactionsController_Index_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) ctx := testutils.Context(t) @@ -80,6 +84,7 @@ func TestTransactionsController_Index_Error(t *testing.T) { func TestTransactionsController_Show_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) ctx := testutils.Context(t) @@ -114,6 +119,7 @@ func TestTransactionsController_Show_Success(t *testing.T) { func TestTransactionsController_Show_NotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) ctx := testutils.Context(t) diff --git a/core/web/evm_transfer_controller_test.go b/core/web/evm_transfer_controller_test.go index 974fd113a8f..cb65be38a33 100644 --- a/core/web/evm_transfer_controller_test.go +++ b/core/web/evm_transfer_controller_test.go @@ -29,10 +29,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTransfersController_CreateSuccess_From(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) @@ -76,6 +79,7 @@ func TestTransfersController_CreateSuccess_From(t *testing.T) { func TestTransfersController_CreateSuccess_From_WEI(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) @@ -118,6 +122,7 @@ func TestTransfersController_CreateSuccess_From_WEI(t *testing.T) { func TestTransfersController_CreateSuccess_From_BalanceMonitorDisabled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) @@ -165,6 +170,7 @@ func TestTransfersController_CreateSuccess_From_BalanceMonitorDisabled(t *testin func TestTransfersController_TransferZeroAddressError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -191,6 +197,7 @@ func TestTransfersController_TransferZeroAddressError(t *testing.T) { func TestTransfersController_TransferBalanceToLowError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) @@ -227,6 +234,7 @@ func TestTransfersController_TransferBalanceToLowError(t *testing.T) { func TestTransfersController_TransferBalanceToLowError_ZeroBalance(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) @@ -266,6 +274,7 @@ func TestTransfersController_TransferBalanceToLowError_ZeroBalance(t *testing.T) func TestTransfersController_JSONBindingError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -280,6 +289,7 @@ func TestTransfersController_JSONBindingError(t *testing.T) { func TestTransfersController_CreateSuccess_eip1559(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) @@ -341,6 +351,7 @@ func TestTransfersController_CreateSuccess_eip1559(t *testing.T) { } func TestTransfersController_FindTxAttempt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tx := txmgr.Tx{ID: 1} attempt := txmgr.TxAttempt{ID: 2} txWithAttempt := txmgr.Tx{ID: 1, TxAttempts: []txmgr.TxAttempt{attempt}} diff --git a/core/web/evm_tx_attempts_controller_test.go b/core/web/evm_tx_attempts_controller_test.go index d3cfa5e92d7..82c2e7c2b59 100644 --- a/core/web/evm_tx_attempts_controller_test.go +++ b/core/web/evm_tx_attempts_controller_test.go @@ -13,10 +13,13 @@ import ( "github.com/manyminds/api2go/jsonapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTxAttemptsController_Index_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -48,6 +51,7 @@ func TestTxAttemptsController_Index_Success(t *testing.T) { func TestTxAttemptsController_Index_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithKey(t) require.NoError(t, app.Start(testutils.Context(t))) diff --git a/core/web/external_initiators_controller_test.go b/core/web/external_initiators_controller_test.go index 384fd3a3fd7..fbdcc84fe4d 100644 --- a/core/web/external_initiators_controller_test.go +++ b/core/web/external_initiators_controller_test.go @@ -19,10 +19,13 @@ import ( "github.com/manyminds/api2go/jsonapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidateExternalInitiator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) orm := bridges.NewORM(db) @@ -66,6 +69,7 @@ func TestValidateExternalInitiator(t *testing.T) { func TestExternalInitiatorsController_Index(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -132,6 +136,7 @@ func TestExternalInitiatorsController_Index(t *testing.T) { func TestExternalInitiatorsController_Create_success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -159,6 +164,7 @@ func TestExternalInitiatorsController_Create_success(t *testing.T) { func TestExternalInitiatorsController_Create_without_URL(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -186,6 +192,7 @@ func TestExternalInitiatorsController_Create_without_URL(t *testing.T) { func TestExternalInitiatorsController_Create_invalid(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -204,6 +211,7 @@ func TestExternalInitiatorsController_Create_invalid(t *testing.T) { func TestExternalInitiatorsController_Delete(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { @@ -226,6 +234,7 @@ func TestExternalInitiatorsController_Delete(t *testing.T) { func TestExternalInitiatorsController_DeleteNotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { diff --git a/core/web/features_controller_test.go b/core/web/features_controller_test.go index 02f75f14bc5..d30e3fc1912 100644 --- a/core/web/features_controller_test.go +++ b/core/web/features_controller_test.go @@ -13,9 +13,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_FeaturesController_List(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationWithConfig(t, configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { csa := true c.Feature.UICSAKeys = &csa diff --git a/core/web/gui_assets_test.go b/core/web/gui_assets_test.go index c3fc5fc38d7..4a2c7b355a0 100644 --- a/core/web/gui_assets_test.go +++ b/core/web/gui_assets_test.go @@ -16,6 +16,8 @@ import ( "github.com/gin-gonic/gin" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) //go:embed fixtures/operator_ui/assets @@ -23,6 +25,7 @@ var testFs embed.FS func TestGuiAssets_DefaultIndexHtml_OK(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -54,6 +57,7 @@ func TestGuiAssets_DefaultIndexHtml_OK(t *testing.T) { func TestGuiAssets_DefaultIndexHtml_NotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplication(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -86,6 +90,7 @@ func TestGuiAssets_DefaultIndexHtml_NotFound(t *testing.T) { func TestGuiAssets_DefaultIndexHtml_RateLimited(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") config := configtest.NewGeneralConfig(t, nil) app := cltest.NewApplicationWithConfig(t, config) @@ -113,6 +118,7 @@ func TestGuiAssets_DefaultIndexHtml_RateLimited(t *testing.T) { func TestGuiAssets_AssetsFS(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") efs := web.NewEmbedFileSystem(testFs, "fixtures/operator_ui") handler := web.ServeGzippedAssets("/fixtures/operator_ui/", efs, logger.TestLogger(t)) diff --git a/core/web/health_controller_test.go b/core/web/health_controller_test.go index 90911991700..e0283a1f7d1 100644 --- a/core/web/health_controller_test.go +++ b/core/web/health_controller_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -23,6 +24,7 @@ import ( ) func TestHealthController_Readyz(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var tt = []struct { name string ready bool @@ -59,6 +61,7 @@ func TestHealthController_Readyz(t *testing.T) { } func TestHealthController_Health_status(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var tt = []struct { name string ready bool @@ -110,6 +113,7 @@ var ( ) func TestHealthController_Health_body(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") bodyJSON = strings.ReplaceAll(bodyJSON, "1399100", testutils.FixtureChainID.String()) bodyHTML = strings.ReplaceAll(bodyHTML, "1399100", testutils.FixtureChainID.String()) bodyTXT = strings.ReplaceAll(bodyTXT, "1399100", testutils.FixtureChainID.String()) diff --git a/core/web/health_template_test.go b/core/web/health_template_test.go index 94bef0ac7cc..bbbf20bd4a3 100644 --- a/core/web/health_template_test.go +++ b/core/web/health_template_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -38,6 +39,7 @@ original error`}, } func Test_checkTree_WriteHTMLTo(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ct := newCheckTree(checks()) var b bytes.Buffer require.NoError(t, ct.WriteHTMLTo(&b)) @@ -46,6 +48,7 @@ func Test_checkTree_WriteHTMLTo(t *testing.T) { } func Test_writeTextTo(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var b bytes.Buffer require.NoError(t, writeTextTo(&b, checks())) got := b.String() diff --git a/core/web/jobs_controller_test.go b/core/web/jobs_controller_test.go index 6b52428ec00..f84416eba05 100644 --- a/core/web/jobs_controller_test.go +++ b/core/web/jobs_controller_test.go @@ -28,6 +28,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -46,6 +47,7 @@ import ( ) func TestJobsController_Create_ValidationFailure_OffchainReportingSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( contractAddress = cltest.NewEIP55Address() ) @@ -106,6 +108,7 @@ func TestJobsController_Create_ValidationFailure_OffchainReportingSpec(t *testin } func TestJobController_Create_DirectRequest_Fast(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app, client := setupJobsControllerTests(t) require.NoError(t, app.KeyStore.OCR().Add(ctx, cltest.DefaultOCRKey)) @@ -140,6 +143,7 @@ func mustInt32FromString(t *testing.T, s string) int32 { } func TestJobController_Create_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app, client := setupJobsControllerTests(t) b1, b2 := setupBridges(t, app.GetDB()) @@ -507,6 +511,7 @@ targets: } func TestJobsController_Create_WebhookSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -536,6 +541,7 @@ func TestJobsController_Create_WebhookSpec(t *testing.T) { var webhookSpecTemplate string func TestJobsController_FailToCreate_EmptyJsonAttribute(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -556,6 +562,7 @@ func TestJobsController_FailToCreate_EmptyJsonAttribute(t *testing.T) { } func TestJobsController_Index_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, client, ocrJobSpecFromFile, _, ereJobSpecFromFile, _ := setupJobSpecsControllerTestsWithJobs(t) url := url.URL{Path: "/v2/jobs"} @@ -578,6 +585,7 @@ func TestJobsController_Index_HappyPath(t *testing.T) { } func TestJobsController_Show_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, client, ocrJobSpecFromFile, jobID, ereJobSpecFromFile, jobID2 := setupJobSpecsControllerTestsWithJobs(t) response, cleanup := client.Get("/v2/jobs/" + strconv.Itoa(int(jobID))) @@ -622,6 +630,7 @@ func TestJobsController_Show_HappyPath(t *testing.T) { } func TestJobsController_Show_InvalidID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, client, _, _, _, _ := setupJobSpecsControllerTestsWithJobs(t) response, cleanup := client.Get("/v2/jobs/uuidLikeString") @@ -630,6 +639,7 @@ func TestJobsController_Show_InvalidID(t *testing.T) { } func TestJobsController_Show_NonExistentID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, client, _, _, _, _ := setupJobSpecsControllerTestsWithJobs(t) response, cleanup := client.Get("/v2/jobs/999999999") @@ -639,6 +649,7 @@ func TestJobsController_Show_NonExistentID(t *testing.T) { } func TestJobsController_Update_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.OCR.Enabled = ptr(true) @@ -705,6 +716,7 @@ func TestJobsController_Update_HappyPath(t *testing.T) { } func TestJobsController_Update_NonExistentID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.OCR.Enabled = ptr(true) diff --git a/core/web/lca_controller_test.go b/core/web/lca_controller_test.go index 7ec476e8eca..79a80980c6a 100644 --- a/core/web/lca_controller_test.go +++ b/core/web/lca_controller_test.go @@ -9,12 +9,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" ) func TestLCAController_FindLCA(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") cfg := configtest.NewTestGeneralConfig(t) ec := setupEthClientForControllerTests(t) app := cltest.NewApplicationWithConfigAndKey(t, cfg, cltest.DefaultP2PKey, ec) diff --git a/core/web/loader/loader_test.go b/core/web/loader/loader_test.go index ce7e9879e8b..75253caaa1f 100644 --- a/core/web/loader/loader_test.go +++ b/core/web/loader/loader_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" @@ -34,6 +35,7 @@ import ( func TestLoader_ChainsRelayID_HandleDuplicateIDAcrossNetworks(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") app := coremocks.NewApplication(t) ctx := InjectDataloader(testutils.Context(t), app) @@ -107,6 +109,7 @@ func TestLoader_ChainsRelayID_HandleDuplicateIDAcrossNetworks(t *testing.T) { func TestLoader_Nodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") app := coremocks.NewApplication(t) ctx := InjectDataloader(testutils.Context(t), app) @@ -137,6 +140,7 @@ func TestLoader_Nodes(t *testing.T) { func TestLoader_FeedsManagers(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fsvc := feedsMocks.NewService(t) app := coremocks.NewApplication(t) @@ -176,6 +180,7 @@ func TestLoader_FeedsManagers(t *testing.T) { func TestLoader_JobProposals(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fsvc := feedsMocks.NewService(t) app := coremocks.NewApplication(t) @@ -215,6 +220,7 @@ func TestLoader_JobProposals(t *testing.T) { func TestLoader_JobRuns(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") jobsORM := jobORMMocks.NewORM(t) app := coremocks.NewApplication(t) @@ -242,6 +248,7 @@ func TestLoader_JobRuns(t *testing.T) { func TestLoader_JobsByPipelineSpecIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("with out errors", func(t *testing.T) { t.Parallel() @@ -293,6 +300,7 @@ func TestLoader_JobsByPipelineSpecIDs(t *testing.T) { func TestLoader_JobsByExternalJobIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("with out errors", func(t *testing.T) { t.Parallel() @@ -319,6 +327,7 @@ func TestLoader_JobsByExternalJobIDs(t *testing.T) { func TestLoader_EthTransactionsAttempts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") txStore := evmtxmgrmocks.NewEvmTxStore(t) app := coremocks.NewApplication(t) @@ -353,6 +362,7 @@ func TestLoader_EthTransactionsAttempts(t *testing.T) { func TestLoader_SpecErrorsByJobID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("without errors", func(t *testing.T) { t.Parallel() @@ -404,6 +414,7 @@ func TestLoader_SpecErrorsByJobID(t *testing.T) { func TestLoader_loadByEthTransactionID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") txStore := evmtxmgrmocks.NewEvmTxStore(t) app := coremocks.NewApplication(t) diff --git a/core/web/log_controller_test.go b/core/web/log_controller_test.go index 53900297c6d..85f36cb82b7 100644 --- a/core/web/log_controller_test.go +++ b/core/web/log_controller_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/toml" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -32,6 +33,7 @@ type testCase struct { func TestLogController_GetLogConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Log.Level = ptr(toml.LogLevel(zapcore.WarnLevel)) @@ -65,6 +67,7 @@ func TestLogController_GetLogConfig(t *testing.T) { func TestLogController_PatchLogConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") sqlTrue := true sqlFalse := false diff --git a/core/web/loop_registry_internal_test.go b/core/web/loop_registry_internal_test.go index 925637f1575..e89ed5ec292 100644 --- a/core/web/loop_registry_internal_test.go +++ b/core/web/loop_registry_internal_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/plugins" ) @@ -35,6 +36,7 @@ func newResponseWriter() *responseWriter { } func TestLoopRegistryServer_CantWriteToResponse(t *testing.T) { + tests.BelongsToCISuite(t, "unit") l, o := logger.TestLoggerObserved(t, zap.ErrorLevel) s := &LoopRegistryServer{ exposedPromPort: 1, @@ -50,6 +52,7 @@ func TestLoopRegistryServer_CantWriteToResponse(t *testing.T) { } func TestLoopRegistryServer_CantMarshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") l, o := logger.TestLoggerObserved(t, zap.ErrorLevel) s := &LoopRegistryServer{ exposedPromPort: 1, diff --git a/core/web/loop_registry_test.go b/core/web/loop_registry_test.go index b62ae9cb341..594792313c1 100644 --- a/core/web/loop_registry_test.go +++ b/core/web/loop_registry_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/freeport" "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -63,6 +64,7 @@ func (m *mockLoopImpl) run() { } func TestLoopRegistry(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.OCR.Enabled = ptr(true) diff --git a/core/web/ocr2_keys_controller_test.go b/core/web/ocr2_keys_controller_test.go index e3f0adfc196..ac7c7d360da 100644 --- a/core/web/ocr2_keys_controller_test.go +++ b/core/web/ocr2_keys_controller_test.go @@ -15,9 +15,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCR2KeysController_Index_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, OCRKeyStore := setupOCR2KeysControllerTests(t) keys, _ := OCRKeyStore.GetAll() @@ -35,6 +38,7 @@ func TestOCR2KeysController_Index_HappyPath(t *testing.T) { } func TestOCR2KeysController_Create_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, OCRKeyStore := setupOCR2KeysControllerTests(t) for _, test := range []struct { @@ -72,6 +76,7 @@ func TestOCR2KeysController_Create_HappyPath(t *testing.T) { } func TestOCR2KeysController_Delete_NonExistentOCRKeyID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, _ := setupOCR2KeysControllerTests(t) nonExistentOCRKeyID := "eb81f4a35033ac8dd68b9d33a039a713d6fd639af6852b81f47ffeda1c95de54" @@ -81,6 +86,7 @@ func TestOCR2KeysController_Delete_NonExistentOCRKeyID(t *testing.T) { } func TestOCR2KeysController_Delete_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, OCRKeyStore := setupOCR2KeysControllerTests(t) diff --git a/core/web/ocr_keys_controller_test.go b/core/web/ocr_keys_controller_test.go index a5a5fd62ab4..0de7da340d0 100644 --- a/core/web/ocr_keys_controller_test.go +++ b/core/web/ocr_keys_controller_test.go @@ -13,9 +13,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestOCRKeysController_Index_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, OCRKeyStore := setupOCRKeysControllerTests(t) keys, _ := OCRKeyStore.GetAll() @@ -33,6 +36,7 @@ func TestOCRKeysController_Index_HappyPath(t *testing.T) { } func TestOCRKeysController_Create_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, OCRKeyStore := setupOCRKeysControllerTests(t) keys, _ := OCRKeyStore.GetAll() @@ -60,6 +64,7 @@ func TestOCRKeysController_Create_HappyPath(t *testing.T) { } func TestOCRKeysController_Delete_NonExistentOCRKeyID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, _ := setupOCRKeysControllerTests(t) nonExistentOCRKeyID := "eb81f4a35033ac8dd68b9d33a039a713d6fd639af6852b81f47ffeda1c95de54" @@ -69,6 +74,7 @@ func TestOCRKeysController_Delete_NonExistentOCRKeyID(t *testing.T) { } func TestOCRKeysController_Delete_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, OCRKeyStore := setupOCRKeysControllerTests(t) diff --git a/core/web/p2p_keys_controller_test.go b/core/web/p2p_keys_controller_test.go index af1ff49b957..1b64e68f99f 100644 --- a/core/web/p2p_keys_controller_test.go +++ b/core/web/p2p_keys_controller_test.go @@ -14,10 +14,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestP2PKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupP2PKeysControllerTests(t) keys, _ := keyStore.P2P().GetAll() @@ -39,6 +42,7 @@ func TestP2PKeysController_Index_HappyPath(t *testing.T) { func TestP2PKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -68,6 +72,7 @@ func TestP2PKeysController_Create_HappyPath(t *testing.T) { func TestP2PKeysController_Delete_NonExistentP2PKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupP2PKeysControllerTests(t) @@ -79,6 +84,7 @@ func TestP2PKeysController_Delete_NonExistentP2PKeyID(t *testing.T) { func TestP2PKeysController_Delete_InvalidPeerID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupP2PKeysControllerTests(t) @@ -90,6 +96,7 @@ func TestP2PKeysController_Delete_InvalidPeerID(t *testing.T) { func TestP2PKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupP2PKeysControllerTests(t) diff --git a/core/web/ping_controller_test.go b/core/web/ping_controller_test.go index d5b278503bb..1bedfdcb38c 100644 --- a/core/web/ping_controller_test.go +++ b/core/web/ping_controller_test.go @@ -15,10 +15,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestPingController_Show_APICredentials(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -34,6 +37,7 @@ func TestPingController_Show_APICredentials(t *testing.T) { func TestPingController_Show_ExternalInitiatorCredentials(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -73,6 +77,7 @@ func TestPingController_Show_ExternalInitiatorCredentials(t *testing.T) { func TestPingController_Show_NoCredentials(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) diff --git a/core/web/pipeline_job_spec_errors_controller_test.go b/core/web/pipeline_job_spec_errors_controller_test.go index 9729bfac51d..122b4f01441 100644 --- a/core/web/pipeline_job_spec_errors_controller_test.go +++ b/core/web/pipeline_job_spec_errors_controller_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestPipelineJobSpecErrorsController_Delete_2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app, client, _, jID, _, _ := setupJobSpecsControllerTestsWithJobs(t) description := "job spec error description" @@ -49,6 +51,7 @@ func TestPipelineJobSpecErrorsController_Delete_2(t *testing.T) { } func TestPipelineJobSpecErrorsController_Delete_NotFound(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") _, client, _, _, _, _ := setupJobSpecsControllerTestsWithJobs(t) resp, cleanup := client.Delete("/v2/pipeline/job_spec_errors/1") diff --git a/core/web/pipeline_runs_controller_test.go b/core/web/pipeline_runs_controller_test.go index 395298d81bb..040482baa9b 100644 --- a/core/web/pipeline_runs_controller_test.go +++ b/core/web/pipeline_runs_controller_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/freeport" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -33,6 +34,7 @@ import ( func TestPipelineRunsController_CreateWithBody_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -89,6 +91,7 @@ func TestPipelineRunsController_CreateWithBody_HappyPath(t *testing.T) { func TestPipelineRunsController_CreateNoBody_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -149,6 +152,7 @@ func TestPipelineRunsController_CreateNoBody_HappyPath(t *testing.T) { } func TestPipelineRunsController_Index_GlobalHappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, jobID, runIDs := setupPipelineRunsControllerTests(t) url := url.URL{Path: "/v2/pipeline/runs"} @@ -177,6 +181,7 @@ func TestPipelineRunsController_Index_GlobalHappyPath(t *testing.T) { } func TestPipelineRunsController_Index_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, jobID, runIDs := setupPipelineRunsControllerTests(t) response, cleanup := client.Get("/v2/jobs/" + strconv.Itoa(int(jobID)) + "/runs") @@ -200,6 +205,7 @@ func TestPipelineRunsController_Index_HappyPath(t *testing.T) { } func TestPipelineRunsController_Index_Pagination(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, jobID, runIDs := setupPipelineRunsControllerTests(t) response, cleanup := client.Get("/v2/jobs/" + strconv.Itoa(int(jobID)) + "/runs?page=1&size=1") @@ -222,6 +228,7 @@ func TestPipelineRunsController_Index_Pagination(t *testing.T) { } func TestPipelineRunsController_Show_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, jobID, runIDs := setupPipelineRunsControllerTests(t) response, cleanup := client.Get("/v2/jobs/" + strconv.Itoa(int(jobID)) + "/runs/" + strconv.FormatInt(runIDs[0], 10)) @@ -242,6 +249,7 @@ func TestPipelineRunsController_Show_HappyPath(t *testing.T) { func TestPipelineRunsController_ShowRun_InvalidID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) client := app.NewHTTPClient(nil) diff --git a/core/web/presenters/bridges_test.go b/core/web/presenters/bridges_test.go index 746d361958a..6c72ffe1134 100644 --- a/core/web/presenters/bridges_test.go +++ b/core/web/presenters/bridges_test.go @@ -10,12 +10,14 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func TestBridgeResource(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") timestamp := time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) url, err := url.Parse("https://bridge.example.com/api") diff --git a/core/web/presenters/chain_msg_test.go b/core/web/presenters/chain_msg_test.go index 58192caef71..123a3d8165f 100644 --- a/core/web/presenters/chain_msg_test.go +++ b/core/web/presenters/chain_msg_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/solanatest" ) func TestSolanaMessageResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") id := "1" chainID := solanatest.RandomChainID() r := NewSolanaMsgResource(id, chainID) @@ -40,6 +42,7 @@ func TestSolanaMessageResource(t *testing.T) { } func TestCosmosMessageResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") id := "1" chainID := cosmostest.RandomChainID() contractID := "cosmos1p3ucd3ptpw902fluyjzkq3fflq4btddac9sa3s" diff --git a/core/web/presenters/csa_key_test.go b/core/web/presenters/csa_key_test.go index d514519fafd..291a7dd50fd 100644 --- a/core/web/presenters/csa_key_test.go +++ b/core/web/presenters/csa_key_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" ) func TestCSAKeyResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") keyV2, err := csakey.NewV2() require.NoError(t, err) diff --git a/core/web/presenters/eth_key_test.go b/core/web/presenters/eth_key_test.go index 06b3d2f6f83..aaab2aa8ac3 100644 --- a/core/web/presenters/eth_key_test.go +++ b/core/web/presenters/eth_key_test.go @@ -15,9 +15,12 @@ import ( "github.com/manyminds/api2go/jsonapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestETHKeyResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( now = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) addressStr = "0x2aCFF2ec69aa9945Ed84f4F281eCCF6911A3B0eD" diff --git a/core/web/presenters/eth_tx_test.go b/core/web/presenters/eth_tx_test.go index 40c329f5214..25aaa2922e0 100644 --- a/core/web/presenters/eth_tx_test.go +++ b/core/web/presenters/eth_tx_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/gas" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" @@ -19,6 +20,7 @@ import ( func TestEthTxResource(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") chainID := big.NewInt(54321) tx := txmgr.Tx{ diff --git a/core/web/presenters/evm_forwarder_test.go b/core/web/presenters/evm_forwarder_test.go index d49ff3f2ecb..e782517180a 100644 --- a/core/web/presenters/evm_forwarder_test.go +++ b/core/web/presenters/evm_forwarder_test.go @@ -11,12 +11,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/forwarders" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" ) func TestEVMForwarderResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ID = int64(1) address = utils.RandomAddress() diff --git a/core/web/presenters/job_test.go b/core/web/presenters/job_test.go index 5ebeffcdd6b..1556b80162e 100644 --- a/core/web/presenters/job_test.go +++ b/core/web/presenters/job_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evmassets "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -27,6 +28,8 @@ import ( ) func TestJob(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Used in multiple tests timestamp := time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) contractAddress, err := types.NewEIP55Address("0x9E40733cC9df84636505f4e6Db28DCa0dC5D1bba") @@ -1260,7 +1263,7 @@ func TestJob(t *testing.T) { }, want: ` { - "data": { + "data": { "type": "jobs", "id": "1", "attributes": { @@ -1299,7 +1302,7 @@ func TestJob(t *testing.T) { "jobID": 0, "dotDagSource": "" }, - "errors": [] + "errors": [] } } }`, diff --git a/core/web/presenters/node_test.go b/core/web/presenters/node_test.go index 91c8442aa14..f5fc3961170 100644 --- a/core/web/presenters/node_test.go +++ b/core/web/presenters/node_test.go @@ -9,9 +9,11 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNodeResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var nodeResource NodeResource state := "test" cfg := "cfg" diff --git a/core/web/presenters/p2p_key_test.go b/core/web/presenters/p2p_key_test.go index 2d6d307f207..bd5361998ed 100644 --- a/core/web/presenters/p2p_key_test.go +++ b/core/web/presenters/p2p_key_test.go @@ -9,10 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func TestP2PKeyResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) peerID := key.PeerID() peerIDStr := peerID.String() diff --git a/core/web/presenters/user_test.go b/core/web/presenters/user_test.go index ee3938cef47..ab672416f7e 100644 --- a/core/web/presenters/user_test.go +++ b/core/web/presenters/user_test.go @@ -8,10 +8,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/sessions" ) func TestUserResource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( ts = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) ) diff --git a/core/web/resolver/api_token_test.go b/core/web/resolver/api_token_test.go index d032a5c69a4..09f512c963b 100644 --- a/core/web/resolver/api_token_test.go +++ b/core/web/resolver/api_token_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/utils" webauth "github.com/smartcontractkit/chainlink/v2/core/web/auth" @@ -16,6 +17,7 @@ import ( func TestResolver_CreateAPIToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") defaultPassword := "my-password" mutation := ` @@ -173,6 +175,7 @@ func TestResolver_CreateAPIToken(t *testing.T) { func TestResolver_DeleteAPIToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") defaultPassword := "my-password" mutation := ` diff --git a/core/web/resolver/aptos_key_test.go b/core/web/resolver/aptos_key_test.go index e0dcb2a4194..b67edffa8b2 100644 --- a/core/web/resolver/aptos_key_test.go +++ b/core/web/resolver/aptos_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" ) func TestResolver_AptosKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetAptosKeys { diff --git a/core/web/resolver/bridge_test.go b/core/web/resolver/bridge_test.go index 5e24ec632d0..cb638f30782 100644 --- a/core/web/resolver/bridge_test.go +++ b/core/web/resolver/bridge_test.go @@ -12,12 +12,14 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/assets" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func Test_Bridges(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( query = ` @@ -86,6 +88,7 @@ func Test_Bridges(t *testing.T) { func Test_Bridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( query = ` @@ -163,6 +166,7 @@ func Test_Bridge(t *testing.T) { func Test_CreateBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( name = bridges.BridgeName("bridge1") @@ -243,6 +247,7 @@ func Test_CreateBridge(t *testing.T) { func Test_UpdateBridge(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( name = bridges.BridgeName("bridge1") @@ -361,6 +366,7 @@ func Test_UpdateBridge(t *testing.T) { func Test_DeleteBridgeMutation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") name := bridges.BridgeName("bridge1") diff --git a/core/web/resolver/chain_test.go b/core/web/resolver/chain_test.go index d5101dc5e75..0374eefc530 100644 --- a/core/web/resolver/chain_test.go +++ b/core/web/resolver/chain_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" evmtoml "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" chainlinkmocks "github.com/smartcontractkit/chainlink/v2/core/services/chainlink/mocks" @@ -20,6 +21,7 @@ import ( ) func TestResolver_Chains(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( chainID = *big.NewI(1) query = ` @@ -140,6 +142,7 @@ ResendAfterThreshold = '1h0m0s' } func TestResolver_Chain(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( chainID = *big.NewI(1) query = ` diff --git a/core/web/resolver/config_test.go b/core/web/resolver/config_test.go index f380e4db55a..66d9628b5e4 100644 --- a/core/web/resolver/config_test.go +++ b/core/web/resolver/config_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) @@ -25,6 +26,7 @@ var ( func TestResolver_ConfigV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query FetchConfigV2 { diff --git a/core/web/resolver/cosmos_key_test.go b/core/web/resolver/cosmos_key_test.go index c970edc0949..220c0b29651 100644 --- a/core/web/resolver/cosmos_key_test.go +++ b/core/web/resolver/cosmos_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" ) func TestResolver_CosmosKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetCosmosKeys { diff --git a/core/web/resolver/csa_keys_test.go b/core/web/resolver/csa_keys_test.go index ae7c1986c85..68d7b28d1f4 100644 --- a/core/web/resolver/csa_keys_test.go +++ b/core/web/resolver/csa_keys_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" ) @@ -20,6 +21,7 @@ type expectedKey struct { } func Test_CSAKeysQuery(t *testing.T) { + tests.BelongsToCISuite(t, "unit") query := ` query GetCSAKeys { csaKeys { @@ -73,6 +75,7 @@ func Test_CSAKeysQuery(t *testing.T) { } func Test_CreateCSAKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") query := ` mutation CreateCSAKey { createCSAKey { @@ -141,6 +144,7 @@ func Test_CreateCSAKey(t *testing.T) { } func Test_DeleteCSAKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") query := ` mutation DeleteCSAKey($id: ID!) { deleteCSAKey(id: $id) { diff --git a/core/web/resolver/eth_key_test.go b/core/web/resolver/eth_key_test.go index db043cf5f28..60e676102f9 100644 --- a/core/web/resolver/eth_key_test.go +++ b/core/web/resolver/eth_key_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/config" @@ -38,6 +39,7 @@ func (m *mockEvmConfig) GasEstimator() config.GasEstimator { return m.gasEstimat func TestResolver_ETHKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetETHKeys { diff --git a/core/web/resolver/eth_transaction_test.go b/core/web/resolver/eth_transaction_test.go index eaf8bfc48db..996ad62d385 100644 --- a/core/web/resolver/eth_transaction_test.go +++ b/core/web/resolver/eth_transaction_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink-evm/pkg/gas" @@ -28,6 +29,7 @@ import ( func TestResolver_EthTransaction(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetEthTransaction($hash: ID!) { @@ -243,6 +245,7 @@ func TestResolver_EthTransaction(t *testing.T) { func TestResolver_EthTransactions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetEthTransactions { @@ -349,6 +352,7 @@ func TestResolver_EthTransactions(t *testing.T) { func TestResolver_EthTransactionsAttempts(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetEthTransactionsAttempts { diff --git a/core/web/resolver/features_test.go b/core/web/resolver/features_test.go index 4e8f9e8c26c..64449d6c0a5 100644 --- a/core/web/resolver/features_test.go +++ b/core/web/resolver/features_test.go @@ -4,11 +4,13 @@ import ( "context" "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) func Test_ToFeatures(t *testing.T) { + tests.BelongsToCISuite(t, "unit") query := ` { features { diff --git a/core/web/resolver/feeds_manager_chain_config_test.go b/core/web/resolver/feeds_manager_chain_config_test.go index fa57ee7bea7..071ecdb3973 100644 --- a/core/web/resolver/feeds_manager_chain_config_test.go +++ b/core/web/resolver/feeds_manager_chain_config_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/feeds" "github.com/smartcontractkit/chainlink/v2/core/utils/stringutils" ) func Test_CreateFeedsManagerChainConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgrID = int64(100) cfgID = int64(1) @@ -491,6 +493,7 @@ func Test_CreateFeedsManagerChainConfig(t *testing.T) { } func Test_DeleteFeedsManagerChainConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( cfgID = int64(1) @@ -579,6 +582,7 @@ func Test_DeleteFeedsManagerChainConfig(t *testing.T) { } func Test_UpdateFeedsManagerChainConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( cfgID = int64(1) peerID = null.StringFrom("p2p_12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw") diff --git a/core/web/resolver/feeds_manager_test.go b/core/web/resolver/feeds_manager_test.go index e00df1be8e4..4a55f6e994d 100644 --- a/core/web/resolver/feeds_manager_test.go +++ b/core/web/resolver/feeds_manager_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/feeds" "github.com/smartcontractkit/chainlink/v2/core/utils/crypto" ) func Test_FeedsManagers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( query = ` query GetFeedsManagers { @@ -87,6 +89,7 @@ func Test_FeedsManagers(t *testing.T) { } func Test_FeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgrID = int64(1) query = ` @@ -161,6 +164,7 @@ func Test_FeedsManager(t *testing.T) { } func Test_CreateFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgrID = int64(1) name = "manager1" @@ -334,6 +338,7 @@ func Test_CreateFeedsManager(t *testing.T) { } func Test_UpdateFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgrID = int64(1) name = "manager1" @@ -463,6 +468,7 @@ func Test_UpdateFeedsManager(t *testing.T) { } func Test_EnableFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgrID = int64(1) name = "manager1" @@ -570,6 +576,7 @@ func Test_EnableFeedsManager(t *testing.T) { } func Test_DisableFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgrID = int64(1) name = "manager1" diff --git a/core/web/resolver/job_error_test.go b/core/web/resolver/job_error_test.go index 6f47c4e1145..0031767e2ea 100644 --- a/core/web/resolver/job_error_test.go +++ b/core/web/resolver/job_error_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/utils/stringutils" ) @@ -19,6 +20,7 @@ import ( // so we test the job error resolvers by fetching a job by id. func TestResolver_JobErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) errorID = int64(200) @@ -77,6 +79,7 @@ func TestResolver_JobErrors(t *testing.T) { func TestResolver_DismissJobError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") id := int64(1) mutation := ` diff --git a/core/web/resolver/job_proposal_spec_test.go b/core/web/resolver/job_proposal_spec_test.go index cc3421d0f85..73f8788ba3b 100644 --- a/core/web/resolver/job_proposal_spec_test.go +++ b/core/web/resolver/job_proposal_spec_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/feeds" ) func TestResolver_ApproveJobProposalSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation ApproveJobProposalSpec($id: ID!) { @@ -121,6 +123,7 @@ func TestResolver_ApproveJobProposalSpec(t *testing.T) { func TestResolver_CancelJobProposalSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation CancelJobProposalSpec($id: ID!) { @@ -208,6 +211,7 @@ func TestResolver_CancelJobProposalSpec(t *testing.T) { func TestResolver_RejectJobProposalSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation RejectJobProposalSpec($id: ID!) { @@ -295,6 +299,7 @@ func TestResolver_RejectJobProposalSpec(t *testing.T) { func TestResolver_UpdateJobProposalSpecDefinition(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation UpdateJobProposalSpecDefinition($id: ID!, $input: UpdateJobProposalSpecDefinitionInput!) { @@ -387,6 +392,7 @@ func TestResolver_UpdateJobProposalSpecDefinition(t *testing.T) { // query, we rely on the GetJobProposal query to fetch the nested specs func TestResolver_GetJobProposal_Spec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") timestamp := time.Date(2021, 1, 1, 0, 0, 0, 0, time.UTC) query := ` diff --git a/core/web/resolver/job_proposal_test.go b/core/web/resolver/job_proposal_test.go index 3c09435e56e..1bcea0645ca 100644 --- a/core/web/resolver/job_proposal_test.go +++ b/core/web/resolver/job_proposal_test.go @@ -10,11 +10,13 @@ import ( "github.com/stretchr/testify/mock" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/feeds" ) func TestResolver_GetJobProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetJobProposal { diff --git a/core/web/resolver/job_run_test.go b/core/web/resolver/job_run_test.go index 1225001f6eb..510cdf4be08 100644 --- a/core/web/resolver/job_run_test.go +++ b/core/web/resolver/job_run_test.go @@ -12,6 +12,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/webhook" @@ -20,6 +21,7 @@ import ( func TestQuery_PaginatedJobRuns(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetJobsRuns { @@ -86,6 +88,7 @@ func TestQuery_PaginatedJobRuns(t *testing.T) { func TestResolver_JobRun(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetJobRun($id: ID!) { @@ -237,6 +240,7 @@ func TestResolver_JobRun(t *testing.T) { func TestResolver_RunJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation RunJob($id: ID!) { diff --git a/core/web/resolver/job_test.go b/core/web/resolver/job_test.go index 14273507ac2..28db97b9f40 100644 --- a/core/web/resolver/job_test.go +++ b/core/web/resolver/job_test.go @@ -16,6 +16,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" clnull "github.com/smartcontractkit/chainlink/v2/core/null" @@ -29,6 +30,7 @@ import ( // This tests the main fields on the job results. Embedded spec testing is done // in the `spec_test` file func TestResolver_Jobs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( externalJobID = uuid.MustParse(("00000000-0000-0000-0000-000000000001")) @@ -139,6 +141,7 @@ func TestResolver_Jobs(t *testing.T) { } func TestResolver_Job(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) externalJobID = uuid.MustParse(("00000000-0000-0000-0000-000000000001")) @@ -293,6 +296,7 @@ func TestResolver_Job(t *testing.T) { func TestResolver_CreateJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation CreateJob($input: CreateJobInput!) { @@ -403,6 +407,7 @@ func TestResolver_CreateJob(t *testing.T) { func TestResolver_DeleteJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") id := int32(123) extJID := uuid.New() diff --git a/core/web/resolver/log_test.go b/core/web/resolver/log_test.go index 7aa242c025a..9eadf94869b 100644 --- a/core/web/resolver/log_test.go +++ b/core/web/resolver/log_test.go @@ -9,11 +9,13 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" ) func TestResolver_SetSQLLogging(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation SetSQLLogging($input: SetSQLLoggingInput!) { @@ -65,6 +67,7 @@ func (d *databaseConfig) LogSQL() bool { return d.logSQL } func TestResolver_SQLLogging(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetSQLLogging { @@ -108,6 +111,7 @@ func (l *log) Level() zapcore.Level { func TestResolver_GlobalLogLevel(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetGlobalLogLevel { @@ -146,6 +150,7 @@ func TestResolver_GlobalLogLevel(t *testing.T) { func TestResolver_SetGlobalLogLevel(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation SetGlobalLogLevel($level: LogLevel!) { diff --git a/core/web/resolver/node_test.go b/core/web/resolver/node_test.go index 7d04616fb83..41ab9a9532c 100644 --- a/core/web/resolver/node_test.go +++ b/core/web/resolver/node_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" chainlinkmocks "github.com/smartcontractkit/chainlink/v2/core/services/chainlink/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/testutils" @@ -16,6 +17,7 @@ import ( func TestResolver_Nodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetNodes { @@ -103,6 +105,7 @@ func TestResolver_Nodes(t *testing.T) { func Test_NodeQuery(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetNode { diff --git a/core/web/resolver/ocr2_keys_test.go b/core/web/resolver/ocr2_keys_test.go index 48a227a9026..9d5f2d9b503 100644 --- a/core/web/resolver/ocr2_keys_test.go +++ b/core/web/resolver/ocr2_keys_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" @@ -20,6 +21,7 @@ import ( func TestResolver_GetOCR2KeyBundles(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetOCR2KeyBundles { @@ -107,6 +109,7 @@ func TestResolver_GetOCR2KeyBundles(t *testing.T) { func TestResolver_CreateOCR2KeyBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation CreateOCR2KeyBundle($chainType: OCR2ChainType!) { @@ -190,6 +193,7 @@ func TestResolver_CreateOCR2KeyBundle(t *testing.T) { func TestResolver_DeleteOCR2KeyBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fakeKey := ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "evm") diff --git a/core/web/resolver/ocr_test.go b/core/web/resolver/ocr_test.go index 6a6cfea3d4d..599d0b8a145 100644 --- a/core/web/resolver/ocr_test.go +++ b/core/web/resolver/ocr_test.go @@ -9,12 +9,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ) func TestResolver_GetOCRKeyBundles(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetOCRKeyBundles { @@ -70,6 +72,7 @@ func TestResolver_GetOCRKeyBundles(t *testing.T) { func TestResolver_OCRCreateBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation CreateOCRKeyBundle { @@ -121,6 +124,7 @@ func TestResolver_OCRCreateBundle(t *testing.T) { func TestResolver_OCRDeleteBundle(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fakeKey := ocrkey.MustNewV2XXXTestingOnly(big.NewInt(1)) diff --git a/core/web/resolver/p2p_test.go b/core/web/resolver/p2p_test.go index 7b53f9d34df..3e8e736d659 100644 --- a/core/web/resolver/p2p_test.go +++ b/core/web/resolver/p2p_test.go @@ -10,12 +10,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) func TestResolver_GetP2PKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetP2PKeys { @@ -69,6 +71,7 @@ func TestResolver_GetP2PKeys(t *testing.T) { func TestResolver_CreateP2PKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` mutation CreateP2PKey { @@ -118,6 +121,7 @@ func TestResolver_CreateP2PKey(t *testing.T) { func TestResolver_DeleteP2PKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") fakeKey := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) diff --git a/core/web/resolver/solana_key_test.go b/core/web/resolver/solana_key_test.go index 9ef5cd85a42..38394b7c18f 100644 --- a/core/web/resolver/solana_key_test.go +++ b/core/web/resolver/solana_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/solkey" ) func TestResolver_SolanaKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetSolanaKeys { diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 56b7bb8b1c9..2d321c141d5 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -30,6 +31,7 @@ import ( // we test the spec resolvers by fetching a job by id. func TestResolver_CronSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -84,6 +86,7 @@ func TestResolver_CronSpec(t *testing.T) { } func TestResolver_DirectRequestSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) requesterAddress = common.HexToAddress("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") @@ -150,6 +153,7 @@ func TestResolver_DirectRequestSpec(t *testing.T) { } func TestResolver_FluxMonitorSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -299,6 +303,7 @@ func TestResolver_FluxMonitorSpec(t *testing.T) { } func TestResolver_KeeperSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) fromAddress = common.HexToAddress("0x3cCad4715152693fE3BC4460591e3D3Fbd071b42") @@ -359,6 +364,7 @@ func TestResolver_KeeperSpec(t *testing.T) { } func TestResolver_OCRSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -456,6 +462,7 @@ func TestResolver_OCRSpec(t *testing.T) { } func TestResolver_OCR2Spec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -576,6 +583,7 @@ func TestResolver_OCR2Spec(t *testing.T) { } func TestResolver_VRFSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -686,6 +694,7 @@ func TestResolver_VRFSpec(t *testing.T) { } func TestResolver_WebhookSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -734,6 +743,7 @@ func TestResolver_WebhookSpec(t *testing.T) { } func TestResolver_BlockhashStoreSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -842,6 +852,7 @@ func TestResolver_BlockhashStoreSpec(t *testing.T) { } func TestResolver_BlockHeaderFeederSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -946,6 +957,7 @@ func TestResolver_BlockHeaderFeederSpec(t *testing.T) { } func TestResolver_BootstrapSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -1018,6 +1030,7 @@ func TestResolver_BootstrapSpec(t *testing.T) { } func TestResolver_WorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -1072,6 +1085,7 @@ func TestResolver_WorkflowSpec(t *testing.T) { } func TestResolver_GatewaySpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -1130,6 +1144,7 @@ func TestResolver_GatewaySpec(t *testing.T) { } func TestResolver_StandardCapabilitiesSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id = int32(1) ) @@ -1187,6 +1202,7 @@ func TestResolver_StandardCapabilitiesSpec(t *testing.T) { } func TestResolver_StreamSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( id1 = int32(1) id2 = int32(2) diff --git a/core/web/resolver/starknet_key_test.go b/core/web/resolver/starknet_key_test.go index 42d5943a2c4..830cb039c2a 100644 --- a/core/web/resolver/starknet_key_test.go +++ b/core/web/resolver/starknet_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/starkkey" ) func TestResolver_StarkNetKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetStarkNetKeys { diff --git a/core/web/resolver/sui_key_test.go b/core/web/resolver/sui_key_test.go index c1b66ad100c..84bf38d5d98 100644 --- a/core/web/resolver/sui_key_test.go +++ b/core/web/resolver/sui_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/suikey" ) func TestResolver_SuiKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetSuiKeys { diff --git a/core/web/resolver/ton_key_test.go b/core/web/resolver/ton_key_test.go index 7e286cd4d26..19a729a7de8 100644 --- a/core/web/resolver/ton_key_test.go +++ b/core/web/resolver/ton_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/tonkey" ) func TestResolver_TONKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetTONKeys { diff --git a/core/web/resolver/tron_key_test.go b/core/web/resolver/tron_key_test.go index 3b2b7892f50..08b3b121540 100644 --- a/core/web/resolver/tron_key_test.go +++ b/core/web/resolver/tron_key_test.go @@ -8,12 +8,14 @@ import ( gqlerrors "github.com/graph-gophers/graphql-go/errors" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/tronkey" ) func TestResolver_TronKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetTronKeys { diff --git a/core/web/resolver/user_test.go b/core/web/resolver/user_test.go index deb958055a1..5af4f980401 100644 --- a/core/web/resolver/user_test.go +++ b/core/web/resolver/user_test.go @@ -8,12 +8,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/utils" "github.com/smartcontractkit/chainlink/v2/core/web/auth" ) func TestResolver_UpdateUserPassword(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation UpdateUserPassword($input: UpdatePasswordInput!) { diff --git a/core/web/resolver/vrf_test.go b/core/web/resolver/vrf_test.go index 7001c68467d..0f345f61de3 100644 --- a/core/web/resolver/vrf_test.go +++ b/core/web/resolver/vrf_test.go @@ -11,12 +11,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey" ) func TestResolver_GetVRFKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetVRFKey($id: ID!) { @@ -104,6 +106,7 @@ func TestResolver_GetVRFKey(t *testing.T) { func TestResolver_GetVRFKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") query := ` query GetVRFKeys { @@ -162,6 +165,7 @@ func TestResolver_GetVRFKeys(t *testing.T) { func TestResolver_CreateVRFKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation CreateVRFKey { @@ -214,6 +218,7 @@ func TestResolver_CreateVRFKey(t *testing.T) { func TestResolver_DeleteVRFKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mutation := ` mutation DeleteVRFKey($id: ID!) { diff --git a/core/web/router_test.go b/core/web/router_test.go index be27e34a7d3..9c511081e37 100644 --- a/core/web/router_test.go +++ b/core/web/router_test.go @@ -17,9 +17,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTokenAuthRequired_NoCredentials(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(ctx)) @@ -38,6 +41,7 @@ func TestTokenAuthRequired_NoCredentials(t *testing.T) { } func TestTokenAuthRequired_SessionCredentials(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -53,6 +57,7 @@ func TestTokenAuthRequired_SessionCredentials(t *testing.T) { } func TestTokenAuthRequired_TokenCredentials(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(ctx)) @@ -86,6 +91,7 @@ func TestTokenAuthRequired_TokenCredentials(t *testing.T) { } func TestTokenAuthRequired_BadTokenCredentials(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(ctx)) @@ -119,6 +125,7 @@ func TestTokenAuthRequired_BadTokenCredentials(t *testing.T) { } func TestSessions_RateLimited(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(ctx)) @@ -148,6 +155,7 @@ func TestSessions_RateLimited(t *testing.T) { } func TestRouter_LargePOSTBody(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(ctx)) @@ -168,6 +176,7 @@ func TestRouter_LargePOSTBody(t *testing.T) { } func TestRouter_GinHelmetHeaders(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(ctx)) diff --git a/core/web/sessions_controller_test.go b/core/web/sessions_controller_test.go index b43f2c6803b..050b9de2957 100644 --- a/core/web/sessions_controller_test.go +++ b/core/web/sessions_controller_test.go @@ -18,10 +18,13 @@ import ( "github.com/onsi/gomega" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestSessionsController_Create(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -88,6 +91,7 @@ func mustInsertSession(t *testing.T, ds sqlutil.DataSource, session *sessions.Se func TestSessionsController_Create_ReapSessions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -125,6 +129,7 @@ func TestSessionsController_Create_ReapSessions(t *testing.T) { func TestSessionsController_Destroy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -170,6 +175,7 @@ func TestSessionsController_Destroy(t *testing.T) { func TestSessionsController_Destroy_ReapSessions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client := clhttptest.NewTestLocalOnlyHTTPClient() diff --git a/core/web/solana_keys_controller_test.go b/core/web/solana_keys_controller_test.go index 5654b26456b..af07f3e8d1a 100644 --- a/core/web/solana_keys_controller_test.go +++ b/core/web/solana_keys_controller_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" @@ -17,6 +18,7 @@ import ( func TestSolanaKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupSolanaKeysControllerTests(t) keys, _ := keyStore.Solana().GetAll() @@ -37,6 +39,7 @@ func TestSolanaKeysController_Index_HappyPath(t *testing.T) { func TestSolanaKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -63,6 +66,7 @@ func TestSolanaKeysController_Create_HappyPath(t *testing.T) { func TestSolanaKeysController_Delete_NonExistentSolanaKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupSolanaKeysControllerTests(t) @@ -74,6 +78,7 @@ func TestSolanaKeysController_Delete_NonExistentSolanaKeyID(t *testing.T) { func TestSolanaKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupSolanaKeysControllerTests(t) diff --git a/core/web/starknet_keys_controller_test.go b/core/web/starknet_keys_controller_test.go index cca1cfbd67a..ce8622b6ab2 100644 --- a/core/web/starknet_keys_controller_test.go +++ b/core/web/starknet_keys_controller_test.go @@ -13,10 +13,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestStarkNetKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupStarkNetKeysControllerTests(t) keys, _ := keyStore.StarkNet().GetAll() @@ -37,6 +40,7 @@ func TestStarkNetKeysController_Index_HappyPath(t *testing.T) { func TestStarkNetKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -63,6 +67,7 @@ func TestStarkNetKeysController_Create_HappyPath(t *testing.T) { func TestStarkNetKeysController_Delete_NonExistentStarkNetKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupStarkNetKeysControllerTests(t) @@ -74,6 +79,7 @@ func TestStarkNetKeysController_Delete_NonExistentStarkNetKeyID(t *testing.T) { func TestStarkNetKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupStarkNetKeysControllerTests(t) diff --git a/core/web/sui_keys_controller_test.go b/core/web/sui_keys_controller_test.go index 97eebc3ab68..20f07475c26 100644 --- a/core/web/sui_keys_controller_test.go +++ b/core/web/sui_keys_controller_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" @@ -17,6 +18,7 @@ import ( func TestSuiKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupSuiKeysControllerTests(t) keys, _ := keyStore.Sui().GetAll() @@ -37,6 +39,7 @@ func TestSuiKeysController_Index_HappyPath(t *testing.T) { func TestSuiKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -63,6 +66,7 @@ func TestSuiKeysController_Create_HappyPath(t *testing.T) { func TestSuiKeysController_Delete_NonExistentSuiKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupSuiKeysControllerTests(t) @@ -74,6 +78,7 @@ func TestSuiKeysController_Delete_NonExistentSuiKeyID(t *testing.T) { func TestSuiKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupSuiKeysControllerTests(t) diff --git a/core/web/ton_keys_controller_test.go b/core/web/ton_keys_controller_test.go index 685a4a60b65..796a9e68423 100644 --- a/core/web/ton_keys_controller_test.go +++ b/core/web/ton_keys_controller_test.go @@ -12,10 +12,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/web/presenters" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTONKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupTONKeysControllerTests(t) keys, _ := keyStore.TON().GetAll() @@ -36,6 +39,7 @@ func TestTONKeysController_Index_HappyPath(t *testing.T) { func TestTONKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -64,6 +68,7 @@ func TestTONKeysController_Create_HappyPath(t *testing.T) { func TestTONKeysController_Delete_NonExistentTONKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupTONKeysControllerTests(t) @@ -75,6 +80,7 @@ func TestTONKeysController_Delete_NonExistentTONKeyID(t *testing.T) { func TestTONKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupTONKeysControllerTests(t) diff --git a/core/web/tron_keys_controller_test.go b/core/web/tron_keys_controller_test.go index 5628d7ac2dc..5e91ec4f7a5 100644 --- a/core/web/tron_keys_controller_test.go +++ b/core/web/tron_keys_controller_test.go @@ -12,10 +12,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/web/presenters" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTronKeysController_Index_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupTronKeysControllerTests(t) keys, _ := keyStore.Tron().GetAll() @@ -36,6 +39,7 @@ func TestTronKeysController_Index_HappyPath(t *testing.T) { func TestTronKeysController_Create_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -62,6 +66,7 @@ func TestTronKeysController_Create_HappyPath(t *testing.T) { func TestTronKeysController_Delete_NonExistentTronKeyID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") client, _ := setupTronKeysControllerTests(t) @@ -73,6 +78,7 @@ func TestTronKeysController_Delete_NonExistentTronKeyID(t *testing.T) { func TestTronKeysController_Delete_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) client, keyStore := setupTronKeysControllerTests(t) diff --git a/core/web/user_controller_test.go b/core/web/user_controller_test.go index 38cb6948ff1..ad807a5f5a3 100644 --- a/core/web/user_controller_test.go +++ b/core/web/user_controller_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -21,6 +22,7 @@ import ( func TestUserController_UpdatePassword(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -86,6 +88,7 @@ func TestUserController_UpdatePassword(t *testing.T) { func TestUserController_CreateUser(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -180,6 +183,7 @@ func TestUserController_CreateUser(t *testing.T) { func TestUserController_UpdateRole(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -227,6 +231,7 @@ func TestUserController_UpdateRole(t *testing.T) { func TestUserController_DeleteUser(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -254,6 +259,7 @@ func TestUserController_DeleteUser(t *testing.T) { func TestUserController_NewAPIToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -275,6 +281,7 @@ func TestUserController_NewAPIToken(t *testing.T) { func TestUserController_NewAPIToken_unauthorized(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -291,6 +298,7 @@ func TestUserController_NewAPIToken_unauthorized(t *testing.T) { func TestUserController_DeleteAPIKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) @@ -308,6 +316,7 @@ func TestUserController_DeleteAPIKey(t *testing.T) { func TestUserController_DeleteAPIKey_unauthorized(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := cltest.NewApplicationEVMDisabled(t) require.NoError(t, app.Start(testutils.Context(t))) diff --git a/core/web/vault_controller_test.go b/core/web/vault_controller_test.go index e3d18fd60d7..73cb415fb0a 100644 --- a/core/web/vault_controller_test.go +++ b/core/web/vault_controller_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/smdkg/dkgocr/tdh2shim" "github.com/smartcontractkit/smdkg/dummydkg" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" @@ -41,6 +42,7 @@ func setupVaultControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore } func TestVaultController_VerifyDKGResult_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, keystore, orm := setupVaultControllerTests(t) keys, err := keystore.DKGRecipient().GetAll() @@ -97,6 +99,7 @@ func TestVaultController_VerifyDKGResult_HappyPath(t *testing.T) { } func TestVaultController_VerifyDKGResult_WrongKey(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, keystore, orm := setupVaultControllerTests(t) keys, err := keystore.DKGRecipient().GetAll() @@ -158,6 +161,7 @@ func TestVaultController_VerifyDKGResult_WrongKey(t *testing.T) { } func TestVaultController_VerifyDKGResult_CantFindResultForInstanceID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, _, _ := setupVaultControllerTests(t) bdata, err := json.Marshal(web.VerifyDKGResultRequest{ @@ -172,6 +176,7 @@ func TestVaultController_VerifyDKGResult_CantFindResultForInstanceID(t *testing. } func TestVaultController_VerifyDKGResult_MissingInstanceIDOrPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, _, _ := setupVaultControllerTests(t) bdata, err := json.Marshal(web.VerifyDKGResultRequest{ @@ -194,6 +199,7 @@ func TestVaultController_VerifyDKGResult_MissingInstanceIDOrPublicKey(t *testing } func TestVaultController_ExportDKGResult(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, keystore, orm := setupVaultControllerTests(t) keys, err := keystore.DKGRecipient().GetAll() diff --git a/core/web/workflow_keys_controller_test.go b/core/web/workflow_keys_controller_test.go index 8d877ae57d5..aa4ef280dee 100644 --- a/core/web/workflow_keys_controller_test.go +++ b/core/web/workflow_keys_controller_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func setupWorkflowKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore.Master) { @@ -29,6 +31,7 @@ func setupWorkflowKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, k } func TestWorkflowKeysController_Index_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") client, keyStore := setupWorkflowKeysControllerTests(t) keys, err := keyStore.Workflow().GetAll() require.NoError(t, err) diff --git a/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go b/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go index cd38e4ac21e..b930fce3dcd 100644 --- a/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go +++ b/deployment/ccip/changeset/solana_v0_1_1/cs_ops_test.go @@ -5,9 +5,10 @@ import ( "time" chain_selectors "github.com/smartcontractkit/chain-selectors" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + cldf_chain "github.com/smartcontractkit/chainlink-deployments-framework/chain" cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment" diff --git a/deployment/common/changeset/solana/grant_role_timelock_test.go b/deployment/common/changeset/solana/grant_role_timelock_test.go index 8a3bd156962..6f256c03e48 100644 --- a/deployment/common/changeset/solana/grant_role_timelock_test.go +++ b/deployment/common/changeset/solana/grant_role_timelock_test.go @@ -6,11 +6,12 @@ import ( "time" "github.com/gagliardetto/solana-go" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" mcmssolanasdk "github.com/smartcontractkit/mcms/sdk/solana" mcmstypes "github.com/smartcontractkit/mcms/types" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + timelockbindings "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/v0_1_1/timelock" "github.com/smartcontractkit/chainlink-deployments-framework/engine/test/runtime" diff --git a/deployment/environment_test.go b/deployment/environment_test.go index c15be6c7d87..d79d5800aab 100644 --- a/deployment/environment_test.go +++ b/deployment/environment_test.go @@ -10,12 +10,13 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" chain_selectors "github.com/smartcontractkit/chain-selectors" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" types2 "github.com/smartcontractkit/libocr/offchainreporting2/types" types3 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) diff --git a/deployment/evm_kmsclient_test.go b/deployment/evm_kmsclient_test.go index f4bf2dd9cbb..6c38a60c66a 100644 --- a/deployment/evm_kmsclient_test.go +++ b/deployment/evm_kmsclient_test.go @@ -4,8 +4,9 @@ import ( "encoding/hex" "testing" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestKMSToEthSigConversion(t *testing.T) { diff --git a/integration-tests/smoke/ccip/ccip_sui_token_transfer_test.go b/integration-tests/smoke/ccip/ccip_sui_token_transfer_test.go index 4780b202bd3..b54ba8717bb 100644 --- a/integration-tests/smoke/ccip/ccip_sui_token_transfer_test.go +++ b/integration-tests/smoke/ccip/ccip_sui_token_transfer_test.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" chain_selectors "github.com/smartcontractkit/chain-selectors" + module_lock_release_token_pool "github.com/smartcontractkit/chainlink-sui/bindings/generated/ccip/ccip_token_pools/lock_release_token_pool" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router" diff --git a/plugins/cmd_test.go b/plugins/cmd_test.go index 1535bc0bba7..4287e9d0c87 100644 --- a/plugins/cmd_test.go +++ b/plugins/cmd_test.go @@ -6,9 +6,11 @@ import ( "testing" "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestNewCmdFactory_RegisterSuccess(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockRegister := func(id string) (*RegisteredLoop, error) { return &RegisteredLoop{EnvCfg: loop.EnvConfig{}}, nil } @@ -31,6 +33,7 @@ func TestNewCmdFactory_RegisterSuccess(t *testing.T) { } func TestNewCmdFactory_RegisterFail(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockRegister := func(id string) (*RegisteredLoop, error) { return nil, errors.New("registration failed") } diff --git a/plugins/env_test.go b/plugins/env_test.go index 6dd171b6cc0..db06b25fa4b 100644 --- a/plugins/env_test.go +++ b/plugins/env_test.go @@ -6,9 +6,12 @@ import ( "testing" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestParseEnvFile(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("valid", func(t *testing.T) { got, err := ParseEnvFile("testdata/valid.env") require.NoError(t, err) diff --git a/plugins/loop_registry_test.go b/plugins/loop_registry_test.go index 322799bddc2..04572051a1e 100644 --- a/plugins/loop_registry_test.go +++ b/plugins/loop_registry_test.go @@ -12,10 +12,13 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" ) func TestPluginPortManager(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // register one m := NewTestLoopRegistry(logger.Test(t)) pFoo, err := m.Register("foo") @@ -166,6 +169,7 @@ func (t mockCfgTransmitter) ReaperFrequency() time.Duration { return time.Hour } func (t mockCfgTransmitter) ReaperMaxAge() time.Duration { return time.Minute } func TestLoopRegistry_Register(t *testing.T) { + tests.BelongsToCISuite(t, "unit") mockCfgDatabase := &mockCfgDatabase{} mockCfgMercury := &mockCfgMercury{} mockCfgTracing := &mockCfgTracing{} diff --git a/plugins/medianpoc/data_source_test.go b/plugins/medianpoc/data_source_test.go index c4d4043c091..be83c611740 100644 --- a/plugins/medianpoc/data_source_test.go +++ b/plugins/medianpoc/data_source_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type mockPipelineRunner struct { @@ -33,6 +34,7 @@ func (m *mockPipelineRunner) ExecuteRun(ctx context.Context, spec string, vars c } func TestDataSource(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) expect := jsonserializable.JSONSerializable{Val: int64(3), Valid: true} pr := &mockPipelineRunner{ @@ -70,6 +72,7 @@ func TestDataSource(t *testing.T) { } func TestDataSource_ResultErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) pr := &mockPipelineRunner{ results: core.TaskResults{ @@ -93,6 +96,7 @@ func TestDataSource_ResultErrors(t *testing.T) { } func TestDataSource_ResultNotAnInt(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) expect := jsonserializable.JSONSerializable{Val: "string-result", Valid: true} diff --git a/plugins/medianpoc/plugin_test.go b/plugins/medianpoc/plugin_test.go index 052fee1bca1..0f52f58f838 100644 --- a/plugins/medianpoc/plugin_test.go +++ b/plugins/medianpoc/plugin_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/core" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -80,6 +81,7 @@ func (p provider) Codec() types.Codec { } func TestNewPlugin(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) p := NewPlugin(lggr) diff --git a/tools/flakeytests/reporter_test.go b/tools/flakeytests/reporter_test.go index 9f7ff427d70..5a663afe205 100644 --- a/tools/flakeytests/reporter_test.go +++ b/tools/flakeytests/reporter_test.go @@ -7,9 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestMakeRequest_SingleTest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() ts := strconv.FormatInt(now.UnixNano(), 10) r := &Report{ @@ -31,6 +34,7 @@ func TestMakeRequest_SingleTest(t *testing.T) { } func TestMakeRequest_MultipleTests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() ts := strconv.FormatInt(now.UnixNano(), 10) r := &Report{ @@ -55,6 +59,7 @@ func TestMakeRequest_MultipleTests(t *testing.T) { } func TestMakeRequest_NoTests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() ts := strconv.FormatInt(now.UnixNano(), 10) r := NewReport() @@ -69,6 +74,7 @@ func TestMakeRequest_NoTests(t *testing.T) { } func TestMakeRequest_WithContext(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() ts := strconv.FormatInt(now.UnixNano(), 10) r := NewReport() @@ -83,6 +89,7 @@ func TestMakeRequest_WithContext(t *testing.T) { } func TestMakeRequest_Panics(t *testing.T) { + tests.BelongsToCISuite(t, "unit") now := time.Now() ts := strconv.FormatInt(now.UnixNano(), 10) r := &Report{ @@ -109,6 +116,7 @@ func TestMakeRequest_Panics(t *testing.T) { } func TestDedupeEntries(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r := &Report{ tests: map[string]map[string]int{ "core/assets": map[string]int{ diff --git a/tools/flakeytests/runner_test.go b/tools/flakeytests/runner_test.go index dad4bf56c0b..7b305ddc757 100644 --- a/tools/flakeytests/runner_test.go +++ b/tools/flakeytests/runner_test.go @@ -10,6 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // This test suite has two sets of tests that are run in two different modes: @@ -37,6 +39,7 @@ func newMockReporter() *mockReporter { } func TestParser(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0} ` @@ -51,6 +54,7 @@ func TestParser(t *testing.T) { } func TestParser_SkipsNonJSON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := `Failed tests and panics: ------- {"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0} @@ -67,6 +71,7 @@ func TestParser_SkipsNonJSON(t *testing.T) { } func TestParser_PanicDueToLogging(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := ` {"Time":"2023-09-07T16:01:40.649849+01:00","Action":"output","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestAssets_LinkScanValue","Output":"panic: foo\n"} ` @@ -82,6 +87,7 @@ func TestParser_PanicDueToLogging(t *testing.T) { } func TestParser_SuccessfulOutput(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := ` {"Time":"2023-09-07T16:22:52.556853+01:00","Action":"start","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets"} {"Time":"2023-09-07T16:22:52.762353+01:00","Action":"run","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestAssets_NewLinkAndString"} @@ -110,6 +116,7 @@ func (t testAdapter) test(pkg string, tests []string, out io.Writer) error { } func TestRunner_WithFlake(t *testing.T) { + tests.BelongsToCISuite(t, "unit") initialOutput := `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0}` outputs := []string{ `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0}`, @@ -140,6 +147,7 @@ func TestRunner_WithFlake(t *testing.T) { } func TestRunner_WithFailedPackage(t *testing.T) { + tests.BelongsToCISuite(t, "unit") initialOutput := ` {"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0} {"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Elapsed":0} @@ -175,6 +183,7 @@ func TestRunner_WithFailedPackage(t *testing.T) { } func TestRunner_AllFailures(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0}` rerunOutput := ` @@ -199,6 +208,7 @@ func TestRunner_AllFailures(t *testing.T) { } func TestRunner_RerunSuccessful(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0}` rerunOutputs := []string{ @@ -226,6 +236,7 @@ func TestRunner_RerunSuccessful(t *testing.T) { } func TestRunner_RootLevelTest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink/v2/","Test":"TestConfigDocs","Elapsed":0}` rerunOutput := `` @@ -248,6 +259,7 @@ func TestRunner_RootLevelTest(t *testing.T) { } func TestRunner_RerunFailsWithNonzeroExitCode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") output := `{"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0}` rerunOutputs := []string{ @@ -275,6 +287,7 @@ func TestRunner_RerunFailsWithNonzeroExitCode(t *testing.T) { } func TestRunner_RerunWithNonZeroExitCodeDoesntStopCommand(t *testing.T) { + tests.BelongsToCISuite(t, "unit") outputs := []io.Reader{ strings.NewReader(` {"Time":"2023-09-07T15:39:46.378315+01:00","Action":"fail","Package":"github.com/smartcontractkit/chainlink-evm/pkg/assets","Test":"TestLink","Elapsed":0} @@ -350,6 +363,7 @@ func TestSkippedForTests_Success(t *testing.T) { } func TestIntegration_DealsWithSubtests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") if testing.Short() { t.Skip() } @@ -390,6 +404,7 @@ func TestIntegration_DealsWithSubtests(t *testing.T) { } func TestIntegration_ParsesPanics(t *testing.T) { + tests.BelongsToCISuite(t, "unit") if testing.Short() { t.Skip() } @@ -421,6 +436,7 @@ func TestIntegration_ParsesPanics(t *testing.T) { } func TestIntegration(t *testing.T) { + tests.BelongsToCISuite(t, "unit") if testing.Short() { t.Skip() } diff --git a/tools/flakeytests/utils_test.go b/tools/flakeytests/utils_test.go index e50222ba9f1..5f8d4c8479d 100644 --- a/tools/flakeytests/utils_test.go +++ b/tools/flakeytests/utils_test.go @@ -7,9 +7,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDigString(t *testing.T) { + tests.BelongsToCISuite(t, "unit") in := map[string]any{ "pull_request": map[string]any{ "url": "some-url", @@ -36,6 +39,7 @@ var prEventTemplate = ` ` func TestGetGithubMetadata(t *testing.T) { + tests.BelongsToCISuite(t, "unit") repo, eventName, sha, event, runID, runAttempt := "chainlink", "merge_group", "a-sha", `{}`, "1234", "1" expectedRunURL := fmt.Sprintf("github.com/%s/actions/runs/%s/attempts/%s", repo, runID, runAttempt) ctx := getGithubMetadata(repo, eventName, sha, strings.NewReader(event), runID, runAttempt) diff --git a/tools/gomod-local-update/internal/updater/config_test.go b/tools/gomod-local-update/internal/updater/config_test.go index 21b867aea8d..0a22df15187 100644 --- a/tools/gomod-local-update/internal/updater/config_test.go +++ b/tools/gomod-local-update/internal/updater/config_test.go @@ -3,9 +3,12 @@ package updater import ( "errors" "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestConfig_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string config *Config @@ -97,6 +100,7 @@ func TestConfig_Validate(t *testing.T) { } func TestConfig_ValidateErrorType(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cfg := &Config{ RepoRemote: "invalid*remote", BranchTrunk: "develop", @@ -116,6 +120,7 @@ func TestConfig_ValidateErrorType(t *testing.T) { } func TestParseFlags(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string args []string diff --git a/tools/gomod-local-update/internal/updater/updater_test.go b/tools/gomod-local-update/internal/updater/updater_test.go index ba17024dd37..b8f9e6e7016 100644 --- a/tools/gomod-local-update/internal/updater/updater_test.go +++ b/tools/gomod-local-update/internal/updater/updater_test.go @@ -7,6 +7,8 @@ import ( "strings" "testing" "time" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // mockGitExecutor simulates git commands for testing as an alternative to systemGitExecutor @@ -75,6 +77,7 @@ func (m *mockSystemOperator) WriteFile(path string, data []byte, perm os.FileMod } func TestUpdater_Run(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testTime := time.Date(2024, 11, 22, 18, 21, 10, 0, time.UTC) // Use a full 40-character SHA testSHA := "ac7a7395feed" + strings.Repeat("0", 28) @@ -286,6 +289,7 @@ replace github.com/smartcontractkit/chainlink/v3 => ../ } func TestUpdater_FindLocalReplaceModules(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sysOp := newMockSystemOperator() sysOp.files["go.mod"] = []byte(` module test diff --git a/tools/plugout/main_test.go b/tools/plugout/main_test.go index b4c99c447f1..67e60c8a68a 100644 --- a/tools/plugout/main_test.go +++ b/tools/plugout/main_test.go @@ -6,6 +6,8 @@ import ( "reflect" "strings" "testing" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) // ----------------------------- @@ -62,6 +64,7 @@ func yamlMissingGitRefFor(module string) string { // ----------------------------- func TestContains(t *testing.T) { + tests.BelongsToCISuite(t, "unit") if !contains([]string{"a", "b"}, "a") { t.Fatal("expected contains to find element") } @@ -71,6 +74,7 @@ func TestContains(t *testing.T) { } func TestModuleSubdir(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cases := map[string]string{ "github.com/org/repo": "", "github.com/org/repo/relayer": "relayer", @@ -89,6 +93,7 @@ func TestModuleSubdir(t *testing.T) { } func TestShaEqual(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cases := []struct { a, b string want bool @@ -108,6 +113,7 @@ func TestShaEqual(t *testing.T) { } func TestNormalizeVersion(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("plain tag", func(t *testing.T) { mv := normalizeVersion("v1.2.3") if mv.Tag != "v1.2.3" || mv.SHA != "" || mv.TagPrefix != "" || mv.Raw != "v1.2.3" { @@ -160,6 +166,7 @@ func TestNormalizeVersion(t *testing.T) { } func TestDesiredYAMLRefForModule(t *testing.T) { + tests.BelongsToCISuite(t, "unit") cases := []struct { module string mv ModuleVersion @@ -182,6 +189,7 @@ func TestDesiredYAMLRefForModule(t *testing.T) { } func TestTagsMatchWithSubdir(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // root modules: tag equality only if !tagsMatchWithSubdir("github.com/example/repo", ModuleVersion{Tag: "v1.2.3", Raw: "v1.2.3"}, @@ -219,6 +227,7 @@ func TestTagsMatchWithSubdir(t *testing.T) { } func TestVersionsMatchForModule(t *testing.T) { + tests.BelongsToCISuite(t, "unit") module := "github.com/example/repo/sub" t.Run("SHA equality (prefix)", func(t *testing.T) { @@ -259,6 +268,7 @@ func TestVersionsMatchForModule(t *testing.T) { // ----------------------------- func TestDiscoverPluginVersions(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dir := t.TempDir() yamlPath := writeFile(t, dir, "plugins.yaml", samplePluginsYAML()) @@ -278,6 +288,7 @@ func TestDiscoverPluginVersions(t *testing.T) { } func TestUpdateGitRefInYAML_SuccessAndPreserveFormatting(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dir := t.TempDir() yamlPath := writeFile(t, dir, "plugins.yaml", samplePluginsYAML()) @@ -305,6 +316,7 @@ func TestUpdateGitRefInYAML_SuccessAndPreserveFormatting(t *testing.T) { } func TestUpdateGitRefInYAML_ModuleNotFound(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dir := t.TempDir() yamlPath := writeFile(t, dir, "plugins.yaml", samplePluginsYAML()) err := updateGitRefInYAML(yamlPath, "github.com/does/not/exist", ModuleVersion{Tag: "v0.1.0", Raw: "exist/v0.1.0"}) @@ -314,6 +326,7 @@ func TestUpdateGitRefInYAML_ModuleNotFound(t *testing.T) { } func TestUpdateGitRefInYAML_NoGitRefLineToReplace(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dir := t.TempDir() mod := "github.com/example/repo" yamlPath := writeFile(t, dir, "plugins.yaml", yamlMissingGitRefFor(mod)) @@ -328,8 +341,12 @@ func TestUpdateGitRefInYAML_NoGitRefLineToReplace(t *testing.T) { // ----------------------------- func TestRunSync_CheckMode_WithMismatch(t *testing.T) { + tests.BelongsToCISuite( + + // go.mod only needs to exist + t, "unit") dir := t.TempDir() - // go.mod only needs to exist + goMod := writeFile(t, dir, "go.mod", "module github.com/example/repo\n") plugins := writeFile(t, dir, "plugins.yaml", samplePluginsYAML()) @@ -363,6 +380,7 @@ func TestRunSync_CheckMode_WithMismatch(t *testing.T) { } func TestRunSync_UpdateMode_AppliesChanges(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dir := t.TempDir() goMod := writeFile(t, dir, "go.mod", "module github.com/example/repo\n") plugins := writeFile(t, dir, "plugins.yaml", samplePluginsYAML()) @@ -404,6 +422,7 @@ func TestRunSync_UpdateMode_AppliesChanges(t *testing.T) { } func TestRunSync_IgnoreModules_SkipsChecks(t *testing.T) { + tests.BelongsToCISuite(t, "unit") dir := t.TempDir() goMod := writeFile(t, dir, "go.mod", "module github.com/example/repo\n") plugins := writeFile(t, dir, "plugins.yaml", samplePluginsYAML()) @@ -430,8 +449,12 @@ func TestRunSync_IgnoreModules_SkipsChecks(t *testing.T) { } func TestRunSync_FileValidation(t *testing.T) { + tests.BelongsToCISuite( + + // Missing go.mod + t, "unit") dir := t.TempDir() - // Missing go.mod + _, err := runSync(Options{ GoModPath: filepath.Join(dir, "missing.go.mod"), PluginPaths: []string{filepath.Join(dir, "plugins.yaml")}, From 57b68711cdbcd2dd3b579fb1595453d2d8f25f44 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 15:01:40 -0800 Subject: [PATCH 12/30] test: enable new test tags --- .github/workflows/ci-core.yml | 2 +- .github/workflows/ci-integration.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index cb513c2387c..5e56bdba02f 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -204,7 +204,7 @@ jobs: - cmd: go_core_tests os: ${{ needs.runner-config.outputs.core-tests-runner }} should-run: ${{ needs.filter.outputs.should-run-core-tests }} - # test-suite: "unit" + test-suite: "unit" # trunk-auto-quarantine: "true" # - cmd: go_core_tests_integration diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml index 0a0a3caeb6f..5c564a69935 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-integration.yml @@ -33,10 +33,10 @@ jobs: fail-fast: false matrix: type: - # - module: Core - # test-suite: "with-db" - # cmd: go_core_tests - # os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + - module: Core + test-suite: "with-db" + cmd: go_core_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache - module: Deployment cmd: go_core_ccip_deployment_tests From d9a4a791b409dee277bffef403e5757a1a25a9ec Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 15:16:41 -0800 Subject: [PATCH 13/30] fix: naming collisions --- core/services/blockhashstore/feeder_test.go | 21 ++++++++++--------- core/services/blockhashstore/validate_test.go | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/core/services/blockhashstore/feeder_test.go b/core/services/blockhashstore/feeder_test.go index 21ea3795096..6fa4584e9c7 100644 --- a/core/services/blockhashstore/feeder_test.go +++ b/core/services/blockhashstore/feeder_test.go @@ -15,6 +15,7 @@ import ( "golang.org/x/exp/maps" "github.com/smartcontractkit/chainlink-common/pkg/utils/mathutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/solidity_vrf_coordinator_interface" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/vrf_coordinator_v2" @@ -42,9 +43,9 @@ var ( vrfCoordinatorV2ABI = evmtypes.MustGetABI(vrf_coordinator_v2.VRFCoordinatorV2MetaData.ABI) vrfCoordinatorV1ABI = evmtypes.MustGetABI(solidity_vrf_coordinator_interface.VRFCoordinatorMetaData.ABI) - _ Coordinator = &TestCoordinator{} - _ BHS = &TestBHS{} - tests = []testCase{ + _ Coordinator = &TestCoordinator{} + _ BHS = &TestBHS{} + testCases = []testCase{ { name: "single unfulfilled request", requests: []Event{{Block: 150, ID: "1000"}}, @@ -239,7 +240,7 @@ func TestStartHeartbeats(t *testing.T) { 100, // Not used for this test expectedDuration, func(ctx context.Context) (uint64, error) { - return tests[0].latest, nil + return testCases[0].latest, nil }) ctx, cancel := context.WithCancel(testutils.Context(t)) @@ -284,7 +285,7 @@ func TestStartHeartbeats(t *testing.T) { 100, // Not used for this test expectedDuration, func(ctx context.Context) (uint64, error) { - return tests[0].latest, nil + return testCases[0].latest, nil }) ctx, cancel := context.WithCancel(testutils.Context(t)) @@ -331,7 +332,7 @@ func TestStartHeartbeats(t *testing.T) { 100, // Not used for this test expectedDuration, func(ctx context.Context) (uint64, error) { - return tests[0].latest, nil + return testCases[0].latest, nil }) mockTimer := bhsmocks.NewTimer(t) @@ -362,7 +363,7 @@ type testCase struct { func TestFeeder(t *testing.T) { tests.BelongsToCISuite(t, "unit") - for _, test := range tests { + for _, test := range testCases { t.Run(test.name, test.testFeeder) } } @@ -400,7 +401,7 @@ func (test testCase) testFeeder(t *testing.T) { func TestFeederWithLogPollerVRFv1(t *testing.T) { tests.BelongsToCISuite(t, "unit") - for _, test := range tests { + for _, test := range testCases { t.Run(test.name, test.testFeederWithLogPollerVRFv1) } } @@ -495,7 +496,7 @@ func (test testCase) testFeederWithLogPollerVRFv1(t *testing.T) { func TestFeederWithLogPollerVRFv2(t *testing.T) { tests.BelongsToCISuite(t, "unit") - for _, test := range tests { + for _, test := range testCases { t.Run(test.name, test.testFeederWithLogPollerVRFv2) } } @@ -594,7 +595,7 @@ func (test testCase) testFeederWithLogPollerVRFv2(t *testing.T) { func TestFeederWithLogPollerVRFv2Plus(t *testing.T) { tests.BelongsToCISuite(t, "unit") - for _, test := range tests { + for _, test := range testCases { t.Run(test.name, test.testFeederWithLogPollerVRFv2Plus) } } diff --git a/core/services/blockhashstore/validate_test.go b/core/services/blockhashstore/validate_test.go index a4a64afc878..aa49b76ccee 100644 --- a/core/services/blockhashstore/validate_test.go +++ b/core/services/blockhashstore/validate_test.go @@ -18,7 +18,7 @@ func TestValidate(t *testing.T) { v2Coordinator := types.EIP55Address("0x2be990eE17832b59E0086534c5ea2459Aa75E38F") fromAddresses := []types.EIP55Address{("0x469aA2CD13e037DC5236320783dCfd0e641c0559")} - var tests = []struct { + var testCases = []struct { name string toml string assertion func(t *testing.T, os job.Job, err error) @@ -252,7 +252,7 @@ waitBlocks = "shouldBeInt"`, }, } - for _, test := range tests { + for _, test := range testCases { t.Run(test.name, func(t *testing.T) { s, err := ValidatedSpec(test.toml) test.assertion(t, s, err) From cfacf42853d2837b0ca37376d36f1253e850411f Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 15:26:42 -0800 Subject: [PATCH 14/30] more test tagging --- core/bridges/orm_test.go | 1 + core/capabilities/ccip/launcher/launcher_test.go | 4 ++++ .../ccip/ocrimpls/contract_transmitter_test.go | 1 + core/cmd/shell_local_test.go | 8 ++++++++ core/services/ccip/orm_test.go | 8 ++++++++ core/services/cron/cron_test.go | 1 + core/services/cron/validate_test.go | 2 ++ core/services/directrequest/delegate_test.go | 3 ++- core/services/feeds/service_test.go | 1 + core/services/headreporter/telemetry_reporter_test.go | 7 +++++++ core/services/job/job_orm_test.go | 1 + core/services/keeper/registry1_1_synchronizer_test.go | 1 + core/services/keystore/cosmos_test.go | 2 ++ core/services/llo/cleanup_test.go | 1 + .../llo/mercurytransmitter/persistence_manager_test.go | 2 ++ core/services/ocr/database_test.go | 1 + core/services/ocr2/database_test.go | 1 + .../plugins/ccip/internal/cache/commit_roots_test.go | 1 + .../ccip/internal/ccipdata/commit_store_reader_test.go | 4 ++++ .../evmregistry/v21/upkeepstate/scanner_test.go | 3 +++ .../ocr2keeper/evmregistry/v21/upkeepstate/store_test.go | 3 +++ core/services/ocr2/plugins/s4/integration_test.go | 1 + core/services/ocr2/plugins/vault/plugin_test.go | 1 + core/services/ocrcommon/peer_wrapper_test.go | 3 +++ core/services/p2p/shared_peer_test.go | 2 ++ core/services/p2p/utils_test.go | 2 ++ core/services/pipeline/orm_test.go | 1 + core/services/registrysyncer/orm_test.go | 1 + core/services/relay/evm/cap_encoder_test.go | 7 +++++++ core/services/relay/evm/chain_components_test.go | 3 +++ core/services/relay/evm/chain_reader_test.go | 4 ++++ core/services/relay/evm/evm_service_test.go | 6 ++++++ core/services/relay/evm/evm_test.go | 2 ++ .../relay/evm/functions/contract_transmitter_test.go | 4 ++++ core/services/relay/evm/median_test.go | 2 ++ .../relay/evm/mercury/offchain_config_digester_test.go | 3 +++ core/services/relay/evm/mercury/orm_test.go | 2 ++ core/services/relay/evm/write_target_test.go | 1 + core/services/s4/cached_orm_wrapper_test.go | 5 +++++ core/services/s4/envelope_test.go | 2 ++ core/services/s4/in_memory_orm_test.go | 5 +++++ core/services/s4/postgres_orm_test.go | 9 +++++++++ core/services/s4/storage_test.go | 5 +++++ core/services/versioning/orm_test.go | 1 + core/services/vrf/delegate_test.go | 1 + core/services/vrf/v2/listener_v2_test.go | 1 + core/services/webhook/delegate_test.go | 2 ++ core/services/webhook/external_initiator_manager_test.go | 2 ++ core/services/workflows/artifacts/orm_test.go | 1 + core/services/workflows/artifacts/v2/orm_test.go | 1 + core/services/workflows/syncer/handler_test.go | 1 + core/services/workflows/syncer/v2/handler_test.go | 1 + core/sessions/ldapauth/ldap_test.go | 1 + core/sessions/localauth/orm_test.go | 3 +++ core/sessions/localauth/reaper_test.go | 2 ++ core/sessions/oidcauth/oidc_test.go | 1 + 56 files changed, 144 insertions(+), 1 deletion(-) diff --git a/core/bridges/orm_test.go b/core/bridges/orm_test.go index 6cee259b8c2..3a130cc6f02 100644 --- a/core/bridges/orm_test.go +++ b/core/bridges/orm_test.go @@ -142,6 +142,7 @@ func TestORM_UpdateBridgeType(t *testing.T) { } func TestORM_TestCachedResponse(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) cfg := configtest.NewGeneralConfig(t, nil) db := pgtest.NewSqlxDB(t) diff --git a/core/capabilities/ccip/launcher/launcher_test.go b/core/capabilities/ccip/launcher/launcher_test.go index 4f5a115aaa6..e13b12b850e 100644 --- a/core/capabilities/ccip/launcher/launcher_test.go +++ b/core/capabilities/ccip/launcher/launcher_test.go @@ -20,9 +20,11 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_createDON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type args struct { lggr logger.Logger p2pID ragep2ptypes.PeerID @@ -246,6 +248,7 @@ func Test_createDON(t *testing.T) { } func Test_updateDON(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( digest1 = utils.RandomBytes32() digest2 = utils.RandomBytes32() @@ -510,6 +513,7 @@ func Test_updateDON(t *testing.T) { } func Test_launcher_processDiff(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( digest1 = utils.RandomBytes32() digest2 = utils.RandomBytes32() diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go index d1072969a3f..41776b04830 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter_test.go @@ -192,6 +192,7 @@ func abiEncodeUint32(data uint32) ([]byte, error) { // Test EVM -> SVM extra data decoding in contract transmitter func TestSVMExecCallDataFuncExtraDataDecoding(t *testing.T) { + tests.BelongsToCISuite(t, "unit") extraDataCodec := ccipocr3.ExtraDataCodecMap(map[string]ccipocr3.SourceChainExtraDataCodec{ chainsel.FamilyEVM: ccipevm.ExtraDataDecoder{}, chainsel.FamilySolana: ccipsolana.ExtraDataDecoder{}, diff --git a/core/cmd/shell_local_test.go b/core/cmd/shell_local_test.go index 64167bb3773..6334438134f 100644 --- a/core/cmd/shell_local_test.go +++ b/core/cmd/shell_local_test.go @@ -165,6 +165,7 @@ func TestShell_RunNodeWithAPICredentialsFile(t *testing.T) { } func TestShell_DiskMaxSizeBeforeRotateOptionDisablesAsExpected(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string logFileSize func(t *testing.T) utils.FileSize @@ -202,6 +203,7 @@ func TestShell_DiskMaxSizeBeforeRotateOptionDisablesAsExpected(t *testing.T) { } func TestShell_RebroadcastTransactions_Txm(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Use a non-transactional db for this test because we need to // test multiple connections to the database, and changes made within // the transaction cannot be seen from another connection. @@ -271,6 +273,7 @@ func TestShell_RebroadcastTransactions_Txm(t *testing.T) { } func TestShell_RebroadcastTransactions_OutsideRange_Txm(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") beginningNonce := uint(7) endingNonce := uint(10) gasPrice := big.NewInt(100000000000) @@ -359,6 +362,7 @@ func TestShell_RebroadcastTransactions_OutsideRange_Txm(t *testing.T) { } func TestShell_RebroadcastTransactions_AddressCheck(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string enableAddress bool @@ -433,6 +437,7 @@ func TestShell_RebroadcastTransactions_AddressCheck(t *testing.T) { } func TestShell_CleanupChainTables(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") // Just check if it doesn't error, command itself shouldn't be changed unless major schema changes were made. // It would be really hard to write a test that accounts for schema changes, so this should be enough to alarm us that something broke. config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Database.DriverName = pgcommon.DriverPostgres }) @@ -453,6 +458,7 @@ func TestShell_CleanupChainTables(t *testing.T) { } func TestShell_RemoveBlocks(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { s.Password.Keystore = models.NewSecret("dummy") @@ -508,6 +514,7 @@ func TestShell_RemoveBlocks(t *testing.T) { } func TestShell_BeforeNode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) tests := []struct { name string @@ -579,6 +586,7 @@ func TestShell_BeforeNode(t *testing.T) { } func TestShell_RunNode_WithBeforeNode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string pwdfile string diff --git a/core/services/ccip/orm_test.go b/core/services/ccip/orm_test.go index f8418ad7112..cfe1a337d08 100644 --- a/core/services/ccip/orm_test.go +++ b/core/services/ccip/orm_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var ( @@ -110,6 +111,7 @@ func getTokenTableRowCount(t *testing.T, ds sqlutil.DataSource) int { func TestInitORM(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") orm, _ := setupORM(t) assert.NotNil(t, orm) @@ -117,6 +119,7 @@ func TestInitORM(t *testing.T) { func TestORM_EmptyGasPrices(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm, _ := setupORM(t) @@ -128,6 +131,7 @@ func TestORM_EmptyGasPrices(t *testing.T) { func TestORM_EmptyTokenPrices(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm, _ := setupORM(t) @@ -139,6 +143,7 @@ func TestORM_EmptyTokenPrices(t *testing.T) { func TestORM_InsertAndGetGasPrices(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm, db := setupORM(t) @@ -208,6 +213,7 @@ func TestORM_InsertAndGetGasPrices(t *testing.T) { func TestORM_UpsertGasPrices(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm, db := setupORM(t) @@ -242,6 +248,7 @@ func TestORM_UpsertGasPrices(t *testing.T) { func TestORM_InsertAndGetTokenPrices(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm, db := setupORM(t) @@ -311,6 +318,7 @@ func TestORM_InsertAndGetTokenPrices(t *testing.T) { func TestORM_InsertTokenPricesWhenExpired(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm, _ := setupORM(t) diff --git a/core/services/cron/cron_test.go b/core/services/cron/cron_test.go index 701d04c8512..e9d748cf21f 100644 --- a/core/services/cron/cron_test.go +++ b/core/services/cron/cron_test.go @@ -55,6 +55,7 @@ func TestCronV2Pipeline(t *testing.T) { func TestCronV2Schedule(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") spec := job.Job{ Type: job.Cron, diff --git a/core/services/cron/validate_test.go b/core/services/cron/validate_test.go index a5412971436..053740b5820 100644 --- a/core/services/cron/validate_test.go +++ b/core/services/cron/validate_test.go @@ -7,11 +7,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/cron" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestValidatedCronJobSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string diff --git a/core/services/directrequest/delegate_test.go b/core/services/directrequest/delegate_test.go index 418f02b7560..b93cdc239c7 100644 --- a/core/services/directrequest/delegate_test.go +++ b/core/services/directrequest/delegate_test.go @@ -156,9 +156,10 @@ func (uni *DirectRequestUniverse) Cleanup() { } func TestDelegate_ServicesListenerHandleLog(t *testing.T) { + t.Parallel() quarantine.Flaky(t, "DX-1909") testutils.SkipShortDB(t) - t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("Log is an OracleRequest", func(t *testing.T) { uni := NewDirectRequestUniverse(t) diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 5854918d5c0..56cee26c74c 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -510,6 +510,7 @@ func Test_Service_UpdateFeedsManager(t *testing.T) { } func Test_Service_EnableFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") mgr := feeds.FeedsManager{ID: 1} svc := setupTestService(t) diff --git a/core/services/headreporter/telemetry_reporter_test.go b/core/services/headreporter/telemetry_reporter_test.go index 5cfbf812c5b..2efd610d888 100644 --- a/core/services/headreporter/telemetry_reporter_test.go +++ b/core/services/headreporter/telemetry_reporter_test.go @@ -19,6 +19,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" mocks2 "github.com/smartcontractkit/chainlink/v2/common/types/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -31,6 +32,7 @@ import ( ) func Test_EVMTelemetryReporter_NewHead(t *testing.T) { + tests.BelongsToCISuite(t, "unit") head := evmtypes.Head{ Number: 42, EVMChainID: ubig.NewI(100), @@ -73,6 +75,7 @@ func Test_EVMTelemetryReporter_NewHead(t *testing.T) { } func Test_EVMTelemetryReporter_NewHeadMissingFinalized(t *testing.T) { + tests.BelongsToCISuite(t, "unit") head := evmtypes.Head{ Number: 42, EVMChainID: ubig.NewI(100), @@ -103,6 +106,7 @@ func Test_EVMTelemetryReporter_NewHeadMissingFinalized(t *testing.T) { } func Test_EVMTelemetryReporter_NewHead_MissingEndpoint(t *testing.T) { + tests.BelongsToCISuite(t, "unit") monitoringEndpointGen := telemetry.NewMockMonitoringEndpointGenerator(t) monitoringEndpointGen. On("GenMonitoringEndpoint", "EVM", "100", "", synchronization.HeadReport). @@ -126,6 +130,7 @@ func (m mockRelayer) LatestHead(_ context.Context) (types.Head, error) { } func Test_SolanaTelemetryReporter_ReportPeriodic(t *testing.T) { + tests.BelongsToCISuite(t, "unit") privKey, err := solana.NewRandomPrivateKey() require.NoError(t, err) blockHash := [32]byte(privKey.PublicKey()) @@ -166,6 +171,7 @@ func Test_SolanaTelemetryReporter_ReportPeriodic(t *testing.T) { } func Test_SolanaTelemetryReporter_ReportPeriodic_EmptyBlockHeight(t *testing.T) { + tests.BelongsToCISuite(t, "unit") head := types.Head{ Height: "", Hash: nil, @@ -189,6 +195,7 @@ func Test_SolanaTelemetryReporter_ReportPeriodic_EmptyBlockHeight(t *testing.T) } func Test_SolanaTelemetryReporter_ReportPeriodic_MissingEndpoint(t *testing.T) { + tests.BelongsToCISuite(t, "unit") monitoringEndpoint := mocks2.NewMonitoringEndpoint(t) monitoringEndpointGen := telemetry.NewMockMonitoringEndpointGenerator(t) diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 4c524090fec..053f6b41dd8 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -614,6 +614,7 @@ func TestORM_CreateJob_VRFV2(t *testing.T) { } func TestORM_CreateJob_VRFV2Plus(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/keeper/registry1_1_synchronizer_test.go b/core/services/keeper/registry1_1_synchronizer_test.go index ee7d26a7578..7e9742d8490 100644 --- a/core/services/keeper/registry1_1_synchronizer_test.go +++ b/core/services/keeper/registry1_1_synchronizer_test.go @@ -95,6 +95,7 @@ func Test_LogListenerOpts1_1(t *testing.T) { } func Test_RegistrySynchronizer1_1_Start(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_1) contractAddress := job.KeeperSpec.ContractAddress.Address() diff --git a/core/services/keystore/cosmos_test.go b/core/services/keystore/cosmos_test.go index 16133c85807..4e3634229b3 100644 --- a/core/services/keystore/cosmos_test.go +++ b/core/services/keystore/cosmos_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,7 @@ import ( ) func Test_CosmosKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/llo/cleanup_test.go b/core/services/llo/cleanup_test.go index e030ca33f8e..db974996871 100644 --- a/core/services/llo/cleanup_test.go +++ b/core/services/llo/cleanup_test.go @@ -125,6 +125,7 @@ func Test_Cleanup(t *testing.T) { } func Test_StaleTransmissionReaper(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ds := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) tr := &transmissionReaper{ds: ds, lggr: lggr, maxAge: 24 * time.Hour} diff --git a/core/services/llo/mercurytransmitter/persistence_manager_test.go b/core/services/llo/mercurytransmitter/persistence_manager_test.go index 8fecd30d3fa..45207bd6f22 100644 --- a/core/services/llo/mercurytransmitter/persistence_manager_test.go +++ b/core/services/llo/mercurytransmitter/persistence_manager_test.go @@ -14,6 +14,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -27,6 +28,7 @@ func bootstrapPersistenceManager(t *testing.T, donID uint32, db *sqlx.DB, maxTra } func TestPersistenceManager(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") donID1 := uint32(1234) donID2 := uint32(2345) diff --git a/core/services/ocr/database_test.go b/core/services/ocr/database_test.go index 04217aeb0e5..5e53620a929 100644 --- a/core/services/ocr/database_test.go +++ b/core/services/ocr/database_test.go @@ -104,6 +104,7 @@ func Test_DB_ReadWriteState(t *testing.T) { } func Test_DB_ReadWriteConfig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) sqlDB := db diff --git a/core/services/ocr2/database_test.go b/core/services/ocr2/database_test.go index ede509cab00..25a77beec6e 100644 --- a/core/services/ocr2/database_test.go +++ b/core/services/ocr2/database_test.go @@ -146,6 +146,7 @@ func Test_DB_ReadWriteState(t *testing.T) { } func Test_DB_ReadWriteConfig(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") sqlDB := setupDB(t) config := ocrtypes.ContractConfig{ diff --git a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go index 9eb2523460f..53c3e135d8a 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go @@ -141,6 +141,7 @@ func Test_RootsEligibleForExecution(t *testing.T) { } func Test_RootsEligibleForExecutionWithReorgs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) chainID := testutils.NewRandomEVMChainID() orm := logpoller.NewORM(chainID, pgtest.NewSqlxDB(t), logger.TestLogger(t)) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go index 739264728d8..80e6148e53e 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go @@ -28,6 +28,7 @@ import ( commit_store_helper_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/commit_store_helper" price_registry_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/price_registry" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/mock_rmn_contract" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -41,6 +42,7 @@ import ( ) func TestCommitOffchainConfig_Encoding(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := map[string]struct { want v1_2_0.JSONCommitOffchainConfig expectErr bool @@ -103,6 +105,7 @@ func TestCommitOffchainConfig_Encoding(t *testing.T) { } func TestCommitOnchainConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string want ccipdata.CommitOnchainConfig @@ -138,6 +141,7 @@ func TestCommitOnchainConfig(t *testing.T) { } func TestCommitStoreReaders(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") user, ec := newSim(t) ctx := testutils.Context(t) lggr := logger.Test(t) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go index 6c78e019717..e283a02c539 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/scanner_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ac "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/i_automation_v21_plus_common" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" @@ -17,6 +18,7 @@ import ( ) func TestPerformedEventsScanner(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) registryAddr := common.HexToAddress("0x12345") lggr := logger.TestLogger(t) @@ -112,6 +114,7 @@ func TestPerformedEventsScanner(t *testing.T) { } func TestPerformedEventsScanner_Batch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) registryAddr := common.HexToAddress("0x12345") lggr := logger.TestLogger(t) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go index def0a44a2a4..762c6609d4e 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go @@ -15,12 +15,14 @@ import ( ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func TestUpkeepStateStore(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string inserts []ocr2keepers.CheckResult @@ -197,6 +199,7 @@ func TestUpkeepStateStore(t *testing.T) { } func TestUpkeepStateStore_SetSelectIntegration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") if testing.Short() { t.Skip("database required for upkeep state store integration test") } diff --git a/core/services/ocr2/plugins/s4/integration_test.go b/core/services/ocr2/plugins/s4/integration_test.go index 00cda5b7b05..44541d957c1 100644 --- a/core/services/ocr2/plugins/s4/integration_test.go +++ b/core/services/ocr2/plugins/s4/integration_test.go @@ -183,6 +183,7 @@ func TestS4Integration_HappyDON(t *testing.T) { } func TestS4Integration_HappyDON_4X(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") don := newDON(t, 4, createPluginConfig(100)) ctx := testutils.Context(t) diff --git a/core/services/ocr2/plugins/vault/plugin_test.go b/core/services/ocr2/plugins/vault/plugin_test.go index 3420856063f..da353a21df9 100644 --- a/core/services/ocr2/plugins/vault/plugin_test.go +++ b/core/services/ocr2/plugins/vault/plugin_test.go @@ -157,6 +157,7 @@ func TestPlugin_ReportingPluginFactory_UsesDefaultsIfNotProvidedInOffchainConfig } func TestPlugin_ReportingPluginFactory_UseDKGResult(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() diff --git a/core/services/ocrcommon/peer_wrapper_test.go b/core/services/ocrcommon/peer_wrapper_test.go index dfc41b55ef1..d7341d53dc1 100644 --- a/core/services/ocrcommon/peer_wrapper_test.go +++ b/core/services/ocrcommon/peer_wrapper_test.go @@ -12,6 +12,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -24,6 +25,7 @@ import ( func Test_SingletonPeerWrapper_Start(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) @@ -110,6 +112,7 @@ func Test_SingletonPeerWrapper_Start(t *testing.T) { func Test_SingletonPeerWrapper_Close(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/p2p/shared_peer_test.go b/core/services/p2p/shared_peer_test.go index 80a7501d249..7e5d9310263 100644 --- a/core/services/p2p/shared_peer_test.go +++ b/core/services/p2p/shared_peer_test.go @@ -58,11 +58,13 @@ func TestDon2DonSharedPeer_WithRealSingletonPeerWrapper(t *testing.T) { } func TestDon2DonSharedPeer_ErrorOnNilSingletonPeerWrapper(t *testing.T) { + tests.BelongsToCISuite(t, "unit") sp := p2p.NewDon2DonSharedPeer(nil, nil, logger.TestLogger(t)) require.Error(t, sp.Start(t.Context())) } func TestDon2DonSharedPeer_UpdateConnectionsByDONs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") pw := ocrcommon.NewSingletonPeerWrapper(nil, nil, nil, nil, logger.TestLogger(t)) // nils are ok, we won't Start() it _, myPeerID := newKeyPair(t) _, peerID2 := newKeyPair(t) diff --git a/core/services/p2p/utils_test.go b/core/services/p2p/utils_test.go index 968633cca1a..45bbed6e8c1 100644 --- a/core/services/p2p/utils_test.go +++ b/core/services/p2p/utils_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/p2p" ) @@ -17,6 +18,7 @@ const ( ) func TestInMemoryDiscovererDatabase(t *testing.T) { + tests.BelongsToCISuite(t, "unit") db := p2p.NewInMemoryDiscovererDatabase() require.NoError(t, db.StoreAnnouncement(testutils.Context(t), peerID1, []byte(ann1))) require.NoError(t, db.StoreAnnouncement(testutils.Context(t), peerID2, []byte(ann2))) diff --git a/core/services/pipeline/orm_test.go b/core/services/pipeline/orm_test.go index 5f3e409da90..02dcf933f69 100644 --- a/core/services/pipeline/orm_test.go +++ b/core/services/pipeline/orm_test.go @@ -109,6 +109,7 @@ func Test_PipelineORM_CreateSpec(t *testing.T) { } func Test_PipelineORM_FindRun(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db, orm, _ := setupLiteORM(t) _, err := db.Exec(`SET CONSTRAINTS fk_pipeline_runs_pruning_key DEFERRED`) diff --git a/core/services/registrysyncer/orm_test.go b/core/services/registrysyncer/orm_test.go index 25aeb8ed452..af2564cb876 100644 --- a/core/services/registrysyncer/orm_test.go +++ b/core/services/registrysyncer/orm_test.go @@ -150,6 +150,7 @@ func generateState(t *testing.T) registrysyncer.LocalRegistry { } func TestRegistrySyncerORM_AddLocalRegistry_DuplicateHandling(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.Test(t) diff --git a/core/services/relay/evm/cap_encoder_test.go b/core/services/relay/evm/cap_encoder_test.go index 5283603cb3e..0d40295a3e1 100644 --- a/core/services/relay/evm/cap_encoder_test.go +++ b/core/services/relay/evm/cap_encoder_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" consensustypes "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" @@ -35,6 +36,7 @@ var ( ) func TestEVMEncoder_SingleField(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config := map[string]any{ "abi": "bytes[] Full_reports", } @@ -70,6 +72,7 @@ func TestEVMEncoder_SingleField(t *testing.T) { } func TestEVMEncoder_TwoFields(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config := map[string]any{ "abi": "uint256[] Prices, uint32[] Timestamps", } @@ -106,6 +109,7 @@ func TestEVMEncoder_TwoFields(t *testing.T) { } func TestEVMEncoder_Tuple(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config := map[string]any{ "abi": "(uint256[] Prices, uint32[] Timestamps) Elem", } @@ -145,6 +149,7 @@ func TestEVMEncoder_Tuple(t *testing.T) { } func TestEVMEncoder_ListOfTuples(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config := map[string]any{ "abi": "(uint256 Price, uint32 Timestamp)[] Elems", } @@ -187,6 +192,7 @@ func TestEVMEncoder_ListOfTuples(t *testing.T) { } func TestEVMEncoder_InvalidIDs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config := map[string]any{ "abi": "bytes[] Full_reports", } @@ -218,6 +224,7 @@ func TestEVMEncoder_InvalidIDs(t *testing.T) { } func TestEVMEncoder_SubABI(t *testing.T) { + tests.BelongsToCISuite(t, "unit") config := map[string]any{ "abi": "(bytes32 FeedID, bytes Bundle, uint32 Timestamp)[] Reports", "subabi": map[string]string{ diff --git a/core/services/relay/evm/chain_components_test.go b/core/services/relay/evm/chain_components_test.go index 5df164f59ef..d0b7923bb2a 100644 --- a/core/services/relay/evm/chain_components_test.go +++ b/core/services/relay/evm/chain_components_test.go @@ -58,6 +58,7 @@ const commonGasLimitOnEvms = uint64(4712388) const finalityDepth = 4 func TestContractReaderEventsInitValidation(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string chainContractReaders map[string]config.ChainContractReader @@ -221,6 +222,7 @@ func TestContractReaderEventsInitValidation(t *testing.T) { } func TestChainReader_HealthReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lp := lpmocks.NewLogPoller(t) lp.EXPECT().HealthReport().Return(map[string]error{"lp_name": clcommontypes.ErrFinalityViolated}).Once() ht := headstest.NewTracker[*clevmtypes.Head, common.Hash](t) @@ -235,6 +237,7 @@ func TestChainReader_HealthReport(t *testing.T) { func TestSequencesHaveTxHash(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") helper := &helper{} it := &EVMChainComponentsInterfaceTester[*testing.T]{Helper: helper, DeployLock: &sync.Mutex{}} diff --git a/core/services/relay/evm/chain_reader_test.go b/core/services/relay/evm/chain_reader_test.go index 3c0b1cb1b03..da48b68f53e 100644 --- a/core/services/relay/evm/chain_reader_test.go +++ b/core/services/relay/evm/chain_reader_test.go @@ -29,10 +29,12 @@ import ( lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestChainReaderSizedBigIntTypes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []string{} @@ -71,6 +73,7 @@ func TestChainReaderSizedBigIntTypes(t *testing.T) { } func TestChainReader_Bind(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lp := lpmocks.NewLogPoller(t) ht := headstest.NewTracker[*evmtypes.Head](t) cr, err := evm.NewChainReaderService(t.Context(), logger.Nop(), lp, ht, nil, config.ChainReaderConfig{Contracts: map[string]config.ChainContractReader{ @@ -148,6 +151,7 @@ func TestChainReader_Bind(t *testing.T) { func TestChainReaderPrimitiveTypes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { abiType string diff --git a/core/services/relay/evm/evm_service_test.go b/core/services/relay/evm/evm_service_test.go index adcb848ca5f..8c84e707016 100644 --- a/core/services/relay/evm/evm_service_test.go +++ b/core/services/relay/evm/evm_service_test.go @@ -28,6 +28,7 @@ import ( evmmocks "github.com/smartcontractkit/chainlink/v2/common/chains/mocks" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" txmmocks "github.com/smartcontractkit/chainlink/v2/common/txmgr/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const ExpectedTxHash = "0xabcd" @@ -155,6 +156,7 @@ func createPayload() evm.ABIPayload { func TestEVMService(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() t.Run("RegisterLogTracking", func(t *testing.T) { @@ -354,6 +356,7 @@ func TestEVMService(t *testing.T) { } func TestEVMService_HeaderByNumber(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { Name string Request evm.HeaderByNumberRequest @@ -526,6 +529,7 @@ func runSubmitTxGettingDifferentStatusAndReceipts(m *Mocks, ctx any, expectedRet func TestConverters(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("convert head", func(t *testing.T) { head := types.Head{ @@ -560,6 +564,7 @@ func TestConverters(t *testing.T) { } func TestEVMService_EstimateGas(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { Name string Request *evm.CallMsg @@ -611,6 +616,7 @@ func TestEVMService_EstimateGas(t *testing.T) { } func TestEVMService_CallContract(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { Name string Request evm.CallContractRequest diff --git a/core/services/relay/evm/evm_test.go b/core/services/relay/evm/evm_test.go index c2c3f219d3e..ce57e3d81fe 100644 --- a/core/services/relay/evm/evm_test.go +++ b/core/services/relay/evm/evm_test.go @@ -9,10 +9,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-evm/pkg/keys" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" ) func TestRelayerOpts_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { DS sqlutil.DataSource CSAKeystore core.Keystore diff --git a/core/services/relay/evm/functions/contract_transmitter_test.go b/core/services/relay/evm/functions/contract_transmitter_test.go index aef9759f1ae..81477bed742 100644 --- a/core/services/relay/evm/functions/contract_transmitter_test.go +++ b/core/services/relay/evm/functions/contract_transmitter_test.go @@ -16,6 +16,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/keys/keystest" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" @@ -33,6 +34,7 @@ func newMockTxStrategy(t *testing.T) *commontxmmocks.TxStrategy { func TestContractTransmitter_LatestConfigDigestAndEpoch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) digestStr := "000130da6b9315bd59af6b0a3f5463c0d0a39e92eaa34cbcbdbace7b3bfcc776" @@ -80,6 +82,7 @@ func TestContractTransmitter_LatestConfigDigestAndEpoch(t *testing.T) { func TestContractTransmitter_Transmit_V1(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) contractVersion := uint32(1) @@ -154,6 +157,7 @@ func TestContractTransmitter_Transmit_V1(t *testing.T) { func TestContractTransmitter_Transmit_V1_CoordinatorMismatch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) contractVersion := uint32(1) diff --git a/core/services/relay/evm/median_test.go b/core/services/relay/evm/median_test.go index f8696aa402a..17556e25eb1 100644 --- a/core/services/relay/evm/median_test.go +++ b/core/services/relay/evm/median_test.go @@ -13,10 +13,12 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/common/chains/mocks" ) func TestNewMedianProvider(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.Test(t) chain := mocks.NewChain(t) diff --git a/core/services/relay/evm/mercury/offchain_config_digester_test.go b/core/services/relay/evm/mercury/offchain_config_digester_test.go index 2f6d19b8b34..22dcbda3252 100644 --- a/core/services/relay/evm/mercury/offchain_config_digester_test.go +++ b/core/services/relay/evm/mercury/offchain_config_digester_test.go @@ -7,10 +7,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ) func Test_OffchainConfigDigester_ConfigDigest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + ctx := t.Context() // ChainID and ContractAddress are taken into account for computation cd1, err := OffchainConfigDigester{ChainID: big.NewInt(0)}.ConfigDigest(ctx, types.ContractConfig{}) diff --git a/core/services/relay/evm/mercury/orm_test.go b/core/services/relay/evm/mercury/orm_test.go index 2bc2fead0d4..4625d13e388 100644 --- a/core/services/relay/evm/mercury/orm_test.go +++ b/core/services/relay/evm/mercury/orm_test.go @@ -9,6 +9,7 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" ) @@ -20,6 +21,7 @@ var ( ) func TestORM(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := testutils.NewSqlxDB(t) diff --git a/core/services/relay/evm/write_target_test.go b/core/services/relay/evm/write_target_test.go index 22ad3bb561f..3f3ad48ab65 100644 --- a/core/services/relay/evm/write_target_test.go +++ b/core/services/relay/evm/write_target_test.go @@ -108,6 +108,7 @@ func newMockedEncodeTransmissionInfo(state uint8) ([]byte, error) { } func TestEvmWrite(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") chain := evmmocks.NewChain(t) txManager := txmmocks.NewMockEvmTxManager(t) evmClient := clienttest.NewClient(t) diff --git a/core/services/s4/cached_orm_wrapper_test.go b/core/services/s4/cached_orm_wrapper_test.go index 937c8f6b778..d6167988ce2 100644 --- a/core/services/s4/cached_orm_wrapper_test.go +++ b/core/services/s4/cached_orm_wrapper_test.go @@ -36,6 +36,7 @@ func TestGetSnapshotEmpty(t *testing.T) { } func TestGetSnapshotCacheFilled(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("OK_with_rows_already_cached", func(t *testing.T) { ctx := testutils.Context(t) rows := generateTestSnapshotRows(t, 100) @@ -79,6 +80,7 @@ func TestGetSnapshotCacheFilled(t *testing.T) { } func TestUpdateInvalidatesSnapshotCache(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("OK-GetSnapshot_cache_invalidated_after_update", func(t *testing.T) { ctx := testutils.Context(t) rows := generateTestSnapshotRows(t, 100) @@ -170,6 +172,7 @@ func TestUpdateInvalidatesSnapshotCache(t *testing.T) { } func TestGet(t *testing.T) { + tests.BelongsToCISuite(t, "unit") address := big.New(testutils.NewAddress().Big()) var slotID uint = 1 @@ -202,6 +205,7 @@ func TestGet(t *testing.T) { } func TestDeletedExpired(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var limit uint = 1 now := time.Now() @@ -233,6 +237,7 @@ func TestDeletedExpired(t *testing.T) { // GetUnconfirmedRows(limit uint, qopts ...pg.QOpt) ([]*Row, error) func TestGetUnconfirmedRows(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var limit uint = 1 lggr := logger.TestLogger(t) diff --git a/core/services/s4/envelope_test.go b/core/services/s4/envelope_test.go index e41eca6146c..269c0b221e9 100644 --- a/core/services/s4/envelope_test.go +++ b/core/services/s4/envelope_test.go @@ -10,11 +10,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/ethereum/go-ethereum/crypto" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" ) func TestEnvelope(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") payload := testutils.Random32Byte() expiration := time.Now().Add(time.Hour).UnixMilli() diff --git a/core/services/s4/in_memory_orm_test.go b/core/services/s4/in_memory_orm_test.go index ccbc3933383..aa574e8e3ff 100644 --- a/core/services/s4/in_memory_orm_test.go +++ b/core/services/s4/in_memory_orm_test.go @@ -9,11 +9,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" ) func TestInMemoryORM(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") address := testutils.NewAddress() var slotId uint = 3 @@ -70,6 +72,7 @@ func TestInMemoryORM(t *testing.T) { func TestInMemoryORM_DeleteExpired(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := s4.NewInMemoryORM() @@ -104,6 +107,7 @@ func TestInMemoryORM_DeleteExpired(t *testing.T) { func TestInMemoryORM_GetUnconfirmedRows(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := s4.NewInMemoryORM() @@ -134,6 +138,7 @@ func TestInMemoryORM_GetUnconfirmedRows(t *testing.T) { func TestInMemoryORM_GetSnapshot(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := s4.NewInMemoryORM() diff --git a/core/services/s4/postgres_orm_test.go b/core/services/s4/postgres_orm_test.go index 189033e1d51..0eb0c775982 100644 --- a/core/services/s4/postgres_orm_test.go +++ b/core/services/s4/postgres_orm_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/s4" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" ) @@ -50,6 +51,7 @@ func generateTestRows(t *testing.T, n int) []*s4.Row { func TestNewPostgresOrm(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") orm := setupORM(t, "test") assert.NotNil(t, orm) @@ -57,6 +59,7 @@ func TestNewPostgresOrm(t *testing.T) { func TestPostgresORM_UpdateAndGet(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t, "test") @@ -89,6 +92,7 @@ func TestPostgresORM_UpdateAndGet(t *testing.T) { func TestPostgresORM_UpdateSimpleFlow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t, "test") @@ -117,6 +121,7 @@ func TestPostgresORM_UpdateSimpleFlow(t *testing.T) { func TestPostgresORM_DeleteExpired(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t, "test") @@ -146,6 +151,7 @@ func TestPostgresORM_DeleteExpired(t *testing.T) { func TestPostgresORM_GetSnapshot(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") orm := setupORM(t, "test") @@ -202,6 +208,7 @@ func TestPostgresORM_GetSnapshot(t *testing.T) { func TestPostgresORM_GetUnconfirmedRows(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") orm := setupORM(t, "test") @@ -234,6 +241,7 @@ func TestPostgresORM_GetUnconfirmedRows(t *testing.T) { func TestPostgresORM_Namespace(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ormA := setupORM(t, "a") @@ -268,6 +276,7 @@ func TestPostgresORM_Namespace(t *testing.T) { func TestPostgresORM_BigIntVersion(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) orm := setupORM(t, "test") diff --git a/core/services/s4/storage_test.go b/core/services/s4/storage_test.go index 2ffa19f58b1..a32f8b1dcb6 100644 --- a/core/services/s4/storage_test.go +++ b/core/services/s4/storage_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/smartcontractkit/chainlink/v2/core/services/s4/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -35,6 +36,7 @@ func setupTestStorage(t *testing.T, now time.Time) (*mocks.ORM, s4.Storage) { func TestStorage_Constraints(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, storage := setupTestStorage(t, time.Now()) c := storage.Constraints() @@ -43,6 +45,7 @@ func TestStorage_Constraints(t *testing.T) { func TestStorage_Errors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") now := time.Now() ormMock, storage := setupTestStorage(t, now) @@ -162,6 +165,7 @@ func TestStorage_Errors(t *testing.T) { func TestStorage_PutAndGet(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") now := time.Now() ormMock, storage := setupTestStorage(t, now) @@ -203,6 +207,7 @@ func TestStorage_PutAndGet(t *testing.T) { func TestStorage_List(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ormMock, storage := setupTestStorage(t, time.Now()) address := testutils.NewAddress() diff --git a/core/services/versioning/orm_test.go b/core/services/versioning/orm_test.go index 14fd25db835..3f0696684b2 100644 --- a/core/services/versioning/orm_test.go +++ b/core/services/versioning/orm_test.go @@ -90,6 +90,7 @@ func TestORM_NodeVersion_UpsertNodeVersion(t *testing.T) { } func Test_Version_CheckVersion(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/vrf/delegate_test.go b/core/services/vrf/delegate_test.go index 4c747428598..cfe880f6896 100644 --- a/core/services/vrf/delegate_test.go +++ b/core/services/vrf/delegate_test.go @@ -244,6 +244,7 @@ func TestDelegate_ReorgAttackProtection(t *testing.T) { } func TestDelegate_ValidLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") vuni, listener, jb := setup(t) txHash := evmutils.NewHash() reqID1 := evmutils.NewHash() diff --git a/core/services/vrf/v2/listener_v2_test.go b/core/services/vrf/v2/listener_v2_test.go index cd11852e809..c2a3f518dc9 100644 --- a/core/services/vrf/v2/listener_v2_test.go +++ b/core/services/vrf/v2/listener_v2_test.go @@ -259,6 +259,7 @@ func TestMaybeSubtractReservedLinkV2(t *testing.T) { } func TestMaybeSubtractReservedLinkV2Plus(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testMaybeSubtractReservedLink(t, vrfcommon.V2Plus) } diff --git a/core/services/webhook/delegate_test.go b/core/services/webhook/delegate_test.go index 7901a394d95..90c52f801c5 100644 --- a/core/services/webhook/delegate_test.go +++ b/core/services/webhook/delegate_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -22,6 +23,7 @@ import ( ) func TestWebhookDelegate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) var ( spec = &job.Job{ diff --git a/core/services/webhook/external_initiator_manager_test.go b/core/services/webhook/external_initiator_manager_test.go index a866e137aef..d8e95aafac5 100644 --- a/core/services/webhook/external_initiator_manager_test.go +++ b/core/services/webhook/external_initiator_manager_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tidwall/gjson" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( ) func Test_ExternalInitiatorManager_Load(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) borm := bridges.NewORM(db) diff --git a/core/services/workflows/artifacts/orm_test.go b/core/services/workflows/artifacts/orm_test.go index 864a98c39f9..66114e97eea 100644 --- a/core/services/workflows/artifacts/orm_test.go +++ b/core/services/workflows/artifacts/orm_test.go @@ -61,6 +61,7 @@ func TestWorkflowArtifactsORM_GetAndUpdate(t *testing.T) { } func Test_UpsertWorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) diff --git a/core/services/workflows/artifacts/v2/orm_test.go b/core/services/workflows/artifacts/v2/orm_test.go index 3f167725d34..2cd1fccddf2 100644 --- a/core/services/workflows/artifacts/v2/orm_test.go +++ b/core/services/workflows/artifacts/v2/orm_test.go @@ -135,6 +135,7 @@ func Test_UpsertWorkflowSpec(t *testing.T) { } func Test_DeleteWorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("deletes a workflow spec by ID", func(t *testing.T) { db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) diff --git a/core/services/workflows/syncer/handler_test.go b/core/services/workflows/syncer/handler_test.go index 2bae201d2ad..5bc83236ecc 100644 --- a/core/services/workflows/syncer/handler_test.go +++ b/core/services/workflows/syncer/handler_test.go @@ -871,6 +871,7 @@ func newMockArtifactStore(as *artifacts.Store, deleteWorkflowArtifactsErr error) } func Test_workflowDeletedHandler(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") workflowEncryptionKey := workflowkey.MustNewXXXTestingOnly(big.NewInt(1)) t.Run("success deleting existing engine and spec", func(t *testing.T) { var ( diff --git a/core/services/workflows/syncer/v2/handler_test.go b/core/services/workflows/syncer/v2/handler_test.go index 754581d51c9..10cda00567f 100644 --- a/core/services/workflows/syncer/v2/handler_test.go +++ b/core/services/workflows/syncer/v2/handler_test.go @@ -718,6 +718,7 @@ func newMockArtifactStore(as *artifacts.Store, deleteWorkflowArtifactsErr error) } func Test_workflowDeletedHandler(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("success deleting existing engine and spec", func(t *testing.T) { var ( ctx = testutils.Context(t) diff --git a/core/sessions/ldapauth/ldap_test.go b/core/sessions/ldapauth/ldap_test.go index 5182cbdba4a..0d5ce9d48a0 100644 --- a/core/sessions/ldapauth/ldap_test.go +++ b/core/sessions/ldapauth/ldap_test.go @@ -242,6 +242,7 @@ func TestORM_FindUserByAPIToken_Success(t *testing.T) { } func TestORM_FindUserByAPIToken_Expired(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) cfg := ldapauth.TestConfig{} diff --git a/core/sessions/localauth/orm_test.go b/core/sessions/localauth/orm_test.go index ed4589bd33b..30cc7ed65c1 100644 --- a/core/sessions/localauth/orm_test.go +++ b/core/sessions/localauth/orm_test.go @@ -166,6 +166,7 @@ func TestORM_DeleteUserCascade(t *testing.T) { func TestORM_CreateSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, orm := setupORM(t) @@ -205,6 +206,7 @@ func TestORM_CreateSession(t *testing.T) { func TestORM_WebAuthn(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -286,6 +288,7 @@ func TestORM_WebAuthn(t *testing.T) { func TestOrm_GenerateAuthToken(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) diff --git a/core/sessions/localauth/reaper_test.go b/core/sessions/localauth/reaper_test.go index 806c9448682..a0dece68b23 100644 --- a/core/sessions/localauth/reaper_test.go +++ b/core/sessions/localauth/reaper_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -31,6 +32,7 @@ func (c sessionReaperConfig) SessionReaperExpiration() commonconfig.Duration { func TestSessionReaper_ReapSessions(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) config := sessionReaperConfig{} diff --git a/core/sessions/oidcauth/oidc_test.go b/core/sessions/oidcauth/oidc_test.go index 63427b6ea0b..7d9077939ac 100644 --- a/core/sessions/oidcauth/oidc_test.go +++ b/core/sessions/oidcauth/oidc_test.go @@ -88,6 +88,7 @@ func TestORM_FindUserByAPIToken_Success(t *testing.T) { } func TestORM_FindUserByAPIToken_Expired(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Init OIDC authenticator cfg := oidcauth.TestConfig{} From 8dfbb9141a9a62a19b9f36b4865b176aed3e0675 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 15:58:12 -0800 Subject: [PATCH 15/30] more test tagging --- core/bridges/orm_test.go | 2 + core/cmd/shell_remote_test.go | 20 +++++++ core/cmd/shell_test.go | 15 ++++++ core/logger/test_logger_test.go | 2 +- core/logger/zap_test.go | 2 +- core/services/blockhashstore/delegate_test.go | 4 ++ core/services/chainlink/config_test.go | 2 +- core/services/feeds/service_test.go | 52 +++++++++++++++---- core/services/job/job_orm_test.go | 48 ++++++++++++++++- .../keeper/registry1_1_synchronizer_test.go | 6 +++ core/services/keystore/csa_test.go | 2 + core/services/llo/cleanup_test.go | 1 + .../persistence_manager_test.go | 3 ++ core/services/ocr/database_test.go | 2 + core/services/ocr2/database_test.go | 4 +- .../ccip/internal/cache/commit_roots_test.go | 1 + .../ccipdata/commit_store_reader_test.go | 1 + .../internal/ccipdata/offramp_reader_test.go | 4 ++ .../evmregistry/v21/upkeepstate/store_test.go | 3 ++ .../ocr2/plugins/s4/integration_test.go | 6 +++ .../ocr2/plugins/vault/plugin_test.go | 44 ++++++++++++++++ .../ocr2/plugins/vault/transmitter_test.go | 2 + core/services/pipeline/orm_test.go | 9 ++++ core/services/registrysyncer/syncer_test.go | 4 ++ core/services/relay/evm/mercury/orm_test.go | 4 ++ core/services/relay/evm/write_target_test.go | 1 + core/services/versioning/orm_test.go | 2 + core/services/vrf/delegate_test.go | 6 +++ core/services/vrf/v2/listener_v2_test.go | 5 ++ .../external_initiator_manager_test.go | 2 + core/services/workflows/artifacts/orm_test.go | 6 +++ .../workflows/artifacts/v2/orm_test.go | 1 + .../services/workflows/syncer/handler_test.go | 2 + .../workflows/syncer/v2/handler_test.go | 1 + .../syncer/v2/workflow_registry_test.go | 5 ++ .../syncer/v2/workflow_syncer_v2_test.go | 7 +++ core/sessions/ldapauth/ldap_test.go | 5 ++ core/sessions/oidcauth/oidc_test.go | 9 ++++ main_test.go | 4 +- 39 files changed, 282 insertions(+), 17 deletions(-) diff --git a/core/bridges/orm_test.go b/core/bridges/orm_test.go index 3a130cc6f02..e73e1c4b2e1 100644 --- a/core/bridges/orm_test.go +++ b/core/bridges/orm_test.go @@ -165,6 +165,7 @@ func TestORM_TestCachedResponse(t *testing.T) { } func TestORM_CreateExternalInitiator(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) @@ -183,6 +184,7 @@ func TestORM_CreateExternalInitiator(t *testing.T) { } func TestORM_DeleteExternalInitiator(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm := setupORM(t) diff --git a/core/cmd/shell_remote_test.go b/core/cmd/shell_remote_test.go index bd9e8f2a25a..fc3ce46bf37 100644 --- a/core/cmd/shell_remote_test.go +++ b/core/cmd/shell_remote_test.go @@ -24,6 +24,7 @@ import ( "github.com/smartcontractkit/quarantine" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink/v2/core/auth" @@ -118,6 +119,7 @@ func deleteKeyExportFile(t *testing.T) { func TestShell_ReplayBlocks(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) c.EVM[0].NonceAutoSync = ptr(false) @@ -153,6 +155,7 @@ func TestShell_ReplayBlocks(t *testing.T) { func TestShell_CreateExternalInitiator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -193,6 +196,7 @@ func TestShell_CreateExternalInitiator(t *testing.T) { func TestShell_CreateExternalInitiator_Errors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -230,6 +234,7 @@ func TestShell_CreateExternalInitiator_Errors(t *testing.T) { func TestShell_DestroyExternalInitiator(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.JobPipeline.ExternalInitiatorsEnabled = ptr(true) @@ -256,6 +261,7 @@ func TestShell_DestroyExternalInitiator(t *testing.T) { func TestShell_DestroyExternalInitiator_NotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.JobPipeline.ExternalInitiatorsEnabled = ptr(true) @@ -273,6 +279,8 @@ func TestShell_DestroyExternalInitiator_NotFound(t *testing.T) { } func TestShell_RemoteLogin(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + app := startNewApplicationV2(t, nil) orm := app.AuthenticationProvider() @@ -315,6 +323,7 @@ func TestShell_RemoteLogin(t *testing.T) { func TestShell_RemoteBuildCompatibility(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) u := cltest.NewUserWithSession(t, app.AuthenticationProvider()) @@ -354,6 +363,7 @@ func TestShell_RemoteBuildCompatibility(t *testing.T) { func TestShell_CheckRemoteBuildCompatibility(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) u := cltest.NewUserWithSession(t, app.AuthenticationProvider()) @@ -430,6 +440,7 @@ func (h *mockHTTPClient) Delete(ctx context.Context, path string) (*http.Respons func TestShell_ChangePassword(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) u := cltest.NewUserWithSession(t, app.AuthenticationProvider()) @@ -479,6 +490,7 @@ func TestShell_ChangePassword(t *testing.T) { } func TestShell_Profile(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1796") t.Parallel() @@ -515,6 +527,7 @@ func TestShell_Profile(t *testing.T) { func TestShell_Profile_Unauthenticated(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) @@ -531,6 +544,7 @@ func TestShell_Profile_Unauthenticated(t *testing.T) { func TestShell_ConfigV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -550,6 +564,7 @@ func TestShell_ConfigV2(t *testing.T) { func TestShell_RunOCRJob_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM[0].Enabled = ptr(true) @@ -596,6 +611,7 @@ func TestShell_RunOCRJob_HappyPath(t *testing.T) { func TestShell_RunOCRJob_MissingJobID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -613,6 +629,7 @@ func TestShell_RunOCRJob_MissingJobID(t *testing.T) { func TestShell_RunOCRJob_JobNotFound(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() @@ -632,6 +649,7 @@ func TestShell_RunOCRJob_JobNotFound(t *testing.T) { func TestShell_AutoLogin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -661,6 +679,7 @@ func TestShell_AutoLogin(t *testing.T) { func TestShell_AutoLogin_AuthFails(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := startNewApplicationV2(t, nil) @@ -700,6 +719,7 @@ func (FailingAuthenticator) Logout() error { func TestShell_SetLogConfig(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") app := startNewApplicationV2(t, nil) client, _ := app.NewShellAndRenderer() diff --git a/core/cmd/shell_test.go b/core/cmd/shell_test.go index c5a72a93a1d..b4d799c0b45 100644 --- a/core/cmd/shell_test.go +++ b/core/cmd/shell_test.go @@ -24,6 +24,7 @@ import ( commonevents "github.com/smartcontractkit/chainlink-protos/workflows/go/common" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -42,6 +43,7 @@ import ( func TestTerminalCookieAuthenticator_AuthenticateWithoutSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -73,6 +75,7 @@ func TestTerminalCookieAuthenticator_AuthenticateWithoutSession(t *testing.T) { func TestTerminalCookieAuthenticator_AuthenticateWithSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) app := cltest.NewApplicationEVMDisabled(t) @@ -123,6 +126,7 @@ func (d diskCookieStoreConfig) RootDir() string { func TestDiskCookieStore_Retrieve(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") cfg := diskCookieStoreConfig{} @@ -151,6 +155,7 @@ func TestDiskCookieStore_Retrieve(t *testing.T) { } func TestTerminalAPIInitializer_InitializeWithoutAPIUser(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") email := "good@email.com" tests := []struct { @@ -224,6 +229,7 @@ func TestTerminalAPIInitializer_InitializeWithExistingAPIUser(t *testing.T) { } func TestFileAPIInitializer_InitializeWithoutAPIUser(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string file string @@ -261,6 +267,7 @@ func TestFileAPIInitializer_InitializeWithoutAPIUser(t *testing.T) { } func TestFileAPIInitializer_InitializeWithExistingAPIUser(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) orm := localauth.NewORM(db, time.Minute, logger.TestLogger(t), audit.NoopLogger) @@ -291,6 +298,7 @@ func TestFileAPIInitializer_InitializeWithExistingAPIUser(t *testing.T) { func TestPromptingSessionRequestBuilder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { email, pwd string @@ -314,6 +322,7 @@ func TestPromptingSessionRequestBuilder(t *testing.T) { func TestFileSessionRequestBuilder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") builder := cmd.NewFileSessionRequestBuilder(logger.TestLogger(t)) tests := []struct { @@ -339,6 +348,7 @@ func TestFileSessionRequestBuilder(t *testing.T) { } func TestNewUserCache(t *testing.T) { + tests.BelongsToCISuite(t, "unit") r, err := rand.Int(rand.Reader, big.NewInt(256*1024*1024)) require.NoError(t, err) // NewUserCache owns it's Dir. @@ -356,6 +366,8 @@ func TestNewUserCache(t *testing.T) { } func TestSetupSolanaRelayer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + lggr := logger.TestLogger(t) reg := plugins.NewTestLoopRegistry(lggr) ks := &keystore.StarknetLooppSigner{StarkNet: mocks.NewStarkNet(t)} @@ -484,6 +496,8 @@ func TestSetupSolanaRelayer(t *testing.T) { } func TestSetupStarkNetRelayer(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + lggr := logger.TestLogger(t) reg := plugins.NewTestLoopRegistry(lggr) ks := &keystore.StarknetLooppSigner{StarkNet: mocks.NewStarkNet(t)} @@ -624,6 +638,7 @@ func getFuncName(i any) string { } func TestShell_emitNodeConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") // t.Parallel() // beholder tester uses t.SetEnv and cannot use t.Parallel ctx := testutils.Context(t) diff --git a/core/logger/test_logger_test.go b/core/logger/test_logger_test.go index 634565b0e20..f4e252a7cad 100644 --- a/core/logger/test_logger_test.go +++ b/core/logger/test_logger_test.go @@ -17,7 +17,7 @@ func init() { } func TestTestLogger(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") lgr, observed := TestLoggerObserved(t, zapcore.DebugLevel) const ( diff --git a/core/logger/zap_test.go b/core/logger/zap_test.go index 125d62aec79..50566987a5c 100644 --- a/core/logger/zap_test.go +++ b/core/logger/zap_test.go @@ -210,7 +210,7 @@ func TestZapLogger_OutOfDiskSpace(t *testing.T) { } func TestZapLogger_LogCaller(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") maxSize := utils.FileSize(5 * utils.MB) logsDir := t.TempDir() diff --git a/core/services/blockhashstore/delegate_test.go b/core/services/blockhashstore/delegate_test.go index c5acde73a42..6e43d6c4bbd 100644 --- a/core/services/blockhashstore/delegate_test.go +++ b/core/services/blockhashstore/delegate_test.go @@ -27,10 +27,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDelegate_JobType(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) delegate := blockhashstore.NewDelegate(nil, lggr, nil, nil) @@ -85,6 +87,7 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) { func TestDelegate_ServicesForSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") delegate, testData := createTestDelegate(t) @@ -152,6 +155,7 @@ func TestDelegate_ServicesForSpec(t *testing.T) { func TestDelegate_StartStop(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") delegate, testData := createTestDelegate(t) diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 0776374a561..79eec469381 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1827,7 +1827,7 @@ func TestNewGeneralConfig_SecretsOverrides(t *testing.T) { } func TestSecrets_Validate(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") for _, tt := range []struct { name string toml string diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 56cee26c74c..c9a2e8b693d 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -526,6 +526,7 @@ func Test_Service_EnableFeedsManager(t *testing.T) { } func Test_Service_DisableFeedsManager(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") mgr := feeds.FeedsManager{ID: 1} svc := setupTestService(t) @@ -560,7 +561,8 @@ func Test_Service_ListManagersByIDs(t *testing.T) { } func Test_Service_CreateChainConfig(t *testing.T) { - tests := []struct { + tests.BelongsToCISuite(t, "unit") + testCases := []struct { name string chainType feeds.ChainType expectedID int64 @@ -598,7 +600,7 @@ func Test_Service_CreateChainConfig(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { var ( mgr = feeds.FeedsManager{ID: 1} @@ -670,6 +672,7 @@ func Test_Service_CreateChainConfig(t *testing.T) { } func Test_Service_CreateChainConfig_InvalidAdminAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgr = feeds.FeedsManager{ID: 1} cfg = feeds.ChainConfig{ @@ -691,6 +694,7 @@ func Test_Service_CreateChainConfig_InvalidAdminAddress(t *testing.T) { } func Test_Service_DeleteChainConfig(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgr = feeds.FeedsManager{ID: 1} nodeVersion = &versioning.NodeVersion{ @@ -731,6 +735,7 @@ func Test_Service_DeleteChainConfig(t *testing.T) { } func Test_Service_ListChainConfigsByManagerIDs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) var ( mgr = feeds.FeedsManager{ID: 1} @@ -751,7 +756,8 @@ func Test_Service_ListChainConfigsByManagerIDs(t *testing.T) { } func Test_Service_UpdateChainConfig(t *testing.T) { - tests := []struct { + tests.BelongsToCISuite(t, "unit") + testCases := []struct { name string chainType feeds.ChainType expectedChainType proto.ChainType @@ -783,7 +789,7 @@ func Test_Service_UpdateChainConfig(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { var ( mgr = feeds.FeedsManager{ID: 1} @@ -848,6 +854,7 @@ func Test_Service_UpdateChainConfig(t *testing.T) { } func Test_Service_UpdateChainConfig_InvalidAdminAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( mgr = feeds.FeedsManager{ID: 1} cfg = feeds.ChainConfig{ @@ -870,6 +877,7 @@ func Test_Service_UpdateChainConfig_InvalidAdminAddress(t *testing.T) { func Test_Service_ProposeJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( idFluxMonitor = int64(1) @@ -1351,6 +1359,7 @@ func Test_Service_ProposeJob(t *testing.T) { func Test_Service_DeleteJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( remoteUUID = uuid.New() @@ -1667,6 +1676,7 @@ func Test_Service_DeleteJob(t *testing.T) { func Test_Service_RevokeJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( remoteUUID = uuid.New() @@ -1893,7 +1903,8 @@ answer1 [type=median index=0]; } func Test_Service_SyncNodeInfo(t *testing.T) { - tests := []struct { + tests.BelongsToCISuite(t, "unit") + testCases := []struct { name string chainType feeds.ChainType protoType proto.ChainType @@ -1925,7 +1936,7 @@ func Test_Service_SyncNodeInfo(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { p2pKey1 := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(1)) p2pKey2 := p2pkey.MustNewV2XXXTestingOnly(big.NewInt(2)) @@ -2045,6 +2056,7 @@ func Test_Service_SyncNodeInfo(t *testing.T) { func Test_Service_syncNodeInfoWithRetry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") mgr := feeds.FeedsManager{ID: 1} nodeVersion := &versioning.NodeVersion{Version: "1.0.0"} @@ -2093,7 +2105,7 @@ func Test_Service_syncNodeInfoWithRetry(t *testing.T) { } } - tests := []struct { + testCases := []struct { name string setup func(t *testing.T, svc *TestService) run func(svc *TestService) (any, error) @@ -2203,7 +2215,7 @@ func Test_Service_syncNodeInfoWithRetry(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -2223,6 +2235,7 @@ func Test_Service_syncNodeInfoWithRetry(t *testing.T) { func Test_Service_IsJobManaged(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") svc := setupTestService(t) ctx := testutils.Context(t) @@ -2237,6 +2250,7 @@ func Test_Service_IsJobManaged(t *testing.T) { func Test_Service_ListJobProposalsByManagersIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) var ( @@ -2275,6 +2289,8 @@ func Test_Service_GetJobProposal(t *testing.T) { } func Test_Service_CancelSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + var ( externalJobID = uuid.New() jp = &feeds.JobProposal{ @@ -2507,6 +2523,7 @@ func Test_Service_CancelSpec(t *testing.T) { func Test_Service_GetSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) var ( @@ -2526,6 +2543,7 @@ func Test_Service_GetSpec(t *testing.T) { func Test_Service_ListSpecsByJobProposalIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) var ( @@ -2546,6 +2564,7 @@ func Test_Service_ListSpecsByJobProposalIDs(t *testing.T) { } func Test_Service_ApproveSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var evmChainID *evmbig.Big address := types.EIP55AddressFromAddress(common.Address{}) externalJobID := uuid.New() @@ -3275,6 +3294,8 @@ answer1 [type=median index=0]; } func Test_Service_ApproveSpec_OCR2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + address := "0x613a38AC1659769640aaE063C651F48E0250454C" feedIDHex := "0x0000000000000000000000000000000000000000000000000000000000000001" feedID := common.HexToHash(feedIDHex) @@ -3866,6 +3887,8 @@ updateInterval = "20m" } func Test_Service_ApproveSpec_Stream(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + externalJobID := uuid.New() streamName := "LINK / ETH | version 3 | contract 0x0000000000000000000000000000000000000000" streamID := uint32(1009001032) @@ -4384,6 +4407,8 @@ func Test_Service_ApproveSpec_Stream(t *testing.T) { } func Test_Service_ApproveSpec_Bootstrap(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + address := "0x613a38AC1659769640aaE063C651F48E0250454C" feedIDHex := "0x0000000000000000000000000000000000000000000000000000000000000001" feedID := common.HexToHash(feedIDHex) @@ -4929,6 +4954,8 @@ chainID = 0 } func Test_Service_RejectSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + var ( ctx = testutils.Context(t) jp = &feeds.JobProposal{ @@ -5068,6 +5095,8 @@ func Test_Service_RejectSpec(t *testing.T) { } func Test_Service_UpdateSpecDefinition(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + var ( ctx = testutils.Context(t) specID = int64(1) @@ -5157,6 +5186,8 @@ func Test_Service_UpdateSpecDefinition(t *testing.T) { } func Test_Service_StartStop(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + key := cltest.DefaultCSAKey var ( @@ -5175,7 +5206,7 @@ func Test_Service_StartStop(t *testing.T) { _, err := hex.Decode([]byte(pubKeyHex), pubKey) require.NoError(t, err) - tests := []struct { + testCases := []struct { name string enableMultiFeedsManagers bool beforeFunc func(svc *TestService) @@ -5217,7 +5248,7 @@ func Test_Service_StartStop(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -5254,6 +5285,7 @@ func logMessages(logEntries []observer.LoggedEntry) []string { func Test_Service_GetJobRuns(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( remoteUUID = uuid.New() diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 053f6b41dd8..acce3e26015 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -703,6 +703,7 @@ func TestORM_CreateJob_VRFV2Plus(t *testing.T) { } func TestORM_CreateJob_OCRBootstrap(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) db := pgtest.NewSqlxDB(t) @@ -731,6 +732,7 @@ func TestORM_CreateJob_OCRBootstrap(t *testing.T) { } func TestORM_CreateJob_EVMChainID_Validation(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") config := configtest.NewGeneralConfig(t, nil) db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) @@ -815,6 +817,8 @@ func TestORM_CreateJob_EVMChainID_Validation(t *testing.T) { } func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) customChainID := big.New(testutils.NewRandomEVMChainID()) @@ -892,6 +896,8 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) { } func TestORM_CreateJob_OCR2_DuplicatedContractAddress(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) customChainID := big.New(testutils.NewRandomEVMChainID()) @@ -954,6 +960,8 @@ func TestORM_CreateJob_OCR2_DuplicatedContractAddress(t *testing.T) { } func TestORM_CreateJob_OCR2_Sending_Keys_Transmitter_Keys_Validations(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) customChainID := big.New(testutils.NewRandomEVMChainID()) @@ -1013,6 +1021,8 @@ func TestORM_CreateJob_OCR2_Sending_Keys_Transmitter_Keys_Validations(t *testing } func TestORM_ValidateKeyStoreMatch(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) {}) @@ -1125,6 +1135,8 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { func Test_FindJobs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1200,6 +1212,8 @@ func Test_FindJobs(t *testing.T) { func Test_FindJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) evmRelay := "evm" chainID1 := int64(1337) @@ -1445,6 +1459,8 @@ func Test_FindJob(t *testing.T) { func Test_FindJobsByPipelineSpecIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1496,6 +1512,8 @@ func Test_FindJobsByPipelineSpecIDs(t *testing.T) { func Test_FindPipelineRuns(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1565,6 +1583,8 @@ func Test_FindPipelineRuns(t *testing.T) { func Test_PipelineRunsByJobID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1633,6 +1653,8 @@ func Test_PipelineRunsByJobID(t *testing.T) { } func Test_FindPipelineRunIDsByJobID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) var jb job.Job @@ -1755,6 +1777,8 @@ func Test_FindPipelineRunIDsByJobID(t *testing.T) { func Test_FindPipelineRunsByIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1822,6 +1846,8 @@ func Test_FindPipelineRunsByIDs(t *testing.T) { func Test_FindPipelineRunByID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1868,6 +1894,8 @@ func Test_FindPipelineRunByID(t *testing.T) { func Test_FindJobWithoutSpecErrors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1906,6 +1934,8 @@ func Test_FindJobWithoutSpecErrors(t *testing.T) { func Test_FindSpecErrorsByJobIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1941,6 +1971,8 @@ func Test_FindSpecErrorsByJobIDs(t *testing.T) { func Test_CountPipelineRunsByJobID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -1998,9 +2030,11 @@ func Test_CountPipelineRunsByJobID(t *testing.T) { } func Test_ORM_FindJobByWorkflow(t *testing.T) { + t.Parallel() + tests.BelongsToCISuite(t, "with-db") + var addr1 = "0x0123456789012345678901234567890123456789" var addr2 = "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" - t.Parallel() type fields struct { ds sqlutil.DataSource } @@ -2123,9 +2157,11 @@ func Test_ORM_FindJobByWorkflow(t *testing.T) { } func Test_ORM_FindJobByWorkflow_Multiple(t *testing.T) { + t.Parallel() + tests.BelongsToCISuite(t, "with-db") + var addr1 = "0x012345678901234567890123456789012345ffff" var addr2 = "0xabcdefabcdefabcdefabcdefabcdefabcdef0000" - t.Parallel() t.Run("multiple jobs", func(t *testing.T) { db := pgtest.NewSqlxDB(t) o := NewTestORM(t, @@ -2226,6 +2262,7 @@ func mustInsertPipelineRun(t *testing.T, orm pipeline.ORM, j job.Job) pipeline.R } func TestORM_CreateJob_OCR2_With_DualTransmission(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) customChainID := big.New(testutils.NewRandomEVMChainID()) @@ -2307,6 +2344,7 @@ func TestORM_CreateJob_OCR2_With_DualTransmission(t *testing.T) { } func TestORM_CreateJob_KeyLocking(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) customChainID := big.New(testutils.NewRandomEVMChainID()) @@ -2409,6 +2447,7 @@ func TestORM_CreateJob_KeyLocking(t *testing.T) { func Test_FindGatewayJobID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -2446,6 +2485,7 @@ func Test_FindGatewayJobID(t *testing.T) { func Test_FindGatewayJobID_NoMatch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -2483,6 +2523,7 @@ func Test_FindGatewayJobID_NoMatch(t *testing.T) { func Test_FindStandardCapabilityJobID(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -2516,6 +2557,7 @@ func Test_FindStandardCapabilityJobID(t *testing.T) { func Test_FindStandardCapabilityJobID_NoMatch(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) @@ -2548,6 +2590,8 @@ func Test_FindStandardCapabilityJobID_NoMatch(t *testing.T) { } func TestORM_CRESettings(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + config := configtest.NewGeneralConfig(t, nil) db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) diff --git a/core/services/keeper/registry1_1_synchronizer_test.go b/core/services/keeper/registry1_1_synchronizer_test.go index 7e9742d8490..e120ea9c86f 100644 --- a/core/services/keeper/registry1_1_synchronizer_test.go +++ b/core/services/keeper/registry1_1_synchronizer_test.go @@ -123,6 +123,7 @@ func Test_RegistrySynchronizer1_1_Start(t *testing.T) { func Test_RegistrySynchronizer_CalcPositioningConstant(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") for _, upkeepID := range []int64{0, 1, 100, 10_000} { _, err := keeper.CalcPositioningConstant(ubig.NewI(upkeepID), cltest.NewEIP55Address()) require.NoError(t, err) @@ -130,6 +131,7 @@ func Test_RegistrySynchronizer_CalcPositioningConstant(t *testing.T) { } func Test_RegistrySynchronizer1_1_FullSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_1) @@ -204,6 +206,7 @@ func Test_RegistrySynchronizer1_1_FullSync(t *testing.T) { } func Test_RegistrySynchronizer1_1_ConfigSetLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_1) @@ -252,6 +255,7 @@ func Test_RegistrySynchronizer1_1_ConfigSetLog(t *testing.T) { } func Test_RegistrySynchronizer1_1_KeepersUpdatedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_1) @@ -298,6 +302,7 @@ func Test_RegistrySynchronizer1_1_KeepersUpdatedLog(t *testing.T) { cltest.AssertCount(t, db, "keeper_registries", 1) } func Test_RegistrySynchronizer1_1_UpkeepCanceledLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_1) @@ -336,6 +341,7 @@ func Test_RegistrySynchronizer1_1_UpkeepCanceledLog(t *testing.T) { } func Test_RegistrySynchronizer1_1_UpkeepRegisteredLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_1) diff --git a/core/services/keystore/csa_test.go b/core/services/keystore/csa_test.go index 281cd0933c5..9ffe8f5a087 100644 --- a/core/services/keystore/csa_test.go +++ b/core/services/keystore/csa_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -17,6 +18,7 @@ import ( ) func Test_CSAKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) diff --git a/core/services/llo/cleanup_test.go b/core/services/llo/cleanup_test.go index db974996871..2d8915e16c1 100644 --- a/core/services/llo/cleanup_test.go +++ b/core/services/llo/cleanup_test.go @@ -159,6 +159,7 @@ WHERE transmission_hash IN ( } func Test_OrphanedTransmissionReaper(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ds := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) tr := &transmissionReaper{ds: ds, lggr: lggr, maxAge: 24 * time.Hour} diff --git a/core/services/llo/mercurytransmitter/persistence_manager_test.go b/core/services/llo/mercurytransmitter/persistence_manager_test.go index 45207bd6f22..3a835e3dd1b 100644 --- a/core/services/llo/mercurytransmitter/persistence_manager_test.go +++ b/core/services/llo/mercurytransmitter/persistence_manager_test.go @@ -84,6 +84,7 @@ func TestPersistenceManager(t *testing.T) { } func TestPersistenceManagerAsyncDelete(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) donID := uint32(1234) db := pgtest.NewSqlxDB(t) @@ -108,6 +109,7 @@ func TestPersistenceManagerAsyncDelete(t *testing.T) { } func TestPersistenceManagerPrune(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") donID1 := uint32(123456) donID2 := uint32(654321) db := pgtest.NewSqlxDB(t) @@ -158,6 +160,7 @@ func TestPersistenceManagerPrune(t *testing.T) { } func Test_PersistenceManager_deleteTransmissions(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") donID1 := uint32(123456) db := pgtest.NewSqlxDB(t) diff --git a/core/services/ocr/database_test.go b/core/services/ocr/database_test.go index 5e53620a929..8d95aa8a849 100644 --- a/core/services/ocr/database_test.go +++ b/core/services/ocr/database_test.go @@ -186,6 +186,7 @@ func assertPendingTransmissionEqual(t *testing.T, pt1, pt2 ocrtypes.PendingTrans } func Test_DB_PendingTransmissions(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) sqlDB := db ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -390,6 +391,7 @@ func Test_DB_PendingTransmissions(t *testing.T) { } func Test_DB_LatestRoundRequested(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) sqlDB := db diff --git a/core/services/ocr2/database_test.go b/core/services/ocr2/database_test.go index 25a77beec6e..a1b92849c08 100644 --- a/core/services/ocr2/database_test.go +++ b/core/services/ocr2/database_test.go @@ -47,7 +47,7 @@ func MustInsertOCROracleSpec(t *testing.T, db *sqlx.DB, transmitterAddress types require.NoError(t, err) require.NoError(t, db.Get(&spec, `INSERT INTO ocr2_oracle_specs ( -relay, relay_config, contract_id, p2pv2_bootstrappers, ocr_key_bundle_id, monitoring_endpoint, transmitter_id, +relay, relay_config, contract_id, p2pv2_bootstrappers, ocr_key_bundle_id, monitoring_endpoint, transmitter_id, blockchain_timeout, contract_config_tracker_poll_interval, contract_config_confirmations, plugin_type, plugin_config, onchain_signing_strategy, allow_no_bootstrappers, created_at, updated_at) VALUES ( 'ethereum', '{}', $1, '{}', $2, $3, $4, 0, 0, 0, 'median', $5, '{}', $6, NOW(), NOW() @@ -243,6 +243,7 @@ func assertPendingTransmissionEqual(t *testing.T, pt1, pt2 ocrtypes.PendingTrans } func Test_DB_PendingTransmissions(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") sqlDB := setupDB(t) ethKeyStore := cltest.NewKeyStore(t, sqlDB).Eth() @@ -450,6 +451,7 @@ func Test_DB_PendingTransmissions(t *testing.T) { } func Test_DB_ReadWriteProtocolState(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") sqlDB := setupDB(t) lggr := logger.TestLogger(t) diff --git a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go index 53c3e135d8a..e8dbcd65236 100644 --- a/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go +++ b/core/services/ocr2/plugins/ccip/internal/cache/commit_roots_test.go @@ -216,6 +216,7 @@ func Test_RootsEligibleForExecutionWithReorgs(t *testing.T) { // Not very likely, but let's be more defensive here and verify if cache works properly and can deal with duplicates func Test_BlocksWithTheSameTimestamps(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) chainID := testutils.NewRandomEVMChainID() orm := logpoller.NewORM(chainID, pgtest.NewSqlxDB(t), logger.TestLogger(t)) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go index 80e6148e53e..3efff7c6343 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/commit_store_reader_test.go @@ -353,6 +353,7 @@ func TestCommitStoreReaders(t *testing.T) { } func TestNewCommitStoreReader(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { typeAndVersion string expectedErr string diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/offramp_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/offramp_reader_test.go index 69ab492b3e5..74d5d3e6267 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/offramp_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/offramp_reader_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/commit_store_helper" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_offramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/mock_rmn_contract" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -41,6 +42,7 @@ type offRampReaderTH struct { } func TestExecOnchainConfig120(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string want v1_2_0.ExecOnchainConfig @@ -83,6 +85,7 @@ func TestExecOnchainConfig120(t *testing.T) { } func TestOffRampReaderInit(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string version string @@ -286,6 +289,7 @@ func testOffRampReader(t *testing.T, th offRampReaderTH) { } func TestNewOffRampReader(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { typeAndVersion string expectedErr string diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go index 762c6609d4e..a3345722646 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store_test.go @@ -383,6 +383,7 @@ func TestUpkeepStateStore_SetSelectIntegration(t *testing.T) { } func TestUpkeepStateStore_emptyDB(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("querying non-stored workIDs on empty db returns unknown state results", func(t *testing.T) { lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.ErrorLevel) chainID := testutils.FixtureChainID @@ -417,6 +418,7 @@ func TestUpkeepStateStore_emptyDB(t *testing.T) { } func TestUpkeepStateStore_Upsert(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -447,6 +449,7 @@ func TestUpkeepStateStore_Upsert(t *testing.T) { } func TestUpkeepStateStore_Service(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := testutils.Context(t) orm := &mockORM{ onDelete: func(tm time.Time) { diff --git a/core/services/ocr2/plugins/s4/integration_test.go b/core/services/ocr2/plugins/s4/integration_test.go index 44541d957c1..d63f9679d02 100644 --- a/core/services/ocr2/plugins/s4/integration_test.go +++ b/core/services/ocr2/plugins/s4/integration_test.go @@ -213,6 +213,7 @@ func TestS4Integration_HappyDON_4X(t *testing.T) { } func TestS4Integration_WrongSignature(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") don := newDON(t, 4, createPluginConfig(100)) ctx := testutils.Context(t) @@ -248,6 +249,7 @@ func TestS4Integration_WrongSignature(t *testing.T) { } func TestS4Integration_MaxObservations(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") config := createPluginConfig(100) config.MaxObservationEntries = 5 don := newDON(t, 4, config) @@ -275,6 +277,7 @@ func TestS4Integration_MaxObservations(t *testing.T) { } func TestS4Integration_Expired(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") config := createPluginConfig(100) config.MaxObservationEntries = 5 don := newDON(t, 4, config) @@ -300,6 +303,7 @@ func TestS4Integration_Expired(t *testing.T) { } func TestS4Integration_NSnapshotShards(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") config := createPluginConfig(10000) config.NSnapshotShards = 4 don := newDON(t, 4, config) @@ -328,6 +332,7 @@ func TestS4Integration_NSnapshotShards(t *testing.T) { } func TestS4Integration_OneNodeOutOfSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") don := newDON(t, 4, createPluginConfig(100)) ctx := testutils.Context(t) @@ -355,6 +360,7 @@ func TestS4Integration_OneNodeOutOfSync(t *testing.T) { } func TestS4Integration_RandomState(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") don := newDON(t, 4, createPluginConfig(1000)) ctx := testutils.Context(t) diff --git a/core/services/ocr2/plugins/vault/plugin_test.go b/core/services/ocr2/plugins/vault/plugin_test.go index da353a21df9..20c6d431159 100644 --- a/core/services/ocr2/plugins/vault/plugin_test.go +++ b/core/services/ocr2/plugins/vault/plugin_test.go @@ -214,6 +214,7 @@ func TestPlugin_ReportingPluginFactory_UseDKGResult(t *testing.T) { } func TestPlugin_ReportingPluginFactory_InvalidParams(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() @@ -268,6 +269,7 @@ func makeReportingPluginConfig( } func TestPlugin_Observation_NothingInBatch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -301,6 +303,7 @@ func TestPlugin_Observation_NothingInBatch(t *testing.T) { } func TestPlugin_Observation_GetSecretsRequest_SecretIdentifierInvalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tcs := []struct { name string id *vaultcommon.SecretIdentifier @@ -397,6 +400,7 @@ func TestPlugin_Observation_GetSecretsRequest_SecretIdentifierInvalid(t *testing } func TestPlugin_Observation_GetSecretsRequest_FillsInNamespace(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -478,6 +482,7 @@ func TestPlugin_Observation_GetSecretsRequest_FillsInNamespace(t *testing.T) { } func TestPlugin_Observation_GetSecretsRequest_SecretDoesNotExist(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -538,6 +543,7 @@ func TestPlugin_Observation_GetSecretsRequest_SecretDoesNotExist(t *testing.T) { } func TestPlugin_Observation_GetSecretsRequest_SecretExistsButIsIncorrect(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -615,6 +621,7 @@ func TestPlugin_Observation_GetSecretsRequest_SecretExistsButIsIncorrect(t *test } func TestPlugin_Observation_GetSecretsRequest_PublicKeyIsInvalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -690,6 +697,7 @@ func TestPlugin_Observation_GetSecretsRequest_PublicKeyIsInvalid(t *testing.T) { } func TestPlugin_Observation_GetSecretsRequest_SecretLabelIsInvalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -773,6 +781,7 @@ func TestPlugin_Observation_GetSecretsRequest_SecretLabelIsInvalid(t *testing.T) } func TestPlugin_Observation_GetSecretsRequest_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -882,6 +891,7 @@ func TestPlugin_Observation_GetSecretsRequest_Success(t *testing.T) { } func TestPlugin_Observation_CreateSecretsRequest_SecretIdentifierInvalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tcs := []struct { name string id *vaultcommon.SecretIdentifier @@ -979,6 +989,7 @@ func TestPlugin_Observation_CreateSecretsRequest_SecretIdentifierInvalid(t *test } func TestPlugin_Observation_CreateSecretsRequest_DisallowsDuplicateRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -1047,6 +1058,7 @@ func TestPlugin_Observation_CreateSecretsRequest_DisallowsDuplicateRequests(t *t } func TestPlugin_StateTransition_CreateSecretsRequest_CorrectlyTracksLimits(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1161,6 +1173,7 @@ func TestPlugin_StateTransition_CreateSecretsRequest_CorrectlyTracksLimits(t *te } func TestPlugin_Observation_CreateSecretsRequest_InvalidCiphertext(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -1222,6 +1235,7 @@ func TestPlugin_Observation_CreateSecretsRequest_InvalidCiphertext(t *testing.T) } func TestPlugin_Observation_CreateSecretsRequest_InvalidCiphertext_TooLong(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -1284,6 +1298,7 @@ func TestPlugin_Observation_CreateSecretsRequest_InvalidCiphertext_TooLong(t *te } func TestPlugin_Observation_CreateSecretsRequest_InvalidCiphertext_EncryptedWithWrongPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() // Wrong key @@ -1357,6 +1372,7 @@ func TestPlugin_Observation_CreateSecretsRequest_InvalidCiphertext_EncryptedWith } func TestPlugin_StateTransition_CreateSecretsRequest_TooManySecretsForOwner(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1446,6 +1462,7 @@ func TestPlugin_StateTransition_CreateSecretsRequest_TooManySecretsForOwner(t *t } func TestPlugin_StateTransition_CreateSecretsRequest_SecretExistsForKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1529,6 +1546,7 @@ func TestPlugin_StateTransition_CreateSecretsRequest_SecretExistsForKey(t *testi } func TestPlugin_Observation_CreateSecretsRequest_Success(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1672,6 +1690,7 @@ func marshalObservations(t *testing.T, observations ...observation) []byte { } func TestPlugin_StateTransition_InsufficientObservations(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1745,6 +1764,7 @@ func TestPlugin_StateTransition_InsufficientObservations(t *testing.T) { } func TestPlugin_ValidateObservations_InvalidObservations(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1833,6 +1853,7 @@ func TestPlugin_ValidateObservations_InvalidObservations(t *testing.T) { } func TestPlugin_StateTransition_ShasDontMatch(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1915,6 +1936,7 @@ func TestPlugin_StateTransition_ShasDontMatch(t *testing.T) { } func TestPlugin_StateTransition_AggregatesValidationErrors(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -1993,6 +2015,7 @@ func TestPlugin_StateTransition_AggregatesValidationErrors(t *testing.T) { } func TestPlugin_StateTransition_GetSecretsRequest_CombinesShares(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -2136,6 +2159,7 @@ func TestPlugin_StateTransition_GetSecretsRequest_CombinesShares(t *testing.T) { } func TestPlugin_StateTransition_CreateSecretsRequest_WritesSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -2232,6 +2256,7 @@ func TestPlugin_StateTransition_CreateSecretsRequest_WritesSecrets(t *testing.T) } func TestPlugin_Reports(t *testing.T) { + tests.BelongsToCISuite(t, "unit") value := "encrypted-value" id := &vaultcommon.SecretIdentifier{ Owner: "owner", @@ -2365,6 +2390,7 @@ func TestPlugin_Reports(t *testing.T) { } func TestPlugin_Observation_UpdateSecretsRequest_SecretIdentifierInvalid(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tcs := []struct { name string id *vaultcommon.SecretIdentifier @@ -2462,6 +2488,7 @@ func TestPlugin_Observation_UpdateSecretsRequest_SecretIdentifierInvalid(t *test } func TestPlugin_Observation_UpdateSecretsRequest_DisallowsDuplicateRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -2530,6 +2557,7 @@ func TestPlugin_Observation_UpdateSecretsRequest_DisallowsDuplicateRequests(t *t } func TestPlugin_Observation_UpdateSecretsRequest_InvalidCiphertext(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -2591,6 +2619,7 @@ func TestPlugin_Observation_UpdateSecretsRequest_InvalidCiphertext(t *testing.T) } func TestPlugin_Observation_UpdateSecretsRequest_InvalidCiphertext_TooLong(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -2653,6 +2682,7 @@ func TestPlugin_Observation_UpdateSecretsRequest_InvalidCiphertext_TooLong(t *te } func TestPlugin_Observation_UpdateSecretsRequest_InvalidCiphertext_EncryptedWithWrongPublicKey(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() // Wrong key @@ -2726,6 +2756,7 @@ func TestPlugin_Observation_UpdateSecretsRequest_InvalidCiphertext_EncryptedWith } func TestPlugin_StateTransition_UpdateSecretsRequest_SecretDoesntExist(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -2821,6 +2852,7 @@ func TestPlugin_StateTransition_UpdateSecretsRequest_SecretDoesntExist(t *testin } func TestPlugin_StateTransition_UpdateSecretsRequest_WritesSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -2933,6 +2965,7 @@ func TestPlugin_StateTransition_UpdateSecretsRequest_WritesSecrets(t *testing.T) } func TestPlugin_Reports_UpdateSecretsRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") value := "encrypted-value" id := &vaultcommon.SecretIdentifier{ Owner: "owner", @@ -3021,6 +3054,7 @@ func TestPlugin_Reports_UpdateSecretsRequest(t *testing.T) { } func TestPlugin_Observation_DeleteSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -3098,6 +3132,7 @@ func TestPlugin_Observation_DeleteSecrets(t *testing.T) { } func TestPlugin_Observation_DeleteSecrets_IdDoesntExist(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -3154,6 +3189,7 @@ func TestPlugin_Observation_DeleteSecrets_IdDoesntExist(t *testing.T) { } func TestPlugin_Observation_DeleteSecrets_InvalidRequestDuplicateIds(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -3215,6 +3251,7 @@ func TestPlugin_Observation_DeleteSecrets_InvalidRequestDuplicateIds(t *testing. } func TestPlugin_StateTransition_DeleteSecretsRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -3324,6 +3361,7 @@ func TestPlugin_StateTransition_DeleteSecretsRequest(t *testing.T) { } func TestPlugin_StateTransition_DeleteSecretsRequest_SecretDoesNotExist(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) @@ -3422,6 +3460,7 @@ func TestPlugin_StateTransition_DeleteSecretsRequest_SecretDoesNotExist(t *testi } func TestPlugin_Reports_DeleteSecretsRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") id := &vaultcommon.SecretIdentifier{ Owner: "owner", Namespace: "main", @@ -3505,6 +3544,7 @@ func TestPlugin_Reports_DeleteSecretsRequest(t *testing.T) { } func TestPlugin_Observation_ListSecretIdentifiers_OwnerRequired(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -3553,6 +3593,7 @@ func TestPlugin_Observation_ListSecretIdentifiers_OwnerRequired(t *testing.T) { } func TestPlugin_Observation_ListSecretIdentifiers_NoNamespaceProvided(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -3647,6 +3688,7 @@ func TestPlugin_Observation_ListSecretIdentifiers_NoNamespaceProvided(t *testing } func TestPlugin_Observation_ListSecretIdentifiers_FilterByNamespace(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) store := requests.NewStore[*vaulttypes.Request]() r := &ReportingPlugin{ @@ -3737,6 +3779,7 @@ func TestPlugin_Observation_ListSecretIdentifiers_FilterByNamespace(t *testing.T } func TestPlugin_Reports_ListSecretIdentifiersRequest(t *testing.T) { + tests.BelongsToCISuite(t, "unit") id := &vaultcommon.SecretIdentifier{ Owner: "owner", Namespace: "main", @@ -3816,6 +3859,7 @@ func TestPlugin_Reports_ListSecretIdentifiersRequest(t *testing.T) { } func TestPlugin_StateTransition_ListSecretIdentifiers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, observed := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() _, pk, shares, err := tdh2easy.GenerateKeys(1, 3) diff --git a/core/services/ocr2/plugins/vault/transmitter_test.go b/core/services/ocr2/plugins/vault/transmitter_test.go index 129de09d672..2e6881b344d 100644 --- a/core/services/ocr2/plugins/vault/transmitter_test.go +++ b/core/services/ocr2/plugins/vault/transmitter_test.go @@ -17,9 +17,11 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTransmitter(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr, _ := logger.TestLoggerObserved(t, zapcore.DebugLevel) store := requests.NewStore[*vaulttypes.Request]() handler := requests.NewHandler[*vaulttypes.Request, *vaulttypes.Response](lggr, store, clockwork.NewFakeClock(), time.Hour) diff --git a/core/services/pipeline/orm_test.go b/core/services/pipeline/orm_test.go index 02dcf933f69..496ce8c0a83 100644 --- a/core/services/pipeline/orm_test.go +++ b/core/services/pipeline/orm_test.go @@ -184,6 +184,7 @@ answer2 [type=bridge name=election_winner index=1]; } func TestInsertFinishedRuns(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm, _ := setupLiteORM(t) @@ -331,6 +332,7 @@ answer2 [type=bridge name=election_winner index=1]; // Tests that inserting run results, then later updating the run results via upsert will work correctly. func Test_PipelineORM_StoreRun_ShouldUpsert(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm, jorm := setupLiteORM(t) @@ -411,6 +413,7 @@ func Test_PipelineORM_StoreRun_ShouldUpsert(t *testing.T) { // Tests that trying to persist a partial run while new data became available (i.e. via /v2/restart) // will detect a restart and update the result data on the Run. func Test_PipelineORM_StoreRun_DetectsRestarts(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm, jorm := setupLiteORM(t) @@ -476,6 +479,7 @@ func Test_PipelineORM_StoreRun_DetectsRestarts(t *testing.T) { } func Test_PipelineORM_StoreRun_UpdateTaskRunResult(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm, jorm := setupLiteORM(t) @@ -558,6 +562,7 @@ func Test_PipelineORM_StoreRun_UpdateTaskRunResult(t *testing.T) { } func Test_PipelineORM_DeleteRun(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm, jorm := setupLiteORM(t) @@ -601,6 +606,7 @@ func Test_PipelineORM_DeleteRun(t *testing.T) { } func Test_PipelineORM_DeleteRunsOlderThan(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) _, orm, jorm := setupHeavyORM(t) @@ -647,6 +653,7 @@ func Test_PipelineORM_DeleteRunsOlderThan(t *testing.T) { func Test_GetUnfinishedRuns_Keepers(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // The test configures single Keeper job with two running tasks. @@ -750,6 +757,7 @@ func Test_GetUnfinishedRuns_Keepers(t *testing.T) { func Test_GetUnfinishedRuns_DirectRequest(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // The test configures single DR job with two task runs: one is running and one is suspended. @@ -845,6 +853,7 @@ func Test_GetUnfinishedRuns_DirectRequest(t *testing.T) { func Test_Prune(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") n := uint64(2) diff --git a/core/services/registrysyncer/syncer_test.go b/core/services/registrysyncer/syncer_test.go index 07bd099fd6e..cb0887441d3 100644 --- a/core/services/registrysyncer/syncer_test.go +++ b/core/services/registrysyncer/syncer_test.go @@ -37,6 +37,7 @@ import ( "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" @@ -193,6 +194,7 @@ func toPeerIDs(ids [][32]byte) []p2ptypes.PeerID { } func TestReader_Integration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) reg, regAddress, owner, sim := startNewChainWithRegistry(t) @@ -376,6 +378,7 @@ func TestReader_Integration(t *testing.T) { } func TestSyncer_DBIntegration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1925") ctx := testutils.Context(t) reg, regAddress, owner, sim := startNewChainWithRegistry(t) @@ -502,6 +505,7 @@ func TestSyncer_DBIntegration(t *testing.T) { } func TestSyncer_LocalNode(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() lggr := logger.TestLogger(t) diff --git a/core/services/relay/evm/mercury/orm_test.go b/core/services/relay/evm/mercury/orm_test.go index 4625d13e388..11f04473160 100644 --- a/core/services/relay/evm/mercury/orm_test.go +++ b/core/services/relay/evm/mercury/orm_test.go @@ -153,6 +153,7 @@ func TestORM(t *testing.T) { } func TestORM_InsertTransmitRequest_MultipleServerURLs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := testutils.NewSqlxDB(t) @@ -198,6 +199,7 @@ func TestORM_InsertTransmitRequest_MultipleServerURLs(t *testing.T) { } func TestORM_PruneTransmitRequests(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := testutils.NewSqlxDB(t) jobID := rand.Int32() // foreign key constraints disabled so value doesn't matter @@ -291,6 +293,7 @@ func TestORM_PruneTransmitRequests(t *testing.T) { } func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := testutils.NewSqlxDB(t) jobID := rand.Int32() // foreign key constraints disabled so value doesn't matter @@ -363,6 +366,7 @@ func TestORM_InsertTransmitRequest_LatestReport(t *testing.T) { } func Test_ReportCodec_FeedIDFromReport(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("FeedIDFromReport extracts the current block number from a valid report", func(t *testing.T) { report := buildSampleV2Report(42) diff --git a/core/services/relay/evm/write_target_test.go b/core/services/relay/evm/write_target_test.go index 3f3ad48ab65..9ef9efaa590 100644 --- a/core/services/relay/evm/write_target_test.go +++ b/core/services/relay/evm/write_target_test.go @@ -497,6 +497,7 @@ func findLogMatch(t *testing.T, observed *observer.ObservedLogs, msg string, key }, 30*time.Second, 1*time.Second) } func TestExtractNetwork(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { networkName string expectedName string diff --git a/core/services/versioning/orm_test.go b/core/services/versioning/orm_test.go index 3f0696684b2..62fdcfd53d0 100644 --- a/core/services/versioning/orm_test.go +++ b/core/services/versioning/orm_test.go @@ -129,6 +129,7 @@ func Test_Version_CheckVersion(t *testing.T) { } func TestORM_CheckVersion_CCIP(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) @@ -209,6 +210,7 @@ func TestORM_CheckVersion_CCIP(t *testing.T) { } func TestORM_NodeVersion_FindLatestNodeVersion(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) orm := NewORM(db, logger.TestLogger(t)) diff --git a/core/services/vrf/delegate_test.go b/core/services/vrf/delegate_test.go index cfe880f6896..3e7d5c1d6af 100644 --- a/core/services/vrf/delegate_test.go +++ b/core/services/vrf/delegate_test.go @@ -366,6 +366,7 @@ func TestDelegate_ValidLog(t *testing.T) { } func TestDelegate_InvalidLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") vuni, listener, jb := setup(t) vuni.lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) done := make(chan struct{}) @@ -430,6 +431,7 @@ func TestDelegate_InvalidLog(t *testing.T) { } func TestFulfilledCheck(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") vuni, listener, jb := setup(t) vuni.lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) done := make(chan struct{}) @@ -478,6 +480,7 @@ func TestFulfilledCheck(t *testing.T) { } func Test_CheckFromAddressMaxGasPrices(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("returns nil error if gasLanePrice not set in job spec", func(tt *testing.T) { spec := ` type = "vrf" @@ -572,6 +575,7 @@ decode_log->vrf->encode_tx->submit_tx } func Test_CheckFromAddressesExist(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("from addresses exist", func(t *testing.T) { ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) @@ -632,6 +636,7 @@ func Test_CheckFromAddressesExist(t *testing.T) { } func Test_FromAddressMaxGasPricesAllEqual(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("all max gas prices equal", func(tt *testing.T) { fromAddresses := []string{ "0x498C2Dce1d3aEDE31A8c808c511C38a809e67684", @@ -689,6 +694,7 @@ func Test_FromAddressMaxGasPricesAllEqual(t *testing.T) { } func Test_VRFV2PlusServiceFailsWhenVRFOwnerProvided(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) vuni := buildVrfUni(t, db, cfg) diff --git a/core/services/vrf/v2/listener_v2_test.go b/core/services/vrf/v2/listener_v2_test.go index c2a3f518dc9..80589fe2c88 100644 --- a/core/services/vrf/v2/listener_v2_test.go +++ b/core/services/vrf/v2/listener_v2_test.go @@ -182,6 +182,7 @@ func addConfirmedEthTxNativePayment(t *testing.T, txStore txmgr.TestEvmTxStore, } func testMaybeSubtractReservedLink(t *testing.T, vrfVersion vrfcommon.Version) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) @@ -337,10 +338,12 @@ func testMaybeSubtractReservedNative(t *testing.T, vrfVersion vrfcommon.Version) } func TestMaybeSubtractReservedNativeV2Plus(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") testMaybeSubtractReservedNative(t, vrfcommon.V2Plus) } func TestMaybeSubtractReservedNativeV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) @@ -369,6 +372,7 @@ func TestMaybeSubtractReservedNativeV2(t *testing.T) { } func TestListener_GetConfirmedAt(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") j, err := vrfcommon.ValidatedVRFSpec(testspecs.GenerateVRFSpec(testspecs.VRFSpecParams{ RequestedConfsDelay: 10, }).Toml()) @@ -409,6 +413,7 @@ func TestListener_GetConfirmedAt(t *testing.T) { } func TestListener_Backoff(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tests = []struct { name string initial time.Duration diff --git a/core/services/webhook/external_initiator_manager_test.go b/core/services/webhook/external_initiator_manager_test.go index d8e95aafac5..49afcd253e7 100644 --- a/core/services/webhook/external_initiator_manager_test.go +++ b/core/services/webhook/external_initiator_manager_test.go @@ -60,6 +60,7 @@ func Test_ExternalInitiatorManager_Load(t *testing.T) { } func Test_ExternalInitiatorManager_Notify(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := t.Context() db := pgtest.NewSqlxDB(t) borm := bridges.NewORM(db) @@ -99,6 +100,7 @@ func Test_ExternalInitiatorManager_Notify(t *testing.T) { } func Test_ExternalInitiatorManager_DeleteJob(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) borm := bridges.NewORM(db) diff --git a/core/services/workflows/artifacts/orm_test.go b/core/services/workflows/artifacts/orm_test.go index 66114e97eea..53b4bb51f55 100644 --- a/core/services/workflows/artifacts/orm_test.go +++ b/core/services/workflows/artifacts/orm_test.go @@ -124,6 +124,7 @@ func Test_UpsertWorkflowSpec(t *testing.T) { } func Test_DeleteWorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -165,6 +166,7 @@ func Test_DeleteWorkflowSpec(t *testing.T) { } func Test_GetWorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -204,6 +206,7 @@ func Test_GetWorkflowSpec(t *testing.T) { } func Test_GetWorkflowSpecByID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -243,6 +246,7 @@ func Test_GetWorkflowSpecByID(t *testing.T) { } func Test_GetContentsByWorkflowID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -303,6 +307,7 @@ func Test_GetContentsByWorkflowID(t *testing.T) { } func Test_GetContentsByWorkflowID_SecretsProvidedButEmpty(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) @@ -337,6 +342,7 @@ func Test_GetContentsByWorkflowID_SecretsProvidedButEmpty(t *testing.T) { } func Test_UpsertWorkflowSpecWithSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) lggr := logger.TestLogger(t) diff --git a/core/services/workflows/artifacts/v2/orm_test.go b/core/services/workflows/artifacts/v2/orm_test.go index 2cd1fccddf2..7430898f9f0 100644 --- a/core/services/workflows/artifacts/v2/orm_test.go +++ b/core/services/workflows/artifacts/v2/orm_test.go @@ -183,6 +183,7 @@ func Test_DeleteWorkflowSpec(t *testing.T) { } func Test_GetWorkflowSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("gets a workflow spec by ID", func(t *testing.T) { db := pgtest.NewSqlxDB(t) ctx := testutils.Context(t) diff --git a/core/services/workflows/syncer/handler_test.go b/core/services/workflows/syncer/handler_test.go index 5bc83236ecc..d6c73d78904 100644 --- a/core/services/workflows/syncer/handler_test.go +++ b/core/services/workflows/syncer/handler_test.go @@ -1109,6 +1109,7 @@ func Test_workflowDeletedHandler(t *testing.T) { } func Test_workflowPausedActivatedUpdatedHandler(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("success pausing activating and updating existing engine and spec", func(t *testing.T) { var ( ctx = testutils.Context(t) @@ -1243,6 +1244,7 @@ func Test_workflowPausedActivatedUpdatedHandler(t *testing.T) { func TestEngineFactoryFn_SuccessfulCreation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) lggr := logger.TestLogger(t) config := []byte(`{"key": "value"}`) diff --git a/core/services/workflows/syncer/v2/handler_test.go b/core/services/workflows/syncer/v2/handler_test.go index 10cda00567f..8721f6a4242 100644 --- a/core/services/workflows/syncer/v2/handler_test.go +++ b/core/services/workflows/syncer/v2/handler_test.go @@ -983,6 +983,7 @@ func (m *mockLinkingService) GetOrganizationFromWorkflowOwner(ctx context.Contex } func Test_Handler_OrganizationID(t *testing.T) { + tests.BelongsToCISuite(t, "unit") observer := beholdertest.NewObserver(t) emitter := custmsg.NewLabeler() ctx := testutils.Context(t) diff --git a/core/services/workflows/syncer/v2/workflow_registry_test.go b/core/services/workflows/syncer/v2/workflow_registry_test.go index 5bc072ba7cf..ea2c5b290cb 100644 --- a/core/services/workflows/syncer/v2/workflow_registry_test.go +++ b/core/services/workflows/syncer/v2/workflow_registry_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/workflow/generated/workflow_registry_wrapper_v2" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,8 @@ import ( ) func Test_generateReconciliationEventsV2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Validate that if no engines are on the node in the registry, // and we see that the contract has workflow state, // that we generate a WorkflowActivatedEvent @@ -758,6 +761,7 @@ func Test_generateReconciliationEventsV2(t *testing.T) { } func Test_Start(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("successful start and close", func(t *testing.T) { lggr := logger.TestLogger(t) workflowDonNotifier := capabilities.NewDonNotifier() @@ -788,6 +792,7 @@ func Test_Start(t *testing.T) { } func Test_GetAllowlistedRequests(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) ctx := testutils.Context(t) workflowDonNotifier := capabilities.NewDonNotifier() diff --git a/core/services/workflows/syncer/v2/workflow_syncer_v2_test.go b/core/services/workflows/syncer/v2/workflow_syncer_v2_test.go index 5b0925dff7c..1142e46b9a2 100644 --- a/core/services/workflows/syncer/v2/workflow_syncer_v2_test.go +++ b/core/services/workflows/syncer/v2/workflow_syncer_v2_test.go @@ -50,6 +50,7 @@ import ( ) func Test_InitialStateSyncV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) donID := uint32(1) @@ -152,6 +153,7 @@ func Test_InitialStateSyncV2(t *testing.T) { } func Test_RegistrySyncer_SkipsEventsNotBelongingToDONV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( lggr = logger.TestLogger(t) backendTH = testutils.NewEVMBackendTH(t) @@ -236,6 +238,7 @@ func Test_RegistrySyncer_SkipsEventsNotBelongingToDONV2(t *testing.T) { } func Test_RegistrySyncer_WorkflowRegistered_InitiallyPausedV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( ctx = coretestutils.Context(t) lggr = logger.TestLogger(t) @@ -336,6 +339,7 @@ func Test_RegistrySyncer_WorkflowRegistered_InitiallyPausedV2(t *testing.T) { } func Test_RegistrySyncer_WorkflowRegistered_InitiallyActivatedV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( ctx = coretestutils.Context(t) lggr = logger.TestLogger(t) @@ -440,6 +444,7 @@ func Test_RegistrySyncer_WorkflowRegistered_InitiallyActivatedV2(t *testing.T) { } func Test_StratReconciliation_InitialStateSyncV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Run("with heavy load", func(t *testing.T) { lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) @@ -513,6 +518,7 @@ func Test_StratReconciliation_InitialStateSyncV2(t *testing.T) { } func Test_RegistrySyncer_DONUpdate(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) donID := uint32(1) @@ -606,6 +612,7 @@ func Test_RegistrySyncer_DONUpdate(t *testing.T) { } func Test_StratReconciliation_RetriesWithBackoffV2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) donID := uint32(1) diff --git a/core/sessions/ldapauth/ldap_test.go b/core/sessions/ldapauth/ldap_test.go index 0d5ce9d48a0..62a90dbb1a7 100644 --- a/core/sessions/ldapauth/ldap_test.go +++ b/core/sessions/ldapauth/ldap_test.go @@ -264,6 +264,7 @@ func TestORM_FindUserByAPIToken_Expired(t *testing.T) { func TestORM_ListUsers_Full(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -398,6 +399,7 @@ func TestORM_ListUsers_Full(t *testing.T) { func TestORM_CreateSession_UpstreamBind(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -460,6 +462,7 @@ func TestORM_CreateSession_UpstreamBind(t *testing.T) { func TestORM_CreateSession_LocalAdminFallbackLogin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -497,6 +500,7 @@ func TestORM_CreateSession_LocalAdminFallbackLogin(t *testing.T) { func TestORM_SetPassword_LocalAdminFallbackLogin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) mockLdapClient := mocks.NewLDAPClient(t) @@ -534,6 +538,7 @@ func TestORM_SetPassword_LocalAdminFallbackLogin(t *testing.T) { func TestORM_MapSearchGroups(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cfg := ldapauth.TestConfig{} diff --git a/core/sessions/oidcauth/oidc_test.go b/core/sessions/oidcauth/oidc_test.go index 7d9077939ac..79d672ab71a 100644 --- a/core/sessions/oidcauth/oidc_test.go +++ b/core/sessions/oidcauth/oidc_test.go @@ -106,6 +106,7 @@ func TestORM_FindUserByAPIToken_Expired(t *testing.T) { } func TestORM_ListUsers(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Init OIDC authenticator db, oidcAuthProvider := setupAuthenticationProvider(t) @@ -143,6 +144,7 @@ func TestORM_ListUsers(t *testing.T) { func TestORM_CreateSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, oidcAuthProvider := setupAuthenticationProvider(t) user1 := cltest.MustRandomUser(t) @@ -163,6 +165,7 @@ func TestORM_CreateSession(t *testing.T) { func TestORM_DeleteSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, oidcAuthProvider := setupAuthenticationProvider(t) user1 := cltest.MustRandomUser(t) @@ -186,6 +189,7 @@ func TestORM_DeleteSession(t *testing.T) { func TestORM_ClearNonConcurrentSession(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, oidcAuthProvider := setupAuthenticationProvider(t) user1 := cltest.MustRandomUser(t) @@ -209,6 +213,7 @@ func TestORM_ClearNonConcurrentSession(t *testing.T) { func Test_AuthorizeUserWithSession_Success(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, oidcAuthProvider := setupAuthenticationProvider(t) user1 := cltest.MustRandomUser(t) @@ -267,6 +272,7 @@ func Test_AuthorizeUserWithSession_Expired(t *testing.T) { func Test_AuthorizeUserWithSession_SessionRoleMatchesUserRole(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, oidcAuthProvider := setupAuthenticationProvider(t) user1 := cltest.MustRandomUser(t) @@ -293,6 +299,7 @@ func Test_AuthorizeUserWithSession_SessionRoleMatchesUserRole(t *testing.T) { func TestORM_CreateSession_LocalAdminFallbackLogin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, oidcAuthProvider := setupAuthenticationProvider(t) user1 := cltest.MustRandomUser(t) @@ -321,6 +328,7 @@ func TestORM_CreateSession_LocalAdminFallbackLogin(t *testing.T) { func Test_IDClaimsToUserRole(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") cfg := oidcauth.TestConfig{} db := pgtest.NewSqlxDB(t) oidcAuthProvider, err := oidcauth.NewTestOIDCAuthenticator(db, &cfg, logger.TestLogger(t), &audit.AuditLoggerService{}) @@ -394,6 +402,7 @@ func Test_IDClaimsToUserRole(t *testing.T) { func Test_ExtractIDClaimValues(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") cfg := oidcauth.TestConfig{} db := pgtest.NewSqlxDB(t) oidcAuthProvider, err := oidcauth.NewTestOIDCAuthenticator(db, &cfg, logger.TestLogger(t), &audit.AuditLoggerService{}) diff --git a/main_test.go b/main_test.go index 92a810cf490..f8063b3edf9 100644 --- a/main_test.go +++ b/main_test.go @@ -13,6 +13,7 @@ import ( "github.com/rogpeppe/go-internal/testscript" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/freeport" "github.com/smartcontractkit/chainlink/v2/core" @@ -58,10 +59,11 @@ var ( // -run param of go test without the txtar or txt suffix, like so: // go test . -run TestScripts/node/validate/default func TestScripts(t *testing.T) { + t.Parallel() + tests.BelongsToCISuite(t, "test-scripts") if testing.Short() { t.Skip("skipping testscript") } - t.Parallel() visitor := txtar.NewDirVisitor("testdata/scripts", txtar.Recurse, func(path string) error { t.Run(strings.TrimPrefix(path, "testdata/scripts/"), func(t *testing.T) { From 26c6cdc22be87149534a18ec7750805db16a1b01 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 15:58:22 -0800 Subject: [PATCH 16/30] test scripts --- .github/workflows/ci-integration.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml index 5c564a69935..2ba53e1a598 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-integration.yml @@ -38,6 +38,11 @@ jobs: cmd: go_core_tests os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + - module: Core + test-suite: "test-scripts" + cmd: go_core_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + - module: Deployment cmd: go_core_ccip_deployment_tests test-suite: "solana" From cd8032aa2b1a08bfb09f6fdf3d36891a425e8f8c Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Thu, 11 Dec 2025 17:42:46 -0800 Subject: [PATCH 17/30] more test tagging --- .github/workflows/ci-integration.yml | 3 +- core/cmd/shell_test.go | 1 + core/services/feeds/service_test.go | 49 ++++++++++--------- .../job/job_pipeline_orm_integration_test.go | 2 + .../keeper/registry1_1_synchronizer_test.go | 1 + core/services/keystore/dkgrecipient_test.go | 2 + core/services/llo/keyring_test.go | 2 + .../llo/mercurytransmitter/queue_test.go | 2 + .../mercurytransmitter/transmitter_test.go | 3 ++ core/services/llo/orm_test.go | 2 + core/services/ocr/flags_test.go | 2 + core/services/ocr/validate_test.go | 4 ++ core/services/ocr2/database_test.go | 1 + .../internal/ccipdata/onramp_reader_test.go | 4 ++ .../services/ocr2/plugins/s4/messages_test.go | 4 ++ core/services/ocr2/plugins/s4/plugin_test.go | 8 +++ core/services/pipeline/orm_test.go | 1 + .../evm/mercury/persistence_manager_test.go | 6 +++ core/services/vrf/v2/bhs_feeder_test.go | 2 + .../vrf/v2/integration_v2_plus_test.go | 20 ++++++++ .../v2/integration_v2_reverted_txns_test.go | 7 +++ core/services/vrf/v2/integration_v2_test.go | 24 +++++++++ .../vrf/v2/listener_v2_helpers_test.go | 3 ++ .../services/vrf/v2/listener_v2_types_test.go | 3 ++ core/services/webhook/validate_test.go | 2 + .../workflows/artifacts/store_test.go | 6 +++ .../workflows/artifacts/v2/store_test.go | 8 +++ .../syncer/workflow_registry_test.go | 2 + .../workflows/syncer/workflow_syncer_test.go | 9 ++++ core/sessions/oidcauth/oidc_test.go | 11 +++-- 30 files changed, 163 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml index 2ba53e1a598..54ba71e7e44 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-integration.yml @@ -49,7 +49,6 @@ jobs: os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache go-mod-directory: "deployment/" setup-solana: "true" - # setup-loopps: "true" - module: Deployment test-suite: "aptos" @@ -57,7 +56,7 @@ jobs: os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache go-mod-directory: "deployment/" aptos-cli-version: "7.10.0" - # setup-loopps: "true" + setup-loopps: "true" - module: Deployment test-suite: "with-db" diff --git a/core/cmd/shell_test.go b/core/cmd/shell_test.go index b4d799c0b45..9f4e7039792 100644 --- a/core/cmd/shell_test.go +++ b/core/cmd/shell_test.go @@ -202,6 +202,7 @@ func TestTerminalAPIInitializer_InitializeWithoutAPIUser(t *testing.T) { } func TestTerminalAPIInitializer_InitializeWithExistingAPIUser(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index c9a2e8b693d..4736a7c07af 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -542,6 +542,7 @@ func Test_Service_DisableFeedsManager(t *testing.T) { func Test_Service_ListManagersByIDs(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -561,7 +562,7 @@ func Test_Service_ListManagersByIDs(t *testing.T) { } func Test_Service_CreateChainConfig(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string chainType feeds.ChainType @@ -672,7 +673,7 @@ func Test_Service_CreateChainConfig(t *testing.T) { } func Test_Service_CreateChainConfig_InvalidAdminAddress(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( mgr = feeds.FeedsManager{ID: 1} cfg = feeds.ChainConfig{ @@ -694,7 +695,7 @@ func Test_Service_CreateChainConfig_InvalidAdminAddress(t *testing.T) { } func Test_Service_DeleteChainConfig(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( mgr = feeds.FeedsManager{ID: 1} nodeVersion = &versioning.NodeVersion{ @@ -735,7 +736,7 @@ func Test_Service_DeleteChainConfig(t *testing.T) { } func Test_Service_ListChainConfigsByManagerIDs(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( mgr = feeds.FeedsManager{ID: 1} @@ -756,7 +757,7 @@ func Test_Service_ListChainConfigsByManagerIDs(t *testing.T) { } func Test_Service_UpdateChainConfig(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string chainType feeds.ChainType @@ -854,7 +855,7 @@ func Test_Service_UpdateChainConfig(t *testing.T) { } func Test_Service_UpdateChainConfig_InvalidAdminAddress(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( mgr = feeds.FeedsManager{ID: 1} cfg = feeds.ChainConfig{ @@ -877,7 +878,7 @@ func Test_Service_UpdateChainConfig_InvalidAdminAddress(t *testing.T) { func Test_Service_ProposeJob(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( idFluxMonitor = int64(1) @@ -1359,7 +1360,7 @@ func Test_Service_ProposeJob(t *testing.T) { func Test_Service_DeleteJob(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( remoteUUID = uuid.New() @@ -1676,7 +1677,7 @@ func Test_Service_DeleteJob(t *testing.T) { func Test_Service_RevokeJob(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( remoteUUID = uuid.New() @@ -1903,7 +1904,7 @@ answer1 [type=median index=0]; } func Test_Service_SyncNodeInfo(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") testCases := []struct { name string chainType feeds.ChainType @@ -2056,7 +2057,7 @@ func Test_Service_SyncNodeInfo(t *testing.T) { func Test_Service_syncNodeInfoWithRetry(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") mgr := feeds.FeedsManager{ID: 1} nodeVersion := &versioning.NodeVersion{Version: "1.0.0"} @@ -2235,7 +2236,7 @@ func Test_Service_syncNodeInfoWithRetry(t *testing.T) { func Test_Service_IsJobManaged(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") svc := setupTestService(t) ctx := testutils.Context(t) @@ -2250,7 +2251,7 @@ func Test_Service_IsJobManaged(t *testing.T) { func Test_Service_ListJobProposalsByManagersIDs(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -2289,7 +2290,7 @@ func Test_Service_GetJobProposal(t *testing.T) { } func Test_Service_CancelSpec(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( externalJobID = uuid.New() @@ -2523,7 +2524,7 @@ func Test_Service_CancelSpec(t *testing.T) { func Test_Service_GetSpec(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -2543,7 +2544,7 @@ func Test_Service_GetSpec(t *testing.T) { func Test_Service_ListSpecsByJobProposalIDs(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( @@ -2564,7 +2565,7 @@ func Test_Service_ListSpecsByJobProposalIDs(t *testing.T) { } func Test_Service_ApproveSpec(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var evmChainID *evmbig.Big address := types.EIP55AddressFromAddress(common.Address{}) externalJobID := uuid.New() @@ -3294,7 +3295,7 @@ answer1 [type=median index=0]; } func Test_Service_ApproveSpec_OCR2(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") address := "0x613a38AC1659769640aaE063C651F48E0250454C" feedIDHex := "0x0000000000000000000000000000000000000000000000000000000000000001" @@ -3887,7 +3888,7 @@ updateInterval = "20m" } func Test_Service_ApproveSpec_Stream(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") externalJobID := uuid.New() streamName := "LINK / ETH | version 3 | contract 0x0000000000000000000000000000000000000000" @@ -4407,7 +4408,7 @@ func Test_Service_ApproveSpec_Stream(t *testing.T) { } func Test_Service_ApproveSpec_Bootstrap(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") address := "0x613a38AC1659769640aaE063C651F48E0250454C" feedIDHex := "0x0000000000000000000000000000000000000000000000000000000000000001" @@ -4954,7 +4955,7 @@ chainID = 0 } func Test_Service_RejectSpec(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( ctx = testutils.Context(t) @@ -5095,7 +5096,7 @@ func Test_Service_RejectSpec(t *testing.T) { } func Test_Service_UpdateSpecDefinition(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( ctx = testutils.Context(t) @@ -5186,7 +5187,7 @@ func Test_Service_UpdateSpecDefinition(t *testing.T) { } func Test_Service_StartStop(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") key := cltest.DefaultCSAKey @@ -5285,7 +5286,7 @@ func logMessages(logEntries []observer.LoggedEntry) []string { func Test_Service_GetJobRuns(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") var ( remoteUUID = uuid.New() diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go index 2a2e17674ba..32912f4698e 100644 --- a/core/services/job/job_pipeline_orm_integration_test.go +++ b/core/services/job/job_pipeline_orm_integration_test.go @@ -22,6 +22,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func clearJobsDb(t *testing.T, db *sqlx.DB) { @@ -29,6 +30,7 @@ func clearJobsDb(t *testing.T, db *sqlx.DB) { } func TestPipelineORM_Integration(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) const DotStr = ` // data source 1 diff --git a/core/services/keeper/registry1_1_synchronizer_test.go b/core/services/keeper/registry1_1_synchronizer_test.go index e120ea9c86f..33c3f1c9116 100644 --- a/core/services/keeper/registry1_1_synchronizer_test.go +++ b/core/services/keeper/registry1_1_synchronizer_test.go @@ -383,6 +383,7 @@ func Test_RegistrySynchronizer1_1_UpkeepRegisteredLog(t *testing.T) { } func Test_RegistrySynchronizer1_1_UpkeepPerformedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) g := gomega.NewWithT(t) diff --git a/core/services/keystore/dkgrecipient_test.go b/core/services/keystore/dkgrecipient_test.go index 4a70735e384..690a1d94a16 100644 --- a/core/services/keystore/dkgrecipient_test.go +++ b/core/services/keystore/dkgrecipient_test.go @@ -14,9 +14,11 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgrecipientkey" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_DKGRecipientKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) diff --git a/core/services/llo/keyring_test.go b/core/services/llo/keyring_test.go index 92ff8f361a5..8604a52fe55 100644 --- a/core/services/llo/keyring_test.go +++ b/core/services/llo/keyring_test.go @@ -15,6 +15,7 @@ import ( llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -63,6 +64,7 @@ func (m *mockKey) reset(format llotypes.ReportFormat) { } func Test_Keyring(t *testing.T) { + tests.BelongsToCISuite(t, "unit") lggr := logger.TestLogger(t) ks := map[llotypes.ReportFormat]Key{ diff --git a/core/services/llo/mercurytransmitter/queue_test.go b/core/services/llo/mercurytransmitter/queue_test.go index 1df1bed4421..c48250aeed3 100644 --- a/core/services/llo/mercurytransmitter/queue_test.go +++ b/core/services/llo/mercurytransmitter/queue_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var _ asyncDeleter = &mockAsyncDeleter{} @@ -29,6 +30,7 @@ func (m *mockAsyncDeleter) DonID() uint32 { func Test_Queue(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") const maxSize = 7 lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.ErrorLevel) diff --git a/core/services/llo/mercurytransmitter/transmitter_test.go b/core/services/llo/mercurytransmitter/transmitter_test.go index e73c183d626..a904bb8e762 100644 --- a/core/services/llo/mercurytransmitter/transmitter_test.go +++ b/core/services/llo/mercurytransmitter/transmitter_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-data-streams/rpc" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -61,6 +62,7 @@ func (m *MockGRPCClient) Transmit(ctx context.Context, in *rpc.TransmitRequest) func (m *MockGRPCClient) ServerURL() string { return "mock server url" } func Test_Transmitter_Transmit(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) donID := uint32(123456) @@ -185,6 +187,7 @@ func (m *mockQ) Init(transmissions []*Transmission) error { return nil } func (m *mockQ) IsEmpty() bool { return false } func Test_Transmitter_runQueueLoop(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") donIDStr := "555" lggr := logger.TestLogger(t) c := &MockGRPCClient{} diff --git a/core/services/llo/orm_test.go b/core/services/llo/orm_test.go index ce5964bb05c..8adfd6be2e8 100644 --- a/core/services/llo/orm_test.go +++ b/core/services/llo/orm_test.go @@ -11,6 +11,7 @@ import ( llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/llo/channeldefinitions" @@ -18,6 +19,7 @@ import ( ) func Test_ORM(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") const ETHMainnetChainSelector uint64 = 5009297550715157269 const OtherChainSelector uint64 = 1234567890 diff --git a/core/services/ocr/flags_test.go b/core/services/ocr/flags_test.go index a204bdde6be..9a763eb8783 100644 --- a/core/services/ocr/flags_test.go +++ b/core/services/ocr/flags_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -15,6 +16,7 @@ import ( func TestFlags_IsLowered(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string diff --git a/core/services/ocr/validate_test.go b/core/services/ocr/validate_test.go index 68a863c5564..b62f6d47293 100644 --- a/core/services/ocr/validate_test.go +++ b/core/services/ocr/validate_test.go @@ -21,6 +21,7 @@ import ( "gopkg.in/guregu/null.v4" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" evmconfig "github.com/smartcontractkit/chainlink-evm/pkg/config" "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -34,6 +35,7 @@ import ( ) func TestValidateOracleSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string @@ -447,6 +449,8 @@ answer1 [type=median index=0]; } func TestOnChainContractAvailability(t *testing.T) { + tests.BelongsToCISuite(t, "unit") + // Because some RPCs prune logs we have scenarios in which a job spec update will lead to outages because of the inability to get the logs. We need to safeguard against these outages by checking if the node can access the OCR configuration // There are 4 possible scenarios: // 1. Contract is not deployed diff --git a/core/services/ocr2/database_test.go b/core/services/ocr2/database_test.go index a1b92849c08..cd642ca2c29 100644 --- a/core/services/ocr2/database_test.go +++ b/core/services/ocr2/database_test.go @@ -522,6 +522,7 @@ func Test_DB_ReadWriteProtocolState(t *testing.T) { } func Test_DB_ReadWriteBlock(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") sqlDB := setupDB(t) lggr := logger.TestLogger(t) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/onramp_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/onramp_reader_test.go index 78d346e9f29..f1437af7dd5 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/onramp_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/onramp_reader_test.go @@ -23,6 +23,7 @@ import ( evm_2_evm_onramp_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/evm_2_evm_onramp" "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -37,6 +38,7 @@ type onRampReaderTH struct { } func TestNewOnRampReader_noContractAtAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ctx := t.Context() _, bc := ccipdata.NewSimulation(t) addr := ccipcalc.EvmAddrToGeneric(utils.RandomAddress()) @@ -45,6 +47,7 @@ func TestNewOnRampReader_noContractAtAddress(t *testing.T) { } func TestOnRampReaderInit(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string version string @@ -288,6 +291,7 @@ func testOnRampReader(t *testing.T, th onRampReaderTH, expectedRouterAddress com } func TestNewOnRampReader(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var tt = []struct { typeAndVersion string expectedErr string diff --git a/core/services/ocr2/plugins/s4/messages_test.go b/core/services/ocr2/plugins/s4/messages_test.go index 55c65eec8df..df65571c4eb 100644 --- a/core/services/ocr2/plugins/s4/messages_test.go +++ b/core/services/ocr2/plugins/s4/messages_test.go @@ -12,10 +12,12 @@ import ( s4_svc "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_MarshalUnmarshalRows(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") const n = 1000 rows := generateTestRows(t, n, time.Minute) @@ -34,6 +36,7 @@ func Test_MarshalUnmarshalRows(t *testing.T) { func Test_MarshalUnmarshalQuery(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") const n = 100 rows := generateTestOrmRows(t, n, time.Minute) @@ -85,6 +88,7 @@ func marshalUnmarshal(t *testing.T, row *s4.Row) *s4.Row { func Test_VerifySignature(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") rows := generateTestRows(t, 2, time.Minute) err := rows[0].VerifySignature() diff --git a/core/services/ocr2/plugins/s4/plugin_test.go b/core/services/ocr2/plugins/s4/plugin_test.go index 236b54fd5ef..5e34e783933 100644 --- a/core/services/ocr2/plugins/s4/plugin_test.go +++ b/core/services/ocr2/plugins/s4/plugin_test.go @@ -20,6 +20,7 @@ import ( "github.com/stretchr/testify/mock" "google.golang.org/protobuf/proto" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ) @@ -121,6 +122,7 @@ func rowsToShapshotRows(rows []*s4_svc.Row) []*s4_svc.SnapshotRow { func TestPlugin_NewReportingPlugin(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) orm := s4_mocks.NewORM(t) @@ -167,6 +169,7 @@ func TestPlugin_NewReportingPlugin(t *testing.T) { func TestPlugin_Close(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) config := createPluginConfig(10) @@ -180,6 +183,7 @@ func TestPlugin_Close(t *testing.T) { func TestPlugin_ShouldTransmitAcceptedReport(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) config := createPluginConfig(10) @@ -194,6 +198,7 @@ func TestPlugin_ShouldTransmitAcceptedReport(t *testing.T) { func TestPlugin_ShouldAcceptFinalizedReport(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) config := createPluginConfig(10) @@ -254,6 +259,7 @@ func TestPlugin_ShouldAcceptFinalizedReport(t *testing.T) { func TestPlugin_Query(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) config := createPluginConfig(10) @@ -331,6 +337,7 @@ func TestPlugin_Query(t *testing.T) { func TestPlugin_Observation(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) config := createPluginConfig(10) @@ -464,6 +471,7 @@ func TestPlugin_Observation(t *testing.T) { func TestPlugin_Report(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") logger := commonlogger.NewOCRWrapper(logger.TestLogger(t), true, func(msg string) {}) config := createPluginConfig(10) diff --git a/core/services/pipeline/orm_test.go b/core/services/pipeline/orm_test.go index 496ce8c0a83..7f79f9e025a 100644 --- a/core/services/pipeline/orm_test.go +++ b/core/services/pipeline/orm_test.go @@ -245,6 +245,7 @@ func TestInsertFinishedRuns(t *testing.T) { } func Test_PipelineORM_InsertFinishedRunWithSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db, orm, jorm := setupLiteORM(t) diff --git a/core/services/relay/evm/mercury/persistence_manager_test.go b/core/services/relay/evm/mercury/persistence_manager_test.go index 3504ef8d0b0..9b8491f477b 100644 --- a/core/services/relay/evm/mercury/persistence_manager_test.go +++ b/core/services/relay/evm/mercury/persistence_manager_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" ) @@ -22,6 +23,7 @@ func bootstrapPersistenceManager(t *testing.T, jobID int32, db *sqlx.DB) *Persis } func TestPersistenceManager(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") jobID1 := rand.Int32() jobID2 := jobID1 + 1 @@ -64,6 +66,8 @@ func TestPersistenceManager(t *testing.T) { } func TestPersistenceManagerAsyncDelete(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) jobID := rand.Int32() db := testutils.NewSqlxDB(t) @@ -112,6 +116,8 @@ func TestPersistenceManagerAsyncDelete(t *testing.T) { } func TestPersistenceManagerPrune(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + jobID1 := rand.Int32() jobID2 := jobID1 + 1 db := testutils.NewSqlxDB(t) diff --git a/core/services/vrf/v2/bhs_feeder_test.go b/core/services/vrf/v2/bhs_feeder_test.go index 3d504741ed5..0431d632082 100644 --- a/core/services/vrf/v2/bhs_feeder_test.go +++ b/core/services/vrf/v2/bhs_feeder_test.go @@ -17,10 +17,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrftesthelpers" "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestStartHeartbeats(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 2) diff --git a/core/services/vrf/v2/integration_v2_plus_test.go b/core/services/vrf/v2/integration_v2_plus_test.go index c79ffd84078..6d8d9a1c7df 100644 --- a/core/services/vrf/v2/integration_v2_plus_test.go +++ b/core/services/vrf/v2/integration_v2_plus_test.go @@ -339,6 +339,7 @@ func newVRFCoordinatorV2PlusUniverse(t *testing.T, key ethkey.KeyV2, numConsumer func TestVRFV2PlusIntegration_SingleConsumer_HappyPath_BatchFulfillment(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) t.Run("link payment", func(tt *testing.T) { @@ -391,6 +392,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_HappyPath_BatchFulfillment(t *testi } func TestVRFV2PlusIntegration_SingleConsumer_HappyPath_BatchFulfillment_BigGasCallback(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1882") t.Parallel() ownerKey := cltest.MustGenerateRandomKey(t) @@ -446,6 +448,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_HappyPath_BatchFulfillment_BigGasCa func TestVRFV2PlusIntegration_SingleConsumer_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) t.Run("link payment", func(tt *testing.T) { @@ -524,6 +527,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_EOA_Request_Batching_Enabled(t *tes func TestVRFV2PlusIntegration_SingleConsumer_EIP150_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) testSingleConsumerEIP150( @@ -539,6 +543,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_EIP150_HappyPath(t *testing.T) { func TestVRFV2PlusIntegration_SingleConsumer_EIP150_Revert(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) testSingleConsumerEIP150Revert( @@ -554,6 +559,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_EIP150_Revert(t *testing.T) { func TestVRFV2PlusIntegration_SingleConsumer_NeedsBlockhashStore(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 2, false) t.Run("link payment", func(tt *testing.T) { @@ -592,6 +598,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_NeedsBlockhashStore(t *testing.T) { func TestVRFV2PlusIntegration_SingleConsumer_BlockHeaderFeeder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) t.Run("link payment", func(tt *testing.T) { @@ -632,6 +639,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_BlockHeaderFeeder(t *testing.T) { func TestVRFV2PlusIntegration_SingleConsumer_NeedsTopUp(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) t.Run("link payment", func(tt *testing.T) { @@ -689,6 +697,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_MultipleGasLanes(t *testing.T) { } func TestVRFV2PlusIntegration_SingleConsumer_AlwaysRevertingCallback_StillFulfilled(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1730") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 0, false) @@ -704,6 +713,7 @@ func TestVRFV2PlusIntegration_SingleConsumer_AlwaysRevertingCallback_StillFulfil } func TestVRFV2PlusIntegration_ConsumerProxy_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 0, false) testConsumerProxyHappyPath( @@ -717,12 +727,14 @@ func TestVRFV2PlusIntegration_ConsumerProxy_HappyPath(t *testing.T) { } func TestVRFV2PlusIntegration_ConsumerProxy_CoordinatorZeroAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 0, false) testConsumerProxyCoordinatorZeroAddress(t, uni.coordinatorV2UniverseCommon) } func TestVRFV2PlusIntegration_ExternalOwnerConsumerExample(t *testing.T) { + tests.BelongsToCISuite(t, "unit") quarantine.Flaky(t, "DX-2222") owner := evmtestutils.MustNewSimTransactor(t) random := evmtestutils.MustNewSimTransactor(t) @@ -806,6 +818,7 @@ func TestVRFV2PlusIntegration_ExternalOwnerConsumerExample(t *testing.T) { } func TestVRFV2PlusIntegration_SimpleConsumerExample(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := evmtestutils.MustNewSimTransactor(t) random := evmtestutils.MustNewSimTransactor(t) genesisData := gethtypes.GenesisAlloc{ @@ -856,6 +869,7 @@ func TestVRFV2PlusIntegration_SimpleConsumerExample(t *testing.T) { func TestVRFV2PlusIntegration_TestMaliciousConsumer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, key, 1, false) testMaliciousConsumer( @@ -869,6 +883,7 @@ func TestVRFV2PlusIntegration_TestMaliciousConsumer(t *testing.T) { } func TestVRFV2PlusIntegration_RequestCost(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, key, 1, false) @@ -945,6 +960,7 @@ func TestVRFV2PlusIntegration_RequestCost(t *testing.T) { } func TestVRFV2PlusIntegration_MaxConsumersCost(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, key, 1, false) carol := uni.vrfConsumers[0] @@ -1025,6 +1041,7 @@ func requestAndEstimateFulfillmentCost( } func TestVRFV2PlusIntegration_FulfillmentCost(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, key, 1, false) @@ -1165,6 +1182,7 @@ func setupSubscriptionAndFund( func TestVRFV2PlusIntegration_Migration(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) @@ -1338,6 +1356,7 @@ func requestRandomnessAndValidate(t *testing.T, } func TestVRFV2PlusIntegration_CancelSubscription(t *testing.T) { + tests.BelongsToCISuite(t, "unit") key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, key, 1, false) consumer := uni.vrfConsumers[0] @@ -1374,6 +1393,7 @@ func TestVRFV2PlusIntegration_CancelSubscription(t *testing.T) { func TestVRFV2PlusIntegration_ReplayOldRequestsOnStartUp(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 1, false) diff --git a/core/services/vrf/v2/integration_v2_reverted_txns_test.go b/core/services/vrf/v2/integration_v2_reverted_txns_test.go index 95106d1877f..e63d32fd362 100644 --- a/core/services/vrf/v2/integration_v2_reverted_txns_test.go +++ b/core/services/vrf/v2/integration_v2_reverted_txns_test.go @@ -37,6 +37,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs" "github.com/smartcontractkit/chainlink/v2/core/utils" "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var ( @@ -46,6 +47,7 @@ var ( func TestVRFV2Integration_SingleRevertedTxn_ForceFulfillment(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) @@ -62,6 +64,7 @@ func TestVRFV2Integration_SingleRevertedTxn_ForceFulfillment(t *testing.T) { func TestVRFV2Integration_BatchRevertedTxn_ForceFulfillment(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) @@ -88,6 +91,7 @@ func TestVRFV2Integration_BatchRevertedTxn_ForceFulfillment(t *testing.T) { func TestVRFV2Integration_ForceFulfillmentRevertedTxn_Retry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) @@ -110,6 +114,7 @@ func TestVRFV2Integration_ForceFulfillmentRevertedTxn_Retry(t *testing.T) { } func TestVRFV2Integration_CanceledSubForceFulfillmentRevertedTxn_Retry(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) @@ -132,6 +137,7 @@ func TestVRFV2Integration_CanceledSubForceFulfillmentRevertedTxn_Retry(t *testin } func TestUniqueReqById_NoPendingReceipts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") revertedForceTxns := []v2.TxnReceiptDB{ {RequestID: common.BigToHash(big.NewInt(1)).Hex(), ForceFulfillmentAttempt: 1, EVMReceipt: types.Receipt{Status: 0}}, @@ -160,6 +166,7 @@ func TestUniqueReqById_NoPendingReceipts(t *testing.T) { } func TestUniqueReqById_WithPendingReceipts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") revertedForceTxns := []v2.TxnReceiptDB{ {RequestID: common.BigToHash(big.NewInt(1)).Hex(), ForceFulfillmentAttempt: 1, EVMReceipt: types.Receipt{Status: 0}}, diff --git a/core/services/vrf/v2/integration_v2_test.go b/core/services/vrf/v2/integration_v2_test.go index 15b496550f4..b2e217a6af1 100644 --- a/core/services/vrf/v2/integration_v2_test.go +++ b/core/services/vrf/v2/integration_v2_test.go @@ -915,6 +915,7 @@ func checkForReceipt(t *testing.T, db *sqlx.DB, txID int64) bool { } func TestVRFV2Integration_SingleConsumer_ForceFulfillment(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-1875") t.Parallel() ownerKey := cltest.MustGenerateRandomKey(t) @@ -933,6 +934,7 @@ func TestVRFV2Integration_SingleConsumer_ForceFulfillment(t *testing.T) { func TestVRFV2Integration_SingleConsumer_ForceFulfillment_BatchEnabled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) testSingleConsumerForcedFulfillment( @@ -949,6 +951,7 @@ func TestVRFV2Integration_SingleConsumer_ForceFulfillment_BatchEnabled(t *testin func TestVRFV2Integration_SingleConsumer_HappyPath_BatchFulfillment(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) testSingleConsumerHappyPathBatchFulfillment( @@ -971,6 +974,7 @@ func TestVRFV2Integration_SingleConsumer_HappyPath_BatchFulfillment(t *testing.T func TestVRFV2Integration_SingleConsumer_HappyPath_BatchFulfillment_BigGasCallback(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) testSingleConsumerHappyPathBatchFulfillment( @@ -993,6 +997,7 @@ func TestVRFV2Integration_SingleConsumer_HappyPath_BatchFulfillment_BigGasCallba func TestVRFV2Integration_SingleConsumer_HappyPath(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) testSingleConsumerHappyPath( @@ -1182,6 +1187,7 @@ func TestVRFV2Integration_SingleConsumer_EIP150_HappyPath(t *testing.T) { func TestVRFV2Integration_SingleConsumer_EIP150_Revert(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) testSingleConsumerEIP150Revert( @@ -1218,6 +1224,7 @@ func deployWrapper(t *testing.T, uni coordinatorV2UniverseCommon, wrapperOverhea func TestVRFV2Integration_SingleConsumer_Wrapper(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) wrapperOverhead := uint32(30_000) coordinatorOverhead := uint32(90_000) @@ -1299,6 +1306,7 @@ func TestVRFV2Integration_SingleConsumer_Wrapper(t *testing.T) { func TestVRFV2Integration_Wrapper_High_Gas(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) wrapperOverhead := uint32(30_000) coordinatorOverhead := uint32(90_000) @@ -1382,6 +1390,7 @@ func TestVRFV2Integration_Wrapper_High_Gas(t *testing.T) { func TestVRFV2Integration_SingleConsumer_NeedsBlockhashStore(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 2) testMultipleConsumersNeedBHS( @@ -1402,6 +1411,7 @@ func TestVRFV2Integration_SingleConsumer_NeedsBlockhashStore(t *testing.T) { func TestVRFV2Integration_SingleConsumer_NeedsTrustedBlockhashStore(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 2, true) testMultipleConsumersNeedTrustedBHS( @@ -1422,6 +1432,7 @@ func TestVRFV2Integration_SingleConsumer_NeedsTrustedBlockhashStore(t *testing.T func TestVRFV2Integration_SingleConsumer_NeedsTrustedBlockhashStore_AfterDelay(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2PlusUniverse(t, ownerKey, 2, true) testMultipleConsumersNeedTrustedBHS( @@ -1442,6 +1453,7 @@ func TestVRFV2Integration_SingleConsumer_NeedsTrustedBlockhashStore_AfterDelay(t func TestVRFV2Integration_SingleConsumer_BlockHeaderFeeder(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) testBlockHeaderFeeder( @@ -1498,6 +1510,7 @@ func TestVRFV2Integration_SingleConsumer_MultipleGasLanes(t *testing.T) { } func TestVRFV2Integration_SingleConsumer_AlwaysRevertingCallback_StillFulfilled(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 0) testSingleConsumerAlwaysRevertingCallbackStillFulfilled( @@ -1512,6 +1525,7 @@ func TestVRFV2Integration_SingleConsumer_AlwaysRevertingCallback_StillFulfilled( } func TestVRFV2Integration_ConsumerProxy_HappyPath(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 0) testConsumerProxyHappyPath( @@ -1525,6 +1539,7 @@ func TestVRFV2Integration_ConsumerProxy_HappyPath(t *testing.T) { } func TestVRFV2Integration_ConsumerProxy_CoordinatorZeroAddress(t *testing.T) { + tests.BelongsToCISuite(t, "unit") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 0) testConsumerProxyCoordinatorZeroAddress(t, uni.coordinatorV2UniverseCommon) @@ -1577,6 +1592,7 @@ func registerProvingKeyHelper(t *testing.T, uni coordinatorV2UniverseCommon, coo } func TestExternalOwnerConsumerExample(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := evmtestutils.MustNewSimTransactor(t) random := evmtestutils.MustNewSimTransactor(t) genesisData := gethtypes.GenesisAlloc{ @@ -1641,6 +1657,7 @@ func TestExternalOwnerConsumerExample(t *testing.T) { } func TestSimpleConsumerExample(t *testing.T) { + tests.BelongsToCISuite(t, "unit") owner := evmtestutils.MustNewSimTransactor(t) random := evmtestutils.MustNewSimTransactor(t) genesisData := gethtypes.GenesisAlloc{ @@ -1682,6 +1699,7 @@ func TestSimpleConsumerExample(t *testing.T) { func TestIntegrationVRFV2(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) // Reconfigure the sim chain with a default gas price of 1 gwei, // max gas limit of 2M and a key specific max 10 gwei price. @@ -1883,6 +1901,7 @@ func TestIntegrationVRFV2(t *testing.T) { func TestMaliciousConsumer(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, key, 1) testMaliciousConsumer( @@ -1896,6 +1915,7 @@ func TestMaliciousConsumer(t *testing.T) { } func TestRequestCost(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, key, 1) @@ -1968,6 +1988,7 @@ func TestRequestCost(t *testing.T) { } func TestMaxConsumersCost(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, key, 1) carol := uni.vrfConsumers[0] @@ -2003,6 +2024,7 @@ func TestMaxConsumersCost(t *testing.T) { } func TestFulfillmentCost(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) key := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, key, 1) @@ -2106,6 +2128,7 @@ func TestFulfillmentCost(t *testing.T) { } func TestStartingCountsV1(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") cfg, db := heavyweight.FullTestDBNoFixturesV2(t, nil) ctx := testutils.Context(t) @@ -2306,6 +2329,7 @@ func TestStartingCountsV1(t *testing.T) { func TestVRFV2Integration_ReplayOldRequestsOnStartUp(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ownerKey := cltest.MustGenerateRandomKey(t) uni := newVRFCoordinatorV2Universe(t, ownerKey, 1) diff --git a/core/services/vrf/v2/listener_v2_helpers_test.go b/core/services/vrf/v2/listener_v2_helpers_test.go index 20c21cbdc48..d0cc5789234 100644 --- a/core/services/vrf/v2/listener_v2_helpers_test.go +++ b/core/services/vrf/v2/listener_v2_helpers_test.go @@ -10,9 +10,11 @@ import ( "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" v2 "github.com/smartcontractkit/chainlink/v2/core/services/vrf/v2" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestListener_EstimateFeeJuels(t *testing.T) { + tests.BelongsToCISuite(t, "unit") callbackGasLimit := uint32(150_000) maxGasPriceGwei := assets.GWei(30).ToInt() weiPerUnitLink := big.NewInt(5898160000000000) @@ -33,6 +35,7 @@ func TestListener_EstimateFeeJuels(t *testing.T) { } func Test_TxListDeduper(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tx1 := &txmgr.Tx{ ID: 1, Value: *big.NewInt(0), diff --git a/core/services/vrf/v2/listener_v2_types_test.go b/core/services/vrf/v2/listener_v2_types_test.go index a60a92f8edd..bacc354cd45 100644 --- a/core/services/vrf/v2/listener_v2_types_test.go +++ b/core/services/vrf/v2/listener_v2_types_test.go @@ -13,9 +13,11 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_BatchFulfillments_AddRun(t *testing.T) { + tests.BelongsToCISuite(t, "unit") batchLimit := uint32(2500) bfs := newBatchFulfillments(batchLimit, vrfcommon.V2) fromAddress := testutils.NewAddress() @@ -54,6 +56,7 @@ func Test_BatchFulfillments_AddRun(t *testing.T) { } func Test_BatchFulfillments_AddRun_V2Plus(t *testing.T) { + tests.BelongsToCISuite(t, "unit") batchLimit := uint32(2500) bfs := newBatchFulfillments(batchLimit, vrfcommon.V2Plus) fromAddress := testutils.NewAddress() diff --git a/core/services/webhook/validate_test.go b/core/services/webhook/validate_test.go index 4f5cd03a0e6..aa72e913b90 100644 --- a/core/services/webhook/validate_test.go +++ b/core/services/webhook/validate_test.go @@ -14,10 +14,12 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/webhook" webhookmocks "github.com/smartcontractkit/chainlink/v2/core/services/webhook/mocks" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidatedWebJobSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var tt = []struct { name string toml string diff --git a/core/services/workflows/artifacts/store_test.go b/core/services/workflows/artifacts/store_test.go index 06d94bdd4fa..2c2775de956 100644 --- a/core/services/workflows/artifacts/store_test.go +++ b/core/services/workflows/artifacts/store_test.go @@ -22,11 +22,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func Test_Handler_SecretsFor(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} @@ -87,6 +89,8 @@ func Test_Handler_SecretsFor(t *testing.T) { } func Test_Handler_SecretsFor_RefreshesSecrets(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} @@ -152,6 +156,8 @@ func Test_Handler_SecretsFor_RefreshesSecrets(t *testing.T) { } func Test_Handler_SecretsFor_RefreshLogic(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} diff --git a/core/services/workflows/artifacts/v2/store_test.go b/core/services/workflows/artifacts/v2/store_test.go index fbbfa0c1f96..5f38b1a38a8 100644 --- a/core/services/workflows/artifacts/v2/store_test.go +++ b/core/services/workflows/artifacts/v2/store_test.go @@ -22,6 +22,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/require" ) @@ -43,6 +44,7 @@ func (m *mockFetcher) RetrieveURL(ctx context.Context, req *storage_service.Down } func Test_Store_DeleteWorkflowArtifacts(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} @@ -94,6 +96,8 @@ func Test_Store_DeleteWorkflowArtifacts(t *testing.T) { } func Test_Store_FetchWorkflowArtifacts_WithStorage(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} @@ -141,6 +145,8 @@ func Test_Store_FetchWorkflowArtifacts_WithStorage(t *testing.T) { } func Test_Store_FetchWorkflowArtifacts_WithoutStorage(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} @@ -184,6 +190,8 @@ func Test_Store_FetchWorkflowArtifacts_WithoutStorage(t *testing.T) { } func Test_Store_FetchWorkflowArtifacts_SkipsRetrieving(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + lggr := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) orm := &orm{ds: db, lggr: lggr} diff --git a/core/services/workflows/syncer/workflow_registry_test.go b/core/services/workflows/syncer/workflow_registry_test.go index 34589e57d69..ebd85ad6249 100644 --- a/core/services/workflows/syncer/workflow_registry_test.go +++ b/core/services/workflows/syncer/workflow_registry_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type mockService struct{} @@ -30,6 +31,7 @@ func (m *mockService) Ready() error { return nil } func (m *mockService) Name() string { return "svc" } func Test_generateReconciliationEvents(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("WorkflowRegisteredEvent", func(t *testing.T) { lggr := logger.TestLogger(t) ctx := testutils.Context(t) diff --git a/core/services/workflows/syncer/workflow_syncer_test.go b/core/services/workflows/syncer/workflow_syncer_test.go index 333d418fbd8..4b79847adc1 100644 --- a/core/services/workflows/syncer/workflow_syncer_test.go +++ b/core/services/workflows/syncer/workflow_syncer_test.go @@ -111,6 +111,7 @@ func (t *testDonNotifier) Subscribe(ctx context.Context) (<-chan capabilities.DO } func Test_EventHandlerStateSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) donID := uint32(1) @@ -244,6 +245,8 @@ func Test_EventHandlerStateSync(t *testing.T) { } func Test_InitialStateSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) donID := uint32(1) @@ -310,6 +313,7 @@ func Test_InitialStateSync(t *testing.T) { func Test_SecretsWorker(t *testing.T) { tests.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/DX-732") + tests.BelongsToCISuite(t, "with-db") tc := []struct { ss SyncStrategy }{ @@ -453,6 +457,7 @@ func Test_SecretsWorker(t *testing.T) { } func Test_RegistrySyncer_SkipsEventsNotBelongingToDON(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( lggr = logger.TestLogger(t) backendTH = testutils.NewEVMBackendTH(t) @@ -535,6 +540,7 @@ func Test_RegistrySyncer_SkipsEventsNotBelongingToDON(t *testing.T) { } func Test_RegistrySyncer_WorkflowRegistered_InitiallyPaused(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( ctx = coretestutils.Context(t) lggr = logger.TestLogger(t) @@ -633,6 +639,7 @@ func Test_RegistrySyncer_WorkflowRegistered_InitiallyPaused(t *testing.T) { } func Test_RegistrySyncer_WorkflowRegistered_InitiallyActivated(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var ( ctx = coretestutils.Context(t) lggr = logger.TestLogger(t) @@ -731,6 +738,7 @@ func Test_RegistrySyncer_WorkflowRegistered_InitiallyActivated(t *testing.T) { } func Test_StratReconciliation_InitialStateSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") quarantine.Flaky(t, "DX-2063") t.Run("with heavy load", func(t *testing.T) { lggr := logger.TestLogger(t) @@ -802,6 +810,7 @@ func Test_StratReconciliation_InitialStateSync(t *testing.T) { } func Test_StratReconciliation_RetriesWithBackoff(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.TestLogger(t) backendTH := testutils.NewEVMBackendTH(t) donID := uint32(1) diff --git a/core/sessions/oidcauth/oidc_test.go b/core/sessions/oidcauth/oidc_test.go index 79d672ab71a..4954a057fdd 100644 --- a/core/sessions/oidcauth/oidc_test.go +++ b/core/sessions/oidcauth/oidc_test.go @@ -241,6 +241,7 @@ func Test_AuthorizeUserWithSession_Success(t *testing.T) { func Test_AuthorizeUserWithSession_Expired(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) cfg := oidcauth.TestConfig{} db, oidcAuthProvider := setupAuthenticationProvider(t) @@ -328,13 +329,13 @@ func TestORM_CreateSession_LocalAdminFallbackLogin(t *testing.T) { func Test_IDClaimsToUserRole(t *testing.T) { t.Parallel() - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") cfg := oidcauth.TestConfig{} db := pgtest.NewSqlxDB(t) oidcAuthProvider, err := oidcauth.NewTestOIDCAuthenticator(db, &cfg, logger.TestLogger(t), &audit.AuditLoggerService{}) require.NoError(t, err) - tests := []struct { + testCases := []struct { name string idClaims []string adminClaim string @@ -386,7 +387,7 @@ func Test_IDClaimsToUserRole(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { gotRole, err := oidcAuthProvider.IDClaimsToUserRole(tt.idClaims, tt.adminClaim, tt.editClaim, tt.runClaim, tt.readClaim) if !errors.Is(err, nil) && !errors.Is(err, tt.wantErr) { @@ -407,7 +408,7 @@ func Test_ExtractIDClaimValues(t *testing.T) { db := pgtest.NewSqlxDB(t) oidcAuthProvider, err := oidcauth.NewTestOIDCAuthenticator(db, &cfg, logger.TestLogger(t), &audit.AuditLoggerService{}) require.NoError(t, err) - tests := []struct { + testCases := []struct { name string claims map[string]any key string @@ -458,7 +459,7 @@ func Test_ExtractIDClaimValues(t *testing.T) { }, } - for _, tt := range tests { + for _, tt := range testCases { t.Run(tt.name, func(t *testing.T) { got, gotErr := oidcAuthProvider.ExtractIDClaimValues(tt.claims, tt.key) if !reflect.DeepEqual(got, tt.want) { From a9db8f342f8a316d67d52532c81e045a022330df Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 09:21:16 -0800 Subject: [PATCH 18/30] fix some tests --- core/services/chainlink/config_test.go | 2 +- .../channeldefinitions/onchain_channel_definition_cache_test.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 79eec469381..0776374a561 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1827,7 +1827,7 @@ func TestNewGeneralConfig_SecretsOverrides(t *testing.T) { } func TestSecrets_Validate(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "unit") for _, tt := range []struct { name string toml string diff --git a/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go b/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go index 657cf23ed2f..406421b992c 100644 --- a/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go +++ b/core/services/llo/channeldefinitions/onchain_channel_definition_cache_test.go @@ -19,9 +19,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-common/pkg/types/query" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" - "github.com/smartcontractkit/chainlink-evm/gethwrappers/llo-feeds/generated/channel_config_store" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/llo/types" From 959b6d2024a3654fb9d67e2bb0e8502a4e41491e Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 10:07:44 -0800 Subject: [PATCH 19/30] more test tagging --- core/services/ccip/orm_test.go | 4 ++- core/services/feeds/service_test.go | 1 + core/services/job/kv_orm_test.go | 5 +++ core/services/job/runner_integration_test.go | 9 +++-- core/services/job/spawner_test.go | 2 ++ core/services/keeper/orm_test.go | 1 + .../keeper/registry1_2_synchronizer_test.go | 23 +++++++++++++ .../keeper/registry1_3_synchronizer_test.go | 26 ++++++++++++++ .../registry_synchronizer_helper_test.go | 2 ++ core/services/keystore/ocr2_test.go | 2 ++ core/services/keystore/p2p_test.go | 2 ++ core/services/ocr2/delegate_test.go | 2 ++ ...annel_definition_cache_integration_test.go | 2 ++ .../ocr2/plugins/s4/integration_test.go | 2 ++ core/services/pipeline/runner_test.go | 34 ++++++++++++++++++- core/services/pipeline/task.bridge_test.go | 16 +++++++++ .../relay/evm/mercury/transmitter_test.go | 7 ++++ core/sessions/ldapauth/ldap_test.go | 1 + core/sessions/oidcauth/oidc_test.go | 2 +- 19 files changed, 137 insertions(+), 6 deletions(-) diff --git a/core/services/ccip/orm_test.go b/core/services/ccip/orm_test.go index cfe1a337d08..e794728af39 100644 --- a/core/services/ccip/orm_test.go +++ b/core/services/ccip/orm_test.go @@ -11,12 +11,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var ( @@ -26,6 +26,8 @@ var ( func setupORM(t *testing.T) (ORM, sqlutil.DataSource) { t.Helper() + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) orm, err := NewORM(db, logger.TestLogger(t)) diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 4736a7c07af..b606e62d488 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -2272,6 +2272,7 @@ func Test_Service_ListJobProposalsByManagersIDs(t *testing.T) { func Test_Service_GetJobProposal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) var ( diff --git a/core/services/job/kv_orm_test.go b/core/services/job/kv_orm_test.go index f355690093b..55721ebadc0 100644 --- a/core/services/job/kv_orm_test.go +++ b/core/services/job/kv_orm_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,8 @@ import ( ) func TestJobKVStore(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := t.Context() config := configtest.NewTestGeneralConfig(t) @@ -74,6 +77,8 @@ func TestJobKVStore(t *testing.T) { } func TestJobKVStore_PruneExpiredEntries(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx, cancel := context.WithCancel(testutils.Context(t)) defer cancel() diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index 45bc6d3ed61..4e1c814e1bb 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -29,6 +29,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/auth" "github.com/smartcontractkit/chainlink/v2/core/bridges" @@ -54,6 +55,8 @@ import ( var monitoringEndpoint = telemetry.MonitoringEndpointGenerator(&telemetry.NoopAgent{}) func TestRunner(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) @@ -214,7 +217,7 @@ func TestRunner(t *testing.T) { type = "offchainreporting" schemaVersion = 1 evmChainID = "%s" - transmitterID = "%s" + transmitterID = "%s" contractAddress = "0x613a38AC1659769640aaE063C651F48E0250454C" isBootstrapPeer = false blockchainTimeout = "1s" @@ -901,7 +904,7 @@ func TestRunner_Success_Callback_AsyncJob(t *testing.T) { ds1 [type=bridge async=true name="%s" timeout=0 requestData=<{"value": $(parse)}>] ds1_parse [type=jsonparse lax=false path="data,result"] ds1_multiply [type=multiply times=1000000000000000000 index=0] - + parse->ds1->ds1_parse->ds1_multiply; """ `, jobUUID, eiName, cltest.MustJSONMarshal(t, eiSpec), bridgeName) @@ -1080,7 +1083,7 @@ func TestRunner_Error_Callback_AsyncJob(t *testing.T) { ds1 [type=bridge async=true name="%s" timeout=0 requestData=<{"value": $(parse)}>] ds1_parse [type=jsonparse lax=false path="data,result"] ds1_multiply [type=multiply times=1000000000000000000 index=0] - + parse->ds1->ds1_parse->ds1_multiply; """ `, jobUUID, eiName, cltest.MustJSONMarshal(t, eiSpec), bridgeName) diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go index bb685456086..e07f0aa6708 100644 --- a/core/services/job/spawner_test.go +++ b/core/services/job/spawner_test.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/keys" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" @@ -78,6 +79,7 @@ func (g *relayGetter) GetIDToRelayerMap() map[types.RelayID]loop.Relayer { func TestSpawner_CreateJobDeleteJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) config := configtest.NewTestGeneralConfig(t) diff --git a/core/services/keeper/orm_test.go b/core/services/keeper/orm_test.go index 80c7b946979..e811b1fdbe3 100644 --- a/core/services/keeper/orm_test.go +++ b/core/services/keeper/orm_test.go @@ -37,6 +37,7 @@ func setupKeeperDB(t *testing.T) ( chainlink.GeneralConfig, *keeper.ORM, ) { + tests.BelongsToCISuite(t, "with-db") cfg := configtest.NewGeneralConfig(t, nil) db := pgtest.NewSqlxDB(t) orm := keeper.NewORM(db, logger.TestLogger(t)) diff --git a/core/services/keeper/registry1_2_synchronizer_test.go b/core/services/keeper/registry1_2_synchronizer_test.go index cf2d3805f23..20c1691ecd5 100644 --- a/core/services/keeper/registry1_2_synchronizer_test.go +++ b/core/services/keeper/registry1_2_synchronizer_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" registry1_2 "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/keeper_registry_wrapper1_2" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -92,6 +93,8 @@ func mockRegistry1_2( } func Test_LogListenerOpts1_2(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) korm := keeper.NewORM(db, logger.TestLogger(t)) ethClient := clienttest.NewClientWithDefaultChainID(t) @@ -118,6 +121,8 @@ func Test_LogListenerOpts1_2(t *testing.T) { } func Test_RegistrySynchronizer1_2_Start(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) contractAddress := job.KeeperSpec.ContractAddress.Address() @@ -145,6 +150,8 @@ func Test_RegistrySynchronizer1_2_Start(t *testing.T) { } func Test_RegistrySynchronizer1_2_FullSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -219,6 +226,8 @@ func Test_RegistrySynchronizer1_2_FullSync(t *testing.T) { } func Test_RegistrySynchronizer1_2_ConfigSetLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -271,6 +280,8 @@ func Test_RegistrySynchronizer1_2_ConfigSetLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_KeepersUpdatedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -322,6 +333,8 @@ func Test_RegistrySynchronizer1_2_KeepersUpdatedLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_UpkeepCanceledLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -361,6 +374,8 @@ func Test_RegistrySynchronizer1_2_UpkeepCanceledLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_UpkeepRegisteredLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -403,6 +418,8 @@ func Test_RegistrySynchronizer1_2_UpkeepRegisteredLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_UpkeepPerformedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) @@ -458,6 +475,8 @@ func Test_RegistrySynchronizer1_2_UpkeepPerformedLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_UpkeepGasLimitSetLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -511,6 +530,8 @@ func Test_RegistrySynchronizer1_2_UpkeepGasLimitSetLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_UpkeepReceivedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) @@ -553,6 +574,8 @@ func Test_RegistrySynchronizer1_2_UpkeepReceivedLog(t *testing.T) { } func Test_RegistrySynchronizer1_2_UpkeepMigratedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) diff --git a/core/services/keeper/registry1_3_synchronizer_test.go b/core/services/keeper/registry1_3_synchronizer_test.go index 1537ca81b7f..e7f1c3dd268 100644 --- a/core/services/keeper/registry1_3_synchronizer_test.go +++ b/core/services/keeper/registry1_3_synchronizer_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" registry1_3 "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/keeper_registry_wrapper1_3" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -94,6 +95,7 @@ func mockRegistry1_3( } func Test_LogListenerOpts1_3(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) korm := keeper.NewORM(db, logger.TestLogger(t)) ethClient := clienttest.NewClientWithDefaultChainID(t) @@ -123,6 +125,8 @@ func Test_LogListenerOpts1_3(t *testing.T) { } func Test_RegistrySynchronizer1_3_Start(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) contractAddress := job.KeeperSpec.ContractAddress.Address() @@ -150,6 +154,8 @@ func Test_RegistrySynchronizer1_3_Start(t *testing.T) { } func Test_RegistrySynchronizer1_3_FullSync(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -224,6 +230,8 @@ func Test_RegistrySynchronizer1_3_FullSync(t *testing.T) { } func Test_RegistrySynchronizer1_3_ConfigSetLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -276,6 +284,8 @@ func Test_RegistrySynchronizer1_3_ConfigSetLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_KeepersUpdatedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -327,6 +337,8 @@ func Test_RegistrySynchronizer1_3_KeepersUpdatedLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepCanceledLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -366,6 +378,8 @@ func Test_RegistrySynchronizer1_3_UpkeepCanceledLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepRegisteredLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -408,6 +422,8 @@ func Test_RegistrySynchronizer1_3_UpkeepRegisteredLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepPerformedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) @@ -463,6 +479,8 @@ func Test_RegistrySynchronizer1_3_UpkeepPerformedLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepGasLimitSetLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -516,6 +534,8 @@ func Test_RegistrySynchronizer1_3_UpkeepGasLimitSetLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepReceivedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -558,6 +578,8 @@ func Test_RegistrySynchronizer1_3_UpkeepReceivedLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepMigratedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -598,6 +620,8 @@ func Test_RegistrySynchronizer1_3_UpkeepMigratedLog(t *testing.T) { } func Test_RegistrySynchronizer1_3_UpkeepPausedLog_UpkeepUnpausedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) @@ -665,6 +689,8 @@ func Test_RegistrySynchronizer1_3_UpkeepPausedLog_UpkeepUnpausedLog(t *testing.T } func Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) diff --git a/core/services/keeper/registry_synchronizer_helper_test.go b/core/services/keeper/registry_synchronizer_helper_test.go index 3e173d828bf..369d630e9ae 100644 --- a/core/services/keeper/registry_synchronizer_helper_test.go +++ b/core/services/keeper/registry_synchronizer_helper_test.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/log" @@ -35,6 +36,7 @@ func setupRegistrySync(t *testing.T, version keeper.RegistryVersion) ( *logmocks.Broadcaster, job.Job, ) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewGeneralConfig(t, nil) korm := keeper.NewORM(db, logger.TestLogger(t)) diff --git a/core/services/keystore/ocr2_test.go b/core/services/keystore/ocr2_test.go index 9cc96f3d24b..e37fec2ac35 100644 --- a/core/services/keystore/ocr2_test.go +++ b/core/services/keystore/ocr2_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,7 @@ import ( ) func Test_OCR2KeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) diff --git a/core/services/keystore/p2p_test.go b/core/services/keystore/p2p_test.go index 02745c5154d..b0a7a6c8235 100644 --- a/core/services/keystore/p2p_test.go +++ b/core/services/keystore/p2p_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -19,6 +20,7 @@ import ( ) func Test_P2PKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/ocr2/delegate_test.go b/core/services/ocr2/delegate_test.go index 8ff6af26b45..16919e29b14 100644 --- a/core/services/ocr2/delegate_test.go +++ b/core/services/ocr2/delegate_test.go @@ -10,6 +10,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/keys" "github.com/smartcontractkit/chainlink/v2/core/capabilities" @@ -34,6 +35,7 @@ import ( ) func TestGetEVMEffectiveTransmitterID(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") customChainID := big.New(testutils.NewRandomEVMChainID()) config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { diff --git a/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go b/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go index 24d1342b8bf..8fa4d9251cb 100644 --- a/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go +++ b/core/services/ocr2/plugins/llo/onchain_channel_definition_cache_integration_test.go @@ -697,6 +697,8 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { func Test_ChannelDefinitionCache_OwnerAndAdderMerging(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.DebugLevel) db := pgtest.NewSqlxDB(t) const ETHMainnetChainSelector uint64 = 5009297550715157269 diff --git a/core/services/ocr2/plugins/s4/integration_test.go b/core/services/ocr2/plugins/s4/integration_test.go index d63f9679d02..3cefaff7864 100644 --- a/core/services/ocr2/plugins/s4/integration_test.go +++ b/core/services/ocr2/plugins/s4/integration_test.go @@ -46,6 +46,8 @@ type don struct { func newDON(t *testing.T, size int, config *s4.PluginConfig) *don { t.Helper() + tests.BelongsToCISuite(t, "with-db") + logger := logger.TestLogger(t) db := pgtest.NewSqlxDB(t) diff --git a/core/services/pipeline/runner_test.go b/core/services/pipeline/runner_test.go index 59b99198a8e..9dd0076202f 100644 --- a/core/services/pipeline/runner_test.go +++ b/core/services/pipeline/runner_test.go @@ -22,6 +22,7 @@ import ( "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" bridgesMocks "github.com/smartcontractkit/chainlink/v2/core/bridges/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -54,6 +55,7 @@ func newRunner(t testing.TB, db *sqlx.DB, bridgeORM bridges.ORM, cfg chainlink.G } func Test_PipelineRunner_ExecuteTaskRuns(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -135,6 +137,7 @@ ds5 [type=http method="GET" url="%s" index=2] } func Test_PipelineRunner_ExecuteEthAbiDecode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -154,7 +157,7 @@ func Test_PipelineRunner_ExecuteEthAbiDecode(t *testing.T) { s := fmt.Sprintf(` ds1 [type=bridge name="%s" timeout=0 requestData=<{"data": {"address": "0x1234"}}>] - ds1_parse [type=jsonparse path="data,result"] + ds1_parse [type=jsonparse path="data,result"] ds1_decode [type=ethabidecode abi="int256 data" data="$(ds1_parse)"]; ds1_value [type="multiply" input="$(ds1_decode.data)" times=1] @@ -220,6 +223,7 @@ func (t taskRunWithVars) String() string { } func Test_PipelineRunner_ExecuteTaskRunsWithVars(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") t.Parallel() tests := []struct { @@ -452,6 +456,8 @@ func Test_PipelineRunner_CBORParse(t *testing.T) { } func Test_PipelineRunner_HandleFaults(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + // We want to test the scenario where one or multiple APIs time out, // but a sufficient number of them still complete within the desired time frame // and so we can still obtain a median. @@ -503,6 +509,8 @@ answer1 [type=median index=0]; } func Test_PipelineRunner_HandleFaultsPersistRun(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) orm := mocks.NewORM(t) btORM := bridgesMocks.NewORM(t) @@ -549,6 +557,8 @@ succeed2 -> final; } func Test_PipelineRunner_ExecuteAndInsertFinishedRun_SavingTheSpec(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) orm := mocks.NewORM(t) btORM := bridgesMocks.NewORM(t) @@ -594,6 +604,8 @@ succeed2 -> final; } func Test_PipelineRunner_MultipleOutputs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -622,6 +634,8 @@ a->b2->c;`, } func Test_PipelineRunner_MultipleTerminatingOutputs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) r, _ := newRunner(t, pgtest.NewSqlxDB(t), btORM, cfg) @@ -644,6 +658,8 @@ a->b2;`, } func Test_PipelineRunner_AsyncJob_Basic(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) btcUSDPairing := utils.MustUnmarshalToMap(`{"data":{"coin":"BTC","market":"USD"}}`) @@ -774,6 +790,8 @@ ds5 [type=http method="GET" url="%s" index=2] } func Test_PipelineRunner_AsyncJob_InstantRestart(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) btcUSDPairing := utils.MustUnmarshalToMap(`{"data":{"coin":"BTC","market":"USD"}}`) @@ -893,6 +911,8 @@ ds5 [type=http method="GET" url="%s" index=2] } func Test_PipelineRunner_LowercaseOutputs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -916,6 +936,8 @@ a [type=lowercase input="$(first)"] } func Test_PipelineRunner_UppercaseOutputs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -938,6 +960,8 @@ a [type=uppercase input="$(first)"] } func Test_PipelineRunner_HexDecodeOutputs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -960,6 +984,8 @@ a [type=hexdecode input="$(astring)"] } func Test_PipelineRunner_HexEncodeAndDecode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -985,6 +1011,8 @@ en->de } func Test_PipelineRunner_Base64DecodeOutputs(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -1007,6 +1035,8 @@ a [type=base64decode input="$(astring)"] } func Test_PipelineRunner_Base64EncodeAndDecode(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) @@ -1032,6 +1062,8 @@ en->de } func Test_PipelineRunner_ExecuteRun(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + t.Run("uses cached *Pipeline if available", func(t *testing.T) { db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) diff --git a/core/services/pipeline/task.bridge_test.go b/core/services/pipeline/task.bridge_test.go index 9d65f1bde40..0c54a5f9998 100644 --- a/core/services/pipeline/task.bridge_test.go +++ b/core/services/pipeline/task.bridge_test.go @@ -24,6 +24,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -212,6 +213,7 @@ func fakeStringResponder(t *testing.T, s string) http.Handler { func TestBridgeTask_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -271,6 +273,7 @@ func TestBridgeTask_Happy(t *testing.T) { func TestBridgeTask_HandlesIntermittentFailure(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) {}) @@ -332,6 +335,7 @@ func TestBridgeTask_HandlesIntermittentFailure(t *testing.T) { func TestBridgeTask_DoesNotReturnStaleResults(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) @@ -426,6 +430,7 @@ func TestBridgeTask_DoesNotReturnStaleResults(t *testing.T) { func TestBridgeTask_AsyncJobPendingState(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -477,6 +482,7 @@ func TestBridgeTask_AsyncJobPendingState(t *testing.T) { func TestBridgeTask_Variables(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") validMeta := map[string]any{"theMeta": "yes"} @@ -720,6 +726,7 @@ func TestBridgeTask_Meta(t *testing.T) { func TestBridgeTask_IncludeInputAtKey(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") theErr := errors.New("foo") @@ -787,6 +794,7 @@ func TestBridgeTask_IncludeInputAtKey(t *testing.T) { func TestBridgeTask_ErrorMessage(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -829,6 +837,7 @@ func TestBridgeTask_ErrorMessage(t *testing.T) { func TestBridgeTask_OnlyErrorMessage(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -868,6 +877,7 @@ func TestBridgeTask_OnlyErrorMessage(t *testing.T) { func TestBridgeTask_ErrorIfBridgeMissing(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -895,6 +905,7 @@ func TestBridgeTask_ErrorIfBridgeMissing(t *testing.T) { // https://github.com/smartcontractkit/price-adapters#chainlink-price-request-adapters func TestAdapterResponse_UnmarshalJSON_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name, content string @@ -918,6 +929,8 @@ func TestAdapterResponse_UnmarshalJSON_Happy(t *testing.T) { } func TestBridgeTask_Headers(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) @@ -1025,6 +1038,7 @@ func TestBridgeTask_Headers(t *testing.T) { func TestBridgeTask_AdapterResponseStatusFailure(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) @@ -1131,6 +1145,7 @@ func TestBridgeTask_AdapterResponseStatusFailure(t *testing.T) { func TestBridgeTask_AdapterTimeout(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) db := pgtest.NewSqlxDB(t) @@ -1202,6 +1217,7 @@ func TestBridgeTask_AdapterTimeout(t *testing.T) { func TestBridgeTask_PipelineAdapterLWBAError(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") dag := ` ds [type=bridge name="adapter-error-bridge" timeout="50ms" requestData="{\"data\":{\"from\":\"ETH\",\"to\":\"USD\"}}"]; diff --git a/core/services/relay/evm/mercury/transmitter_test.go b/core/services/relay/evm/mercury/transmitter_test.go index f905639763b..0ce977bed7c 100644 --- a/core/services/relay/evm/mercury/transmitter_test.go +++ b/core/services/relay/evm/mercury/transmitter_test.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/testutils" "github.com/smartcontractkit/chainlink-evm/pkg/utils" @@ -42,6 +43,7 @@ func (m mockCfg) TransmitTimeout() time.Duration { } func Test_MercuryTransmitter_Transmit(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") lggr := logger.Test(t) db := testutils.NewSqlxDB(t) var jobID int32 @@ -127,6 +129,7 @@ func Test_MercuryTransmitter_Transmit(t *testing.T) { func Test_MercuryTransmitter_LatestTimestamp(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") lggr := logger.Test(t) db := testutils.NewSqlxDB(t) var jobID int32 @@ -236,6 +239,7 @@ func (m *mockCodec) ObservationTimestampFromReport(ctx context.Context, report o func Test_MercuryTransmitter_LatestPrice(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") lggr := logger.Test(t) db := testutils.NewSqlxDB(t) var jobID int32 @@ -315,6 +319,7 @@ func Test_MercuryTransmitter_LatestPrice(t *testing.T) { func Test_MercuryTransmitter_FetchInitialMaxFinalizedBlockNumber(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") lggr := logger.Test(t) db := testutils.NewSqlxDB(t) @@ -394,6 +399,7 @@ func Test_MercuryTransmitter_FetchInitialMaxFinalizedBlockNumber(t *testing.T) { } func Test_sortReportsLatestFirst(t *testing.T) { + tests.BelongsToCISuite(t, "unit") reports := []*pb.Report{ nil, {ObservationsTimestamp: 1}, @@ -448,6 +454,7 @@ func (m *mockQ) Init(transmissions []*Transmission) {} func (m *mockQ) IsEmpty() bool { return false } func Test_MercuryTransmitter_runQueueLoop(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") feedIDHex := utils.NewHash().Hex() lggr := logger.Test(t) c := &mocks.MockWSRPCClient{} diff --git a/core/sessions/ldapauth/ldap_test.go b/core/sessions/ldapauth/ldap_test.go index 62a90dbb1a7..3e646620071 100644 --- a/core/sessions/ldapauth/ldap_test.go +++ b/core/sessions/ldapauth/ldap_test.go @@ -27,6 +27,7 @@ import ( // Setup LDAP Auth authenticator func setupAuthenticationProvider(t *testing.T, ldapClient ldapauth.LDAPClient) (*sqlx.DB, sessions.AuthenticationProvider) { t.Helper() + tests.BelongsToCISuite(t, "with-db") cfg := ldapauth.TestConfig{} db := pgtest.NewSqlxDB(t) diff --git a/core/sessions/oidcauth/oidc_test.go b/core/sessions/oidcauth/oidc_test.go index 4954a057fdd..a2fdd260493 100644 --- a/core/sessions/oidcauth/oidc_test.go +++ b/core/sessions/oidcauth/oidc_test.go @@ -24,7 +24,7 @@ import ( // Setup oidc Auth authenticator func setupAuthenticationProvider(t *testing.T) (*sqlx.DB, sessions.AuthenticationProvider) { t.Helper() - + tests.BelongsToCISuite(t, "with-db") cfg := oidcauth.TestConfig{} db := pgtest.NewSqlxDB(t) oidcAuthProvider, err := oidcauth.NewTestOIDCAuthenticator(db, &cfg, logger.TestLogger(t), &audit.AuditLoggerService{}) From d43bf17cccc5443ad547f6605b480a849175c4ee Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 10:17:48 -0800 Subject: [PATCH 20/30] test: config_test whitespace --- core/services/chainlink/config_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 0776374a561..ea99b3c88b0 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1827,7 +1827,7 @@ func TestNewGeneralConfig_SecretsOverrides(t *testing.T) { } func TestSecrets_Validate(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") for _, tt := range []struct { name string toml string @@ -1847,25 +1847,25 @@ BackupURL = "foo-bar?password=asdf" AllowSimplePasswords = false`, exp: `invalid secrets: 2 errors: - Database: 2 errors: - - URL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: + - URL: invalid value (*****): missing or insufficiently complex password: DB URL must be authenticated; plaintext URLs are not allowed. Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - - - BackupURL: invalid value (*****): missing or insufficiently complex password: + + - BackupURL: invalid value (*****): missing or insufficiently complex password: Expected password complexity: Must be at least 16 characters long Must not comprise: Leading or trailing whitespace A user's API email - + Faults: password is less than 16 characters long - . Database should be secured by a password matching the following complexity requirements: + . Database should be secured by a password matching the following complexity requirements: Must have a length of 16-50 characters Must not comprise: Leading or trailing whitespace (note that a trailing newline in the password file, if present, will be ignored) - + - Password.Keystore: empty: must be provided and non-empty`}, {name: "invalid-urls-allowed", From 826f9317f6c38f63555212e1b206758fd797a146 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 10:26:49 -0800 Subject: [PATCH 21/30] more test tagging --- core/cmd/solana_keys_commands_test.go | 4 ++++ core/services/keystore/ocr_test.go | 3 +++ .../ccip/internal/ccipdata/price_registry_reader_test.go | 3 +++ core/services/ocr2/plugins/llo/integration_test.go | 1 + 4 files changed, 11 insertions(+) diff --git a/core/cmd/solana_keys_commands_test.go b/core/cmd/solana_keys_commands_test.go index ca6c4678b8d..49947cdce27 100644 --- a/core/cmd/solana_keys_commands_test.go +++ b/core/cmd/solana_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestSolanaKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( id = "1" @@ -56,6 +58,8 @@ func TestSolanaKeyPresenter_RenderTable(t *testing.T) { } func TestShell_SolanaKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Solana() cleanup := func() { diff --git a/core/services/keystore/ocr_test.go b/core/services/keystore/ocr_test.go index f3ad841c8d0..d1267621d03 100644 --- a/core/services/keystore/ocr_test.go +++ b/core/services/keystore/ocr_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,8 @@ import ( ) func Test_OCRKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdata/price_registry_reader_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdata/price_registry_reader_test.go index 16abad78dd7..11ae29c3ee8 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdata/price_registry_reader_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdata/price_registry_reader_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -238,6 +239,7 @@ func testPriceRegistryReader(t *testing.T, th priceRegReaderTH, pr ccipdata.Pric } func TestPriceRegistryReader(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") th := setupPriceRegistryReaderTH(t) // Assert all readers produce the same expected results. for version, pr := range th.readers { @@ -248,6 +250,7 @@ func TestPriceRegistryReader(t *testing.T) { } func TestNewPriceRegistryReader(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") var tt = []struct { typeAndVersion string expectedErr string diff --git a/core/services/ocr2/plugins/llo/integration_test.go b/core/services/ocr2/plugins/llo/integration_test.go index ae3b597908a..e8c9992990a 100644 --- a/core/services/ocr2/plugins/llo/integration_test.go +++ b/core/services/ocr2/plugins/llo/integration_test.go @@ -2185,6 +2185,7 @@ channelDefinitionsContractFromBlock = %d`, serverURL, serverPubKey, donID, confi func TestIntegration_LLO_channel_merging_owners_adders(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") offchainConfig := datastreamsllo.OffchainConfig{ ProtocolVersion: 1, From 533c72bdf41bfd4c665eafab3ce4f9b735f7f38e Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 10:42:20 -0800 Subject: [PATCH 22/30] more test tagging --- core/bridges/orm_test.go | 2 +- core/cmd/solana_transaction_commands_test.go | 3 +++ core/cmd/starknet_keys_commands_test.go | 4 ++++ core/cmd/sui_keys_commands_test.go | 4 ++++ core/cmd/ton_keys_commands_test.go | 4 ++++ core/cmd/tron_keys_commands_test.go | 4 ++++ core/cmd/vrf_keys_commands_test.go | 5 +++++ core/services/job/runner_integration_test.go | 4 ++++ core/services/keeper/upkeep_executer_test.go | 5 +++++ core/services/keystore/eth_test.go | 11 +++++++++-- core/services/keystore/master_test.go | 2 ++ core/services/keystore/solana_test.go | 2 ++ core/services/keystore/starknet_test.go | 2 ++ core/services/keystore/sui_test.go | 2 ++ core/services/keystore/ton_test.go | 2 ++ core/services/keystore/tron_test.go | 2 ++ core/services/keystore/vrf_test.go | 2 ++ core/services/keystore/workflow_test.go | 2 ++ .../ccip/internal/ccipdb/price_service_test.go | 2 +- core/services/pg/locked_db_test.go | 2 +- core/services/pipeline/task.eth_call_test.go | 2 ++ 21 files changed, 63 insertions(+), 5 deletions(-) diff --git a/core/bridges/orm_test.go b/core/bridges/orm_test.go index e73e1c4b2e1..36ff86b240f 100644 --- a/core/bridges/orm_test.go +++ b/core/bridges/orm_test.go @@ -24,7 +24,7 @@ import ( func setupORM(t *testing.T) (*sqlx.DB, bridges.ORM) { t.Helper() - + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) orm := bridges.NewORM(db) diff --git a/core/cmd/solana_transaction_commands_test.go b/core/cmd/solana_transaction_commands_test.go index d0d20fe451a..4fe029a3302 100644 --- a/core/cmd/solana_transaction_commands_test.go +++ b/core/cmd/solana_transaction_commands_test.go @@ -16,6 +16,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" solanatesting "github.com/smartcontractkit/chainlink-solana/pkg/solana/testing" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -25,6 +26,8 @@ import ( // TODO: move this test to `chainlink-solana` https://smartcontract-it.atlassian.net/browse/NONEVM-790 func TestShell_SolanaSendSol(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) chainID := "localnet" url := solanatesting.SetupLocalSolNode(t) diff --git a/core/cmd/starknet_keys_commands_test.go b/core/cmd/starknet_keys_commands_test.go index 683a78cb3ee..bc9c2a82504 100644 --- a/core/cmd/starknet_keys_commands_test.go +++ b/core/cmd/starknet_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestStarkNetKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( id = "1" @@ -55,6 +57,8 @@ func TestStarkNetKeyPresenter_RenderTable(t *testing.T) { } func TestShell_StarkNetKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().StarkNet() cleanup := func() { diff --git a/core/cmd/sui_keys_commands_test.go b/core/cmd/sui_keys_commands_test.go index e57db1ef5cf..809f8a7bda6 100644 --- a/core/cmd/sui_keys_commands_test.go +++ b/core/cmd/sui_keys_commands_test.go @@ -14,6 +14,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -23,6 +24,7 @@ import ( func TestSuiKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( id = "1" @@ -57,6 +59,8 @@ func TestSuiKeyPresenter_RenderTable(t *testing.T) { } func TestShell_SuiKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Sui() cleanup := func() { diff --git a/core/cmd/ton_keys_commands_test.go b/core/cmd/ton_keys_commands_test.go index 3af934868a8..c5a426de904 100644 --- a/core/cmd/ton_keys_commands_test.go +++ b/core/cmd/ton_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestTONKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( id = "1" @@ -56,6 +58,8 @@ func TestTONKeyPresenter_RenderTable(t *testing.T) { } func TestShell_TONKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().TON() cleanup := func() { diff --git a/core/cmd/tron_keys_commands_test.go b/core/cmd/tron_keys_commands_test.go index 29480600d74..599072faa34 100644 --- a/core/cmd/tron_keys_commands_test.go +++ b/core/cmd/tron_keys_commands_test.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -22,6 +23,7 @@ import ( func TestTronKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( id = "1" @@ -56,6 +58,8 @@ func TestTronKeyPresenter_RenderTable(t *testing.T) { } func TestShell_TronKeys(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Tron() cleanup := func() { diff --git a/core/cmd/vrf_keys_commands_test.go b/core/cmd/vrf_keys_commands_test.go index 0876a64bcbb..0cc62c370af 100644 --- a/core/cmd/vrf_keys_commands_test.go +++ b/core/cmd/vrf_keys_commands_test.go @@ -9,6 +9,7 @@ import ( "github.com/urfave/cli" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -20,6 +21,7 @@ import ( func TestVRFKeyPresenter_RenderTable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") var ( compressed = "0xe2c659dd73ded1663c0caf02304aac5ccd247047b3993d273a8920bba0402f4d01" @@ -68,6 +70,7 @@ func AssertKeysEqualNoTimestamps(t *testing.T, k1, k2 cmd.VRFKeyPresenter) { func TestShellVRF_CRUD(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") // Test application boots with vrf password loaded in memory. // i.e. as if a user had booted with --vrfpassword= @@ -126,6 +129,8 @@ func TestShellVRF_CRUD(t *testing.T) { func TestVRF_ImportExport(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") + // Test application boots with vrf password loaded in memory. // i.e. as if a user had booted with --vrfpassword= app := startNewApplicationV2(t, nil) diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index 4e1c814e1bb..809160664ab 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -635,6 +635,8 @@ answer1 [type=median index=0]; }) t.Run("test job spec error is created", func(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + ctx := testutils.Context(t) // Create a keystore with an ocr key bundle and p2p key. kb, err := keyStore.OCR().Create(ctx) @@ -783,6 +785,7 @@ answer1 [type=median index=0]; func TestRunner_Success_Callback_AsyncJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := cltest.NewEthMocksWithStartupAssertions(t) @@ -962,6 +965,7 @@ func TestRunner_Success_Callback_AsyncJob(t *testing.T) { func TestRunner_Error_Callback_AsyncJob(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ethClient := cltest.NewEthMocksWithStartupAssertions(t) diff --git a/core/services/keeper/upkeep_executer_test.go b/core/services/keeper/upkeep_executer_test.go index e645b0a1bd2..6e30f4bb330 100644 --- a/core/services/keeper/upkeep_executer_test.go +++ b/core/services/keeper/upkeep_executer_test.go @@ -16,6 +16,7 @@ import ( "github.com/jmoiron/sqlx" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -61,6 +62,7 @@ func setup(t *testing.T, overrideFn func(c *chainlink.Config, s *chainlink.Secre fn(c, s) } }) + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) ethClient := evmtest.NewEthClientMock(t) @@ -112,6 +114,7 @@ var checkPerformResponse = struct { func Test_UpkeepExecuter_ErrorsIfStartedTwice(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") _, _, _, executer, _, _, _, _, _, _, _, _ := setup(t, nil) err := executer.Start(testutils.Context(t)) // already started in setup() require.Error(t, err) @@ -121,6 +124,7 @@ func Test_UpkeepExecuter_PerformsUpkeep_Happy(t *testing.T) { taskRuns := 11 t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("runs upkeep on triggering block number", func(t *testing.T) { db, config, ethMock, executer, registry, upkeep, job, jpv2, txm, _, _, _ := setup(t, @@ -314,6 +318,7 @@ func Test_UpkeepExecuter_PerformsUpkeep_Happy(t *testing.T) { func Test_UpkeepExecuter_PerformsUpkeep_Error(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") g := gomega.NewWithT(t) diff --git a/core/services/keystore/eth_test.go b/core/services/keystore/eth_test.go index dcc239d4e65..c50dd5ffb1e 100644 --- a/core/services/keystore/eth_test.go +++ b/core/services/keystore/eth_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/require" commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr/txmgrtest" "github.com/smartcontractkit/chainlink-evm/pkg/utils" ubig "github.com/smartcontractkit/chainlink-evm/pkg/utils/big" @@ -25,7 +26,7 @@ import ( func Test_EthKeyStore(t *testing.T) { t.Parallel() - + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) @@ -218,7 +219,7 @@ func Test_EthKeyStore(t *testing.T) { func Test_EthKeyStore_GetRoundRobinAddress(t *testing.T) { ctx := testutils.Context(t) t.Parallel() - + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) @@ -338,6 +339,7 @@ func Test_EthKeyStore_GetRoundRobinAddress(t *testing.T) { func Test_EthKeyStore_E2E(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) @@ -464,6 +466,7 @@ func Test_EthKeyStore_E2E(t *testing.T) { func Test_EthKeyStore_Enable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) @@ -512,6 +515,7 @@ func Test_EthKeyStore_Enable(t *testing.T) { func Test_EthKeyStore_EnsureKeys(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") t.Run("creates one unique key per chain if none exist", func(t *testing.T) { ctx := testutils.Context(t) @@ -584,6 +588,7 @@ func Test_EthKeyStore_EnsureKeys(t *testing.T) { func Test_EthKeyStore_Delete(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) @@ -631,6 +636,7 @@ func Test_EthKeyStore_Delete(t *testing.T) { func Test_EthKeyStore_CheckEnabled(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") ctx := testutils.Context(t) @@ -718,6 +724,7 @@ func Test_EthKeyStore_CheckEnabled(t *testing.T) { func Test_EthKeyStore_Disable(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := cltest.NewKeyStore(t, db) diff --git a/core/services/keystore/master_test.go b/core/services/keystore/master_test.go index 86d320f6eb3..379d9f78399 100644 --- a/core/services/keystore/master_test.go +++ b/core/services/keystore/master_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -14,6 +15,7 @@ import ( func TestMasterKeystore_Unlock_Save(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) diff --git a/core/services/keystore/solana_test.go b/core/services/keystore/solana_test.go index 1a69cb692be..cf97d6e801c 100644 --- a/core/services/keystore/solana_test.go +++ b/core/services/keystore/solana_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,7 @@ import ( ) func Test_SolanaKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/keystore/starknet_test.go b/core/services/keystore/starknet_test.go index 31d99f49c86..c7cd2aea994 100644 --- a/core/services/keystore/starknet_test.go +++ b/core/services/keystore/starknet_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -20,6 +21,7 @@ import ( ) func Test_StarkNetKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/keystore/sui_test.go b/core/services/keystore/sui_test.go index b5099ab37fc..f1a040e8ea4 100644 --- a/core/services/keystore/sui_test.go +++ b/core/services/keystore/sui_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,7 @@ import ( ) func Test_SuiKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/keystore/ton_test.go b/core/services/keystore/ton_test.go index 430b2010b4a..6649daedfa4 100644 --- a/core/services/keystore/ton_test.go +++ b/core/services/keystore/ton_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -16,6 +17,7 @@ import ( ) func Test_TONKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/keystore/tron_test.go b/core/services/keystore/tron_test.go index e93f4860e52..34c5d1afe71 100644 --- a/core/services/keystore/tron_test.go +++ b/core/services/keystore/tron_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -18,6 +19,7 @@ import ( ) func Test_TronKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) diff --git a/core/services/keystore/vrf_test.go b/core/services/keystore/vrf_test.go index 3df9101492f..4a7b5b43587 100644 --- a/core/services/keystore/vrf_test.go +++ b/core/services/keystore/vrf_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -19,6 +20,7 @@ import ( ) func Test_VRFKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) diff --git a/core/services/keystore/workflow_test.go b/core/services/keystore/workflow_test.go index 6696818d90b..91fcdf90084 100644 --- a/core/services/keystore/workflow_test.go +++ b/core/services/keystore/workflow_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -17,6 +18,7 @@ import ( ) func Test_EncryptionKeyStore_E2E(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) diff --git a/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go b/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go index 20cddbcd261..5828748ddcc 100644 --- a/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go +++ b/core/services/ocr2/plugins/ccip/internal/ccipdb/price_service_test.go @@ -744,7 +744,7 @@ func val1e18(val int64) *big.Int { func setupORM(t *testing.T) cciporm.ORM { t.Helper() - + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) orm, err := cciporm.NewORM(db, logger.TestLogger(t)) diff --git a/core/services/pg/locked_db_test.go b/core/services/pg/locked_db_test.go index 305dc46166e..07437f40fcf 100644 --- a/core/services/pg/locked_db_test.go +++ b/core/services/pg/locked_db_test.go @@ -41,7 +41,7 @@ func TestLockedDB_HappyPath(t *testing.T) { } func TestLockedDB_ContextCancelled(t *testing.T) { - tests.BelongsToCISuite(t, "unit") + tests.BelongsToCISuite(t, "with-db") testutils.SkipShortDB(t) config := configtest.NewGeneralConfig(t, lease) lggr := logger.TestLogger(t) diff --git a/core/services/pipeline/task.eth_call_test.go b/core/services/pipeline/task.eth_call_test.go index e7d42a7ef1b..5f2a31e3ec1 100644 --- a/core/services/pipeline/task.eth_call_test.go +++ b/core/services/pipeline/task.eth_call_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" @@ -30,6 +31,7 @@ import ( func TestETHCallTask(t *testing.T) { t.Parallel() testutils.SkipShortDB(t) + tests.BelongsToCISuite(t, "with-db") var specGasLimit uint32 = 123 const gasLimit uint64 = 500_000 From 2d6101318c2f0ef2de160e0e9e0a9ede3e9f383b Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 10:58:54 -0800 Subject: [PATCH 23/30] more test tagging --- core/services/pipeline/runner_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/services/pipeline/runner_test.go b/core/services/pipeline/runner_test.go index 9dd0076202f..51302993459 100644 --- a/core/services/pipeline/runner_test.go +++ b/core/services/pipeline/runner_test.go @@ -395,6 +395,8 @@ decode_log -> decode_cbor; ) func Test_PipelineRunner_CBORParse(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) From fef7a1942fe80bb15d05e9a4305ff10e56a8f9f2 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 11:09:36 -0800 Subject: [PATCH 24/30] more test tagging --- core/services/job/models_test.go | 7 ++++++- core/services/job/orm_test.go | 3 +++ .../job/wasm_file_spec_factory_test.go | 2 ++ core/services/job/yaml_spec_factory_test.go | 3 +++ core/services/keystore/starknet_test.go | 1 + core/services/llo/cre/report_codec_test.go | 1 + core/services/llo/report_codecs_test.go | 2 ++ core/services/pipeline/task.any_test.go | 2 ++ .../pipeline/task.base64decode_test.go | 2 ++ .../pipeline/task.base64encode_test.go | 3 +++ core/services/pipeline/task.bridge_test.go | 1 + core/services/pipeline/task.cborparse_test.go | 2 ++ core/services/pipeline/task.coalesce_test.go | 2 ++ .../pipeline/task.conditional_test.go | 2 ++ core/services/pipeline/task.divide_test.go | 5 +++++ .../pipeline/task.eth_abi_decode_log_test.go | 2 ++ .../pipeline/task.eth_abi_encode_2_test.go | 2 ++ .../pipeline/task.eth_abi_encode_test.go | 4 ++++ core/services/pipeline/task.eth_tx_test.go | 2 ++ core/services/pipeline/task.hexdecode_test.go | 2 ++ core/services/pipeline/task.hexencode_test.go | 3 +++ core/services/pipeline/task.http_test.go | 7 +++++++ core/services/pipeline/task.jsonparse_test.go | 2 ++ core/services/pipeline/task.length_test.go | 2 ++ core/services/pipeline/task.lessthan_test.go | 3 +++ core/services/pipeline/task.lookup_test.go | 2 ++ core/services/pipeline/task.lowercase_test.go | 2 ++ core/services/pipeline/task.max_test.go | 2 ++ core/services/pipeline/task.mean_test.go | 2 ++ core/services/pipeline/task.median_test.go | 3 +++ core/services/pipeline/task.memo_test.go | 2 ++ core/services/pipeline/task.merge_test.go | 2 ++ core/services/pipeline/task.min_test.go | 2 ++ core/services/pipeline/task.mode_test.go | 2 ++ core/services/pipeline/task.multiply_test.go | 4 ++++ core/services/pipeline/task.sum_test.go | 2 ++ core/services/pipeline/task.uppercase_test.go | 2 ++ .../pipeline/task_object_params_test.go | 3 +++ core/services/pipeline/task_params_test.go | 21 +++++++++++++++++++ core/services/pipeline/variables_test.go | 4 ++++ core/services/relay/evm/mercury/queue_test.go | 2 ++ 41 files changed, 123 insertions(+), 1 deletion(-) diff --git a/core/services/job/models_test.go b/core/services/job/models_test.go index a974a87cc81..ce45246cd8d 100644 --- a/core/services/job/models_test.go +++ b/core/services/job/models_test.go @@ -18,12 +18,14 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/relay" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" ) func TestStandardCapabilitiesSpec_Deserialization(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tomlData := ` type = "standardcapabilities" schemaVersion = 1 @@ -32,7 +34,7 @@ func TestStandardCapabilitiesSpec_Deserialization(t *testing.T) { forwardingAllowed = false command = "consensus" config = """""" - + [oracle_factory] enabled = true bootstrap_peers = ["12D3KooWBAzThfs9pD4WcsFKCi68EUz2fZgZskDBT6JcJRndPss5@cl-keystone-two-bt-0:5001"] @@ -64,6 +66,7 @@ func TestStandardCapabilitiesSpec_Deserialization(t *testing.T) { } func TestOCR2OracleSpec_RelayIdentifier(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { Relay string ChainID string @@ -135,6 +138,7 @@ var ( ) func TestOCR2OracleSpec(t *testing.T) { + tests.BelongsToCISuite(t, "unit") val := job.OCR2OracleSpec{ Relay: relay.NetworkEVM, PluginType: types.Median, @@ -315,6 +319,7 @@ func TestOCR2OracleSpec(t *testing.T) { } func TestWorkflowSpec_Validate(t *testing.T) { + tests.BelongsToCISuite(t, "unit") type fields struct { Workflow string } diff --git a/core/services/job/orm_test.go b/core/services/job/orm_test.go index 9f3cd296c38..6d060772ef8 100644 --- a/core/services/job/orm_test.go +++ b/core/services/job/orm_test.go @@ -8,6 +8,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" @@ -27,6 +28,7 @@ func NewTestORM(t *testing.T, ds sqlutil.DataSource, pipelineORM pipeline.ORM, b func TestLoadConfigVarsLocalOCR(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := configtest.NewTestGeneralConfig(t) chainConfig := evmtest.NewChainScopedConfig(t, config) @@ -48,6 +50,7 @@ func TestLoadConfigVarsLocalOCR(t *testing.T) { func TestSetDRMinIncomingConfirmations(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { hundred := uint32(100) diff --git a/core/services/job/wasm_file_spec_factory_test.go b/core/services/job/wasm_file_spec_factory_test.go index 8160998d093..9fbe83834c3 100644 --- a/core/services/job/wasm_file_spec_factory_test.go +++ b/core/services/job/wasm_file_spec_factory_test.go @@ -15,12 +15,14 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/workflows/wasm/host" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) func TestWasmFileSpecFactory(t *testing.T) { + tests.BelongsToCISuite(t, "unit") binaryLocation := createTestBinary(t) configLocation := "testdata/config.json" config, err := os.ReadFile(configLocation) diff --git a/core/services/job/yaml_spec_factory_test.go b/core/services/job/yaml_spec_factory_test.go index e309db97d1c..ac74a032e09 100644 --- a/core/services/job/yaml_spec_factory_test.go +++ b/core/services/job/yaml_spec_factory_test.go @@ -10,6 +10,7 @@ import ( commonworkflows "github.com/smartcontractkit/chainlink-common/pkg/workflows" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" ) @@ -66,6 +67,7 @@ targets: func TestYamlSpecFactory_GetSpec(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") actual, raw, actualSha, err := job.YAMLSpecFactory{}.Spec(testutils.Context(t), anyYamlSpec, "") require.NoError(t, err) @@ -80,6 +82,7 @@ func TestYamlSpecFactory_GetSpec(t *testing.T) { func TestYamlSpecFactory_Config(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := "config" actual, err := job.YAMLSpecFactory{}.Config(testutils.Context(t), config) diff --git a/core/services/keystore/starknet_test.go b/core/services/keystore/starknet_test.go index c7cd2aea994..aabf80b32a4 100644 --- a/core/services/keystore/starknet_test.go +++ b/core/services/keystore/starknet_test.go @@ -111,6 +111,7 @@ func Test_StarkNetKeyStore_E2E(t *testing.T) { } func TestStarknetSigner(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var ( starknetSenderAddr = "legit" ) diff --git a/core/services/llo/cre/report_codec_test.go b/core/services/llo/cre/report_codec_test.go index 8367f81a33f..2c2d1004662 100644 --- a/core/services/llo/cre/report_codec_test.go +++ b/core/services/llo/cre/report_codec_test.go @@ -336,6 +336,7 @@ func Test_ReportCodec(t *testing.T) { } func TestReportCodecCapabilityTrigger_ParseOpts(t *testing.T) { + tests.BelongsToCISuite(t, "unit") t.Run("ParseOpts: Valid opts with multipliers SUCCESS", func(t *testing.T) { donID := uint32(1) c := NewReportCodecCapabilityTrigger(logger.Test(t), donID) diff --git a/core/services/llo/report_codecs_test.go b/core/services/llo/report_codecs_test.go index ad7d732f7cc..fd5e195bb62 100644 --- a/core/services/llo/report_codecs_test.go +++ b/core/services/llo/report_codecs_test.go @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/assert" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) func Test_NewReportCodecs(t *testing.T) { + tests.BelongsToCISuite(t, "unit") c := NewReportCodecs(logger.TestLogger(t), 1) assert.Contains(t, c, llotypes.ReportFormatJSON, "expected JSON to be supported") diff --git a/core/services/pipeline/task.any_test.go b/core/services/pipeline/task.any_test.go index 2827d0d15b2..ff9e4fd401b 100644 --- a/core/services/pipeline/task.any_test.go +++ b/core/services/pipeline/task.any_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -15,6 +16,7 @@ import ( func TestAnyTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.base64decode_test.go b/core/services/pipeline/task.base64decode_test.go index 4ca80669bda..d9ce353c1bc 100644 --- a/core/services/pipeline/task.base64decode_test.go +++ b/core/services/pipeline/task.base64decode_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -13,6 +14,7 @@ import ( func TestBase64DecodeTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.base64encode_test.go b/core/services/pipeline/task.base64encode_test.go index 44a26f390cb..0b84d2c1588 100644 --- a/core/services/pipeline/task.base64encode_test.go +++ b/core/services/pipeline/task.base64encode_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestBase64EncodeTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -68,6 +70,7 @@ func TestBase64EncodeTask(t *testing.T) { func TestBase64EncodeTaskInputParamLiteral(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/services/pipeline/task.bridge_test.go b/core/services/pipeline/task.bridge_test.go index 0c54a5f9998..122a8b4a3c3 100644 --- a/core/services/pipeline/task.bridge_test.go +++ b/core/services/pipeline/task.bridge_test.go @@ -675,6 +675,7 @@ func TestBridgeTask_Variables(t *testing.T) { func TestBridgeTask_Meta(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) diff --git a/core/services/pipeline/task.cborparse_test.go b/core/services/pipeline/task.cborparse_test.go index 108d8f79f1f..cbc2f2c5182 100644 --- a/core/services/pipeline/task.cborparse_test.go +++ b/core/services/pipeline/task.cborparse_test.go @@ -6,12 +6,14 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestCBORParseTask(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string data string diff --git a/core/services/pipeline/task.coalesce_test.go b/core/services/pipeline/task.coalesce_test.go index 6884adfe2be..ec4b4373720 100644 --- a/core/services/pipeline/task.coalesce_test.go +++ b/core/services/pipeline/task.coalesce_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -15,6 +16,7 @@ import ( func TestCoalesceTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.conditional_test.go b/core/services/pipeline/task.conditional_test.go index 162fadfa736..9acaa0ac9f2 100644 --- a/core/services/pipeline/task.conditional_test.go +++ b/core/services/pipeline/task.conditional_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -13,6 +14,7 @@ import ( func TestConditionalTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.divide_test.go b/core/services/pipeline/task.divide_test.go index 648f2c84b70..b482ca5b198 100644 --- a/core/services/pipeline/task.divide_test.go +++ b/core/services/pipeline/task.divide_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" bridgesMocks "github.com/smartcontractkit/chainlink/v2/core/bridges/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -22,6 +23,7 @@ import ( func TestDivideTask_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -134,6 +136,7 @@ func TestDivideTask_Happy(t *testing.T) { func TestDivideTask_Unhappy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -175,6 +178,7 @@ func TestDivideTask_Unhappy(t *testing.T) { func TestDivideTask_Overflow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") d1, err := decimal.NewFromString("6.34e-01") assert.NoError(t, err) @@ -201,6 +205,7 @@ func TestDivideTask_Overflow(t *testing.T) { func TestDivide_Example(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") dag := ` ds1 [type=memo value=10000.1234]; diff --git a/core/services/pipeline/task.eth_abi_decode_log_test.go b/core/services/pipeline/task.eth_abi_decode_log_test.go index a20125550db..990aeac5cd8 100644 --- a/core/services/pipeline/task.eth_abi_decode_log_test.go +++ b/core/services/pipeline/task.eth_abi_decode_log_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -17,6 +18,7 @@ import ( ) func TestETHABIDecodeLogTask(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string abi string diff --git a/core/services/pipeline/task.eth_abi_encode_2_test.go b/core/services/pipeline/task.eth_abi_encode_2_test.go index c831e05f7eb..772502f1ed1 100644 --- a/core/services/pipeline/task.eth_abi_encode_2_test.go +++ b/core/services/pipeline/task.eth_abi_encode_2_test.go @@ -9,12 +9,14 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestETHABIEncodeTask2(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var bytes32 [32]byte copy(bytes32[:], []byte("chainlink chainlink chainlink")) diff --git a/core/services/pipeline/task.eth_abi_encode_test.go b/core/services/pipeline/task.eth_abi_encode_test.go index a24c3d251b8..3b5f7382743 100644 --- a/core/services/pipeline/task.eth_abi_encode_test.go +++ b/core/services/pipeline/task.eth_abi_encode_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -17,6 +18,7 @@ import ( ) func TestETHABIEncodeTask(t *testing.T) { + tests.BelongsToCISuite(t, "unit") var bytes32 [32]byte copy(bytes32[:], []byte("chainlink chainlink chainlink")) @@ -241,6 +243,7 @@ func TestETHABIEncodeTask(t *testing.T) { } func TestETHABIEncode_EncodeIntegers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string abi string @@ -531,6 +534,7 @@ func TestETHABIEncode_EncodeIntegers(t *testing.T) { } func TestETHABIEncode_EncodeIntegers_Overflow(t *testing.T) { + tests.BelongsToCISuite(t, "unit") testCases := []struct { name string abi string diff --git a/core/services/pipeline/task.eth_tx_test.go b/core/services/pipeline/task.eth_tx_test.go index ad7093436db..beb7f42367e 100644 --- a/core/services/pipeline/task.eth_tx_test.go +++ b/core/services/pipeline/task.eth_tx_test.go @@ -11,6 +11,7 @@ import ( "gopkg.in/guregu/null.v4" clnull "github.com/smartcontractkit/chainlink-common/pkg/utils/null" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" txmgrcommon "github.com/smartcontractkit/chainlink-framework/chains/txmgr" @@ -27,6 +28,7 @@ import ( ) func TestETHTxTask(t *testing.T) { + tests.BelongsToCISuite(t, "with-db") jid := int32(321) reqID := common.HexToHash("0x5198616554d738d9485d1a7cf53b2f33e09c3bbc8fe9ac0020bd672cd2bc15d2") reqTxHash := common.HexToHash("0xc524fafafcaec40652b1f84fca09c231185437d008d195fccf2f51e64b7062f8") diff --git a/core/services/pipeline/task.hexdecode_test.go b/core/services/pipeline/task.hexdecode_test.go index 258d86364d0..6277b6b3119 100644 --- a/core/services/pipeline/task.hexdecode_test.go +++ b/core/services/pipeline/task.hexdecode_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -13,6 +14,7 @@ import ( func TestHexDecodeTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.hexencode_test.go b/core/services/pipeline/task.hexencode_test.go index baeff02e304..800c183aa92 100644 --- a/core/services/pipeline/task.hexencode_test.go +++ b/core/services/pipeline/task.hexencode_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -15,6 +16,7 @@ import ( func TestHexEncodeTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") bigTwo, bigThree := big.NewInt(2), big.NewInt(3) tests := []struct { @@ -93,6 +95,7 @@ func TestHexEncodeTask(t *testing.T) { func TestHexEncodeTaskInputParamLiteral(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/services/pipeline/task.http_test.go b/core/services/pipeline/task.http_test.go index 5de29184da5..7c226ea5611 100644 --- a/core/services/pipeline/task.http_test.go +++ b/core/services/pipeline/task.http_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" clhttptest "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/httptest" @@ -35,6 +36,7 @@ import ( func TestHTTPTask_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := configtest.NewTestGeneralConfig(t) s1 := httptest.NewServer(fakePriceResponder(t, utils.MustUnmarshalToMap(btcUSDPairing), decimal.NewFromInt(9700), "", nil)) @@ -66,6 +68,7 @@ func TestHTTPTask_Happy(t *testing.T) { func TestHTTPTask_Variables(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") validMeta := map[string]any{"theMeta": "yes"} @@ -207,6 +210,7 @@ func TestHTTPTask_Variables(t *testing.T) { func TestHTTPTask_OverrideURLSafe(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := configtest.NewTestGeneralConfig(t) handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -254,6 +258,7 @@ func TestHTTPTask_OverrideURLSafe(t *testing.T) { func TestHTTPTask_ErrorMessage(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := configtest.NewTestGeneralConfig(t) handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -287,6 +292,7 @@ func TestHTTPTask_ErrorMessage(t *testing.T) { func TestHTTPTask_OnlyErrorMessage(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") config := configtest.NewTestGeneralConfig(t) handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -316,6 +322,7 @@ func TestHTTPTask_OnlyErrorMessage(t *testing.T) { } func TestHTTPTask_Headers(t *testing.T) { + tests.BelongsToCISuite(t, "unit") allHeaders := func(headers http.Header) (s []string) { var keys []string for k := range headers { diff --git a/core/services/pipeline/task.jsonparse_test.go b/core/services/pipeline/task.jsonparse_test.go index 7be1506e2b2..76498e325ea 100644 --- a/core/services/pipeline/task.jsonparse_test.go +++ b/core/services/pipeline/task.jsonparse_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestJSONParseTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.length_test.go b/core/services/pipeline/task.length_test.go index ac5b2665bcf..80d475b6001 100644 --- a/core/services/pipeline/task.length_test.go +++ b/core/services/pipeline/task.length_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestLengthTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.lessthan_test.go b/core/services/pipeline/task.lessthan_test.go index a6b5ad94868..97e19dbd0c1 100644 --- a/core/services/pipeline/task.lessthan_test.go +++ b/core/services/pipeline/task.lessthan_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestLessThanTask_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -104,6 +106,7 @@ func TestLessThanTask_Happy(t *testing.T) { func TestLessThanTask_Unhappy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.lookup_test.go b/core/services/pipeline/task.lookup_test.go index c7f39b9726d..9c0f390079f 100644 --- a/core/services/pipeline/task.lookup_test.go +++ b/core/services/pipeline/task.lookup_test.go @@ -6,12 +6,14 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func Test_LookupTask(t *testing.T) { + tests.BelongsToCISuite(t, "unit") task := pipeline.LookupTask{} m := map[string]any{ "foo": 42, diff --git a/core/services/pipeline/task.lowercase_test.go b/core/services/pipeline/task.lowercase_test.go index 64bfd81489e..d1b99939674 100644 --- a/core/services/pipeline/task.lowercase_test.go +++ b/core/services/pipeline/task.lowercase_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestLowercaseTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.max_test.go b/core/services/pipeline/task.max_test.go index fd25eaab705..d93bd8973db 100644 --- a/core/services/pipeline/task.max_test.go +++ b/core/services/pipeline/task.max_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -16,6 +17,7 @@ import ( func TestMaxTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.mean_test.go b/core/services/pipeline/task.mean_test.go index e1444c8a24c..e5f4725bab5 100644 --- a/core/services/pipeline/task.mean_test.go +++ b/core/services/pipeline/task.mean_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -15,6 +16,7 @@ import ( func TestMeanTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.median_test.go b/core/services/pipeline/task.median_test.go index 4c6cd37e2ad..860d96f41c4 100644 --- a/core/services/pipeline/task.median_test.go +++ b/core/services/pipeline/task.median_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -15,6 +16,7 @@ import ( func TestMedianTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -253,6 +255,7 @@ func TestMedianTask(t *testing.T) { func TestMedianTask_AllowedFaultsAndLax_Unmarshal(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") p, err := pipeline.Parse(` // data source 1 diff --git a/core/services/pipeline/task.memo_test.go b/core/services/pipeline/task.memo_test.go index 303e4261179..2c2161430db 100644 --- a/core/services/pipeline/task.memo_test.go +++ b/core/services/pipeline/task.memo_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -13,6 +14,7 @@ import ( func TestMemoTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.merge_test.go b/core/services/pipeline/task.merge_test.go index 22a465757e8..d905400a97b 100644 --- a/core/services/pipeline/task.merge_test.go +++ b/core/services/pipeline/task.merge_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestMergeTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.min_test.go b/core/services/pipeline/task.min_test.go index 227e5bcd3a7..3a4bf79c45c 100644 --- a/core/services/pipeline/task.min_test.go +++ b/core/services/pipeline/task.min_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -16,6 +17,7 @@ import ( func TestMinTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.mode_test.go b/core/services/pipeline/task.mode_test.go index 2241738bcaa..8a0bde64a1e 100644 --- a/core/services/pipeline/task.mode_test.go +++ b/core/services/pipeline/task.mode_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -16,6 +17,7 @@ import ( func TestModeTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.multiply_test.go b/core/services/pipeline/task.multiply_test.go index 604771fdbb1..b4de59924c0 100644 --- a/core/services/pipeline/task.multiply_test.go +++ b/core/services/pipeline/task.multiply_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -22,6 +23,7 @@ func mustDecimal(t *testing.T, arg string) *decimal.Decimal { func TestMultiplyTask_Happy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -148,6 +150,7 @@ func TestMultiplyTask_Happy(t *testing.T) { func TestMultiplyTask_Unhappy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -186,6 +189,7 @@ func TestMultiplyTask_Unhappy(t *testing.T) { func TestMultiplyTask_Overflow(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") d1, err := decimal.NewFromString("6.34e-1147483647") assert.NoError(t, err) diff --git a/core/services/pipeline/task.sum_test.go b/core/services/pipeline/task.sum_test.go index 043894cccff..3ae2dc4db42 100644 --- a/core/services/pipeline/task.sum_test.go +++ b/core/services/pipeline/task.sum_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -15,6 +16,7 @@ import ( func TestSumTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string diff --git a/core/services/pipeline/task.uppercase_test.go b/core/services/pipeline/task.uppercase_test.go index ddba922d8a5..99f95a9871b 100644 --- a/core/services/pipeline/task.uppercase_test.go +++ b/core/services/pipeline/task.uppercase_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -14,6 +15,7 @@ import ( func TestUppercaseTask(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string diff --git a/core/services/pipeline/task_object_params_test.go b/core/services/pipeline/task_object_params_test.go index a05147f90da..37a2cc1743b 100644 --- a/core/services/pipeline/task_object_params_test.go +++ b/core/services/pipeline/task_object_params_test.go @@ -8,11 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestObjectParam_UnmarshalPipelineParamValid(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") decimalValue := decimal.New(173, -1) @@ -72,6 +74,7 @@ func TestObjectParam_UnmarshalPipelineParamValid(t *testing.T) { } func TestObjectParam_Marshal(t *testing.T) { + tests.BelongsToCISuite(t, "unit") tests := []struct { name string input *pipeline.ObjectParam diff --git a/core/services/pipeline/task_params_test.go b/core/services/pipeline/task_params_test.go index 71ca8d6f2cc..000bf79a8f2 100644 --- a/core/services/pipeline/task_params_test.go +++ b/core/services/pipeline/task_params_test.go @@ -13,12 +13,14 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/mocks" ) func TestStringParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var nilObjectParam *pipeline.ObjectParam @@ -51,6 +53,7 @@ func TestStringParam_UnmarshalPipelineParam(t *testing.T) { func TestStringSliceParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") expected := pipeline.StringSliceParam{"foo", "bar", "baz"} @@ -86,6 +89,7 @@ func TestStringSliceParam_UnmarshalPipelineParam(t *testing.T) { func TestBytesParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -114,6 +118,7 @@ func TestBytesParam_UnmarshalPipelineParam(t *testing.T) { func TestAddressParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var addr pipeline.AddressParam copy(addr[:], []byte("deadbeefdeadbeefdead")) @@ -160,6 +165,7 @@ func TestAddressParam_UnmarshalPipelineParam(t *testing.T) { func TestAddressSliceParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") addr1 := common.HexToAddress("0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef") addr2 := common.HexToAddress("0xcafebabecafebabecafebabecafebabecafebabe") @@ -196,6 +202,7 @@ func TestAddressSliceParam_UnmarshalPipelineParam(t *testing.T) { func TestUint64Param_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -241,6 +248,7 @@ func TestUint64Param_UnmarshalPipelineParam(t *testing.T) { func TestMaybeUint64Param_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -287,6 +295,7 @@ func TestMaybeUint64Param_UnmarshalPipelineParam(t *testing.T) { func TestMaybeBigIntParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") fromInt := func(n int64) pipeline.MaybeBigIntParam { return pipeline.NewMaybeBigIntParam(big.NewInt(n)) @@ -342,6 +351,7 @@ func TestMaybeBigIntParam_UnmarshalPipelineParam(t *testing.T) { func TestMaybeInt32Param_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") tests := []struct { name string @@ -382,6 +392,7 @@ func TestMaybeInt32Param_UnmarshalPipelineParam(t *testing.T) { func TestBoolParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -410,6 +421,7 @@ func TestBoolParam_UnmarshalPipelineParam(t *testing.T) { func TestDecimalParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var nilObjectParam *pipeline.ObjectParam d := decimal.NewFromFloat(123.45) @@ -444,6 +456,7 @@ func TestDecimalParam_UnmarshalPipelineParam(t *testing.T) { func TestURLParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") good, err := url.ParseRequestURI("https://chain.link/foo?bar=sergey") require.NoError(t, err) @@ -471,6 +484,7 @@ func TestURLParam_UnmarshalPipelineParam(t *testing.T) { func TestMapParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") var nilObjectParam *pipeline.ObjectParam @@ -533,6 +547,7 @@ func TestMapParam_UnmarshalPipelineParam(t *testing.T) { func TestSliceParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") tests := []struct { name string @@ -559,6 +574,7 @@ func TestSliceParam_UnmarshalPipelineParam(t *testing.T) { func TestHashSliceParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") hash1 := common.HexToHash("0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef") hash2 := common.HexToHash("0xcafebabecafebabecafebabecafebabecafebabedeadbeefdeadbeefdeadbeef") @@ -594,6 +610,7 @@ func TestHashSliceParam_UnmarshalPipelineParam(t *testing.T) { func TestSliceParam_FilterErrors(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") s := pipeline.SliceParam{"foo", errors.New("bar"), "baz"} vals, n := s.FilterErrors() @@ -603,6 +620,7 @@ func TestSliceParam_FilterErrors(t *testing.T) { func TestSliceParam_FilterNils(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testErr := errors.New("bar") s := pipeline.SliceParam{"foo", testErr, nil, "baz", nil} vals, n := s.FilterNils() @@ -612,6 +630,7 @@ func TestSliceParam_FilterNils(t *testing.T) { func TestDecimalSliceParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "with-db") expected := pipeline.DecimalSliceParam{*mustDecimal(t, "1.1"), *mustDecimal(t, "2.2"), *mustDecimal(t, "3.3")} decimalsSlice := []decimal.Decimal{*mustDecimal(t, "1.1"), *mustDecimal(t, "2.2"), *mustDecimal(t, "3.3")} @@ -643,6 +662,7 @@ func TestDecimalSliceParam_UnmarshalPipelineParam(t *testing.T) { func TestJSONPathParam_UnmarshalPipelineParam(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") expected := pipeline.JSONPathParam{"1.1", "2.2", "3.3", "sergey"} @@ -671,6 +691,7 @@ func TestJSONPathParam_UnmarshalPipelineParam(t *testing.T) { func TestResolveValue(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("calls getters in order until the first one that returns without ErrParameterEmpty", func(t *testing.T) { param := mocks.NewPipelineParamUnmarshaler(t) diff --git a/core/services/pipeline/variables_test.go b/core/services/pipeline/variables_test.go index fad23d38383..24d37f68d55 100644 --- a/core/services/pipeline/variables_test.go +++ b/core/services/pipeline/variables_test.go @@ -6,11 +6,13 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) func TestVars_Set(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") vars := pipeline.NewVarsFrom(nil) @@ -29,6 +31,7 @@ func TestVars_Set(t *testing.T) { func TestVars_Get(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") t.Run("gets the values at keypaths that exist", func(t *testing.T) { vars := pipeline.NewVarsFrom(map[string]any{ @@ -125,6 +128,7 @@ func TestVars_Get(t *testing.T) { func TestVars_Copy(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") vars := pipeline.NewVarsFrom(map[string]any{ "nested": map[string]any{ diff --git a/core/services/relay/evm/mercury/queue_test.go b/core/services/relay/evm/mercury/queue_test.go index 491d976325a..4b5689a3e3b 100644 --- a/core/services/relay/evm/mercury/queue_test.go +++ b/core/services/relay/evm/mercury/queue_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" ) @@ -62,6 +63,7 @@ func createTestTransmissions(t *testing.T) []TestTransmissionWithReport { func Test_Queue(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "unit") testTransmissions := createTestTransmissions(t) deleter := mocks.NewAsyncDeleter(t) transmitQueue := NewTransmitQueue(logger.Test(t), sURL, "foo feed ID", 7, deleter) From c1932b4398a8a56259fc64da1861fc73854d9999 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 11:24:43 -0800 Subject: [PATCH 25/30] fix: test line numbers --- core/logger/test_logger_test.go | 4 ++-- core/logger/zap_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/logger/test_logger_test.go b/core/logger/test_logger_test.go index f4e252a7cad..5dea8fa20b9 100644 --- a/core/logger/test_logger_test.go +++ b/core/logger/test_logger_test.go @@ -17,7 +17,7 @@ func init() { } func TestTestLogger(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "unit") lgr, observed := TestLoggerObserved(t, zapcore.DebugLevel) const ( @@ -51,7 +51,7 @@ func TestTestLogger(t *testing.T) { assert.Equal(t, serviceName, log.LoggerName) assert.Equal(t, value, log.ContextMap()[key]) assert.Contains(t, log.Caller.String(), "core/logger/test_logger_test.go") - assert.Equal(t, 41, log.Caller.Line) + assert.Equal(t, 44, log.Caller.Line) const ( workerName = "WorkerName" diff --git a/core/logger/zap_test.go b/core/logger/zap_test.go index 50566987a5c..381538d3fdf 100644 --- a/core/logger/zap_test.go +++ b/core/logger/zap_test.go @@ -210,7 +210,7 @@ func TestZapLogger_OutOfDiskSpace(t *testing.T) { } func TestZapLogger_LogCaller(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "unit") maxSize := utils.FileSize(5 * utils.MB) logsDir := t.TempDir() @@ -259,7 +259,7 @@ func TestZapLogger_LogCaller(t *testing.T) { logs := string(b) lines := strings.Split(logs, "\n") - require.Contains(t, lines[0], "logger/zap_test.go:246") + require.Contains(t, lines[0], "logger/zap_test.go:250") } func TestZapLogger_Name(t *testing.T) { From 0ed61f5ee5ca8c71d6a60056058e7c8eaeabd9f1 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 11:49:19 -0800 Subject: [PATCH 26/30] fix: goimports --- core/bridges/bridge_type_test.go | 1 + core/bridges/external_initiator_test.go | 1 + core/capabilities/ccip/launcher/launcher_test.go | 2 +- core/services/blockhashstore/delegate_test.go | 2 +- core/services/job/job_pipeline_orm_integration_test.go | 2 +- core/services/job/models_test.go | 3 ++- core/services/keeper/registry1_3_synchronizer_test.go | 2 +- core/services/keystore/dkgrecipient_test.go | 2 +- core/services/llo/mercurytransmitter/queue_test.go | 2 +- core/services/ocr2/plugins/s4/messages_test.go | 1 + core/services/ocr2/plugins/s4/plugin_test.go | 3 ++- core/services/ocr2/plugins/vault/transmitter_test.go | 2 +- core/services/pipeline/runner_test.go | 2 +- core/services/relay/evm/chain_reader_test.go | 2 +- core/services/relay/evm/evm_service_test.go | 2 +- .../relay/evm/mercury/offchain_config_digester_test.go | 3 ++- core/services/s4/envelope_test.go | 3 ++- core/services/s4/in_memory_orm_test.go | 3 ++- core/services/s4/postgres_orm_test.go | 3 ++- core/services/s4/storage_test.go | 3 ++- core/services/vrf/v2/bhs_feeder_test.go | 2 +- core/services/vrf/v2/integration_v2_reverted_txns_test.go | 2 +- core/services/vrf/v2/listener_v2_helpers_test.go | 2 +- core/services/vrf/v2/listener_v2_types_test.go | 2 +- core/services/webhook/validate_test.go | 2 +- core/services/workflows/artifacts/store_test.go | 3 ++- core/services/workflows/artifacts/v2/store_test.go | 3 ++- core/services/workflows/syncer/workflow_registry_test.go | 2 +- 28 files changed, 37 insertions(+), 25 deletions(-) diff --git a/core/bridges/bridge_type_test.go b/core/bridges/bridge_type_test.go index a1dfa030410..7d453f9530c 100644 --- a/core/bridges/bridge_type_test.go +++ b/core/bridges/bridge_type_test.go @@ -17,6 +17,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) diff --git a/core/bridges/external_initiator_test.go b/core/bridges/external_initiator_test.go index f2818b3ba41..d809683cc4c 100644 --- a/core/bridges/external_initiator_test.go +++ b/core/bridges/external_initiator_test.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/stretchr/testify/assert" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) diff --git a/core/capabilities/ccip/launcher/launcher_test.go b/core/capabilities/ccip/launcher/launcher_test.go index e13b12b850e..28d4faa5e66 100644 --- a/core/capabilities/ccip/launcher/launcher_test.go +++ b/core/capabilities/ccip/launcher/launcher_test.go @@ -14,13 +14,13 @@ import ( ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/utils" cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_createDON(t *testing.T) { diff --git a/core/services/blockhashstore/delegate_test.go b/core/services/blockhashstore/delegate_test.go index 6e43d6c4bbd..1dafd487991 100644 --- a/core/services/blockhashstore/delegate_test.go +++ b/core/services/blockhashstore/delegate_test.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest/observer" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink-evm/pkg/logpoller" @@ -27,7 +28,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestDelegate_JobType(t *testing.T) { diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go index 32912f4698e..781ea0f92fc 100644 --- a/core/services/job/job_pipeline_orm_integration_test.go +++ b/core/services/job/job_pipeline_orm_integration_test.go @@ -12,6 +12,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -22,7 +23,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func clearJobsDb(t *testing.T, db *sqlx.DB) { diff --git a/core/services/job/models_test.go b/core/services/job/models_test.go index ce45246cd8d..9aa637bb007 100644 --- a/core/services/job/models_test.go +++ b/core/services/job/models_test.go @@ -9,6 +9,8 @@ import ( "github.com/pelletier/go-toml/v2" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -18,7 +20,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/relay" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" diff --git a/core/services/keeper/registry1_3_synchronizer_test.go b/core/services/keeper/registry1_3_synchronizer_test.go index e7f1c3dd268..b897865767a 100644 --- a/core/services/keeper/registry1_3_synchronizer_test.go +++ b/core/services/keeper/registry1_3_synchronizer_test.go @@ -690,7 +690,7 @@ func Test_RegistrySynchronizer1_3_UpkeepPausedLog_UpkeepUnpausedLog(t *testing.T func Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog(t *testing.T) { tests.BelongsToCISuite(t, "with-db") - + ctx := testutils.Context(t) g := gomega.NewWithT(t) db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) diff --git a/core/services/keystore/dkgrecipient_test.go b/core/services/keystore/dkgrecipient_test.go index 690a1d94a16..a6723437c91 100644 --- a/core/services/keystore/dkgrecipient_test.go +++ b/core/services/keystore/dkgrecipient_test.go @@ -9,12 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgrecipientkey" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_DKGRecipientKeyStore_E2E(t *testing.T) { diff --git a/core/services/llo/mercurytransmitter/queue_test.go b/core/services/llo/mercurytransmitter/queue_test.go index c48250aeed3..4b8197d3315 100644 --- a/core/services/llo/mercurytransmitter/queue_test.go +++ b/core/services/llo/mercurytransmitter/queue_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var _ asyncDeleter = &mockAsyncDeleter{} diff --git a/core/services/ocr2/plugins/s4/messages_test.go b/core/services/ocr2/plugins/s4/messages_test.go index df65571c4eb..2bad68eedea 100644 --- a/core/services/ocr2/plugins/s4/messages_test.go +++ b/core/services/ocr2/plugins/s4/messages_test.go @@ -12,6 +12,7 @@ import ( s4_svc "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) diff --git a/core/services/ocr2/plugins/s4/plugin_test.go b/core/services/ocr2/plugins/s4/plugin_test.go index 5e34e783933..338bc8471b4 100644 --- a/core/services/ocr2/plugins/s4/plugin_test.go +++ b/core/services/ocr2/plugins/s4/plugin_test.go @@ -20,8 +20,9 @@ import ( "github.com/stretchr/testify/mock" "google.golang.org/protobuf/proto" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func createPluginConfig(maxEntries uint) *s4.PluginConfig { diff --git a/core/services/ocr2/plugins/vault/transmitter_test.go b/core/services/ocr2/plugins/vault/transmitter_test.go index 2e6881b344d..f196c65b0f5 100644 --- a/core/services/ocr2/plugins/vault/transmitter_test.go +++ b/core/services/ocr2/plugins/vault/transmitter_test.go @@ -15,9 +15,9 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/actions/vault" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/requests" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities/vault/vaulttypes" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestTransmitter(t *testing.T) { diff --git a/core/services/pipeline/runner_test.go b/core/services/pipeline/runner_test.go index 51302993459..86bd91aac80 100644 --- a/core/services/pipeline/runner_test.go +++ b/core/services/pipeline/runner_test.go @@ -396,7 +396,7 @@ decode_log -> decode_cbor; func Test_PipelineRunner_CBORParse(t *testing.T) { tests.BelongsToCISuite(t, "with-db") - + db := pgtest.NewSqlxDB(t) cfg := configtest.NewTestGeneralConfig(t) btORM := bridgesMocks.NewORM(t) diff --git a/core/services/relay/evm/chain_reader_test.go b/core/services/relay/evm/chain_reader_test.go index da48b68f53e..c7c6137d525 100644 --- a/core/services/relay/evm/chain_reader_test.go +++ b/core/services/relay/evm/chain_reader_test.go @@ -27,9 +27,9 @@ import ( evmtypes "github.com/smartcontractkit/chainlink-evm/pkg/types" "github.com/smartcontractkit/chainlink-protos/cre/go/values" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestChainReaderSizedBigIntTypes(t *testing.T) { diff --git a/core/services/relay/evm/evm_service_test.go b/core/services/relay/evm/evm_service_test.go index 8c84e707016..d9d7626cf17 100644 --- a/core/services/relay/evm/evm_service_test.go +++ b/core/services/relay/evm/evm_service_test.go @@ -19,6 +19,7 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/chains/evm" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/client/clienttest" configmocks "github.com/smartcontractkit/chainlink-evm/pkg/config/mocks" "github.com/smartcontractkit/chainlink-evm/pkg/heads/headstest" @@ -28,7 +29,6 @@ import ( evmmocks "github.com/smartcontractkit/chainlink/v2/common/chains/mocks" lpmocks "github.com/smartcontractkit/chainlink/v2/common/logpoller/mocks" txmmocks "github.com/smartcontractkit/chainlink/v2/common/txmgr/mocks" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) const ExpectedTxHash = "0xabcd" diff --git a/core/services/relay/evm/mercury/offchain_config_digester_test.go b/core/services/relay/evm/mercury/offchain_config_digester_test.go index 22dcbda3252..268cb4d00a9 100644 --- a/core/services/relay/evm/mercury/offchain_config_digester_test.go +++ b/core/services/relay/evm/mercury/offchain_config_digester_test.go @@ -7,8 +7,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_OffchainConfigDigester_ConfigDigest(t *testing.T) { diff --git a/core/services/s4/envelope_test.go b/core/services/s4/envelope_test.go index 269c0b221e9..364da41fdf2 100644 --- a/core/services/s4/envelope_test.go +++ b/core/services/s4/envelope_test.go @@ -10,8 +10,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/ethereum/go-ethereum/crypto" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestEnvelope(t *testing.T) { diff --git a/core/services/s4/in_memory_orm_test.go b/core/services/s4/in_memory_orm_test.go index aa574e8e3ff..d5c55081f07 100644 --- a/core/services/s4/in_memory_orm_test.go +++ b/core/services/s4/in_memory_orm_test.go @@ -9,8 +9,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestInMemoryORM(t *testing.T) { diff --git a/core/services/s4/postgres_orm_test.go b/core/services/s4/postgres_orm_test.go index 0eb0c775982..3f93510cf5c 100644 --- a/core/services/s4/postgres_orm_test.go +++ b/core/services/s4/postgres_orm_test.go @@ -12,8 +12,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/s4" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func setupORM(t *testing.T, namespace string) s4.ORM { diff --git a/core/services/s4/storage_test.go b/core/services/s4/storage_test.go index a32f8b1dcb6..03b251ae92e 100644 --- a/core/services/s4/storage_test.go +++ b/core/services/s4/storage_test.go @@ -12,10 +12,11 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/s4" "github.com/smartcontractkit/chainlink/v2/core/services/s4/mocks" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var ( diff --git a/core/services/vrf/v2/bhs_feeder_test.go b/core/services/vrf/v2/bhs_feeder_test.go index 0431d632082..a6764a3efb7 100644 --- a/core/services/vrf/v2/bhs_feeder_test.go +++ b/core/services/vrf/v2/bhs_feeder_test.go @@ -9,6 +9,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/config/toml" "github.com/smartcontractkit/chainlink-evm/pkg/types" @@ -17,7 +18,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrftesthelpers" "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestStartHeartbeats(t *testing.T) { diff --git a/core/services/vrf/v2/integration_v2_reverted_txns_test.go b/core/services/vrf/v2/integration_v2_reverted_txns_test.go index e63d32fd362..539c8687101 100644 --- a/core/services/vrf/v2/integration_v2_reverted_txns_test.go +++ b/core/services/vrf/v2/integration_v2_reverted_txns_test.go @@ -16,6 +16,7 @@ import ( "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/batch_vrf_coordinator_v2" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/vrf_coordinator_v2" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/vrf_external_sub_owner_example" @@ -37,7 +38,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/testdata/testspecs" "github.com/smartcontractkit/chainlink/v2/core/utils" "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) var ( diff --git a/core/services/vrf/v2/listener_v2_helpers_test.go b/core/services/vrf/v2/listener_v2_helpers_test.go index d0cc5789234..b3ec9434f17 100644 --- a/core/services/vrf/v2/listener_v2_helpers_test.go +++ b/core/services/vrf/v2/listener_v2_helpers_test.go @@ -6,11 +6,11 @@ import ( "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/pkg/assets" "github.com/smartcontractkit/chainlink-evm/pkg/txmgr" v2 "github.com/smartcontractkit/chainlink/v2/core/services/vrf/v2" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestListener_EstimateFeeJuels(t *testing.T) { diff --git a/core/services/vrf/v2/listener_v2_types_test.go b/core/services/vrf/v2/listener_v2_types_test.go index bacc354cd45..ca13bd6b6e9 100644 --- a/core/services/vrf/v2/listener_v2_types_test.go +++ b/core/services/vrf/v2/listener_v2_types_test.go @@ -8,12 +8,12 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/vrf_coordinator_v2" "github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/vrf_coordinator_v2_5" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_BatchFulfillments_AddRun(t *testing.T) { diff --git a/core/services/webhook/validate_test.go b/core/services/webhook/validate_test.go index aa72e913b90..aad26d8dd27 100644 --- a/core/services/webhook/validate_test.go +++ b/core/services/webhook/validate_test.go @@ -9,12 +9,12 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/webhook" webhookmocks "github.com/smartcontractkit/chainlink/v2/core/services/webhook/mocks" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func TestValidatedWebJobSpec(t *testing.T) { diff --git a/core/services/workflows/artifacts/store_test.go b/core/services/workflows/artifacts/store_test.go index 2c2775de956..efaecebde70 100644 --- a/core/services/workflows/artifacts/store_test.go +++ b/core/services/workflows/artifacts/store_test.go @@ -22,9 +22,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) func Test_Handler_SecretsFor(t *testing.T) { diff --git a/core/services/workflows/artifacts/v2/store_test.go b/core/services/workflows/artifacts/v2/store_test.go index 5f38b1a38a8..f8d6d8c5c8c 100644 --- a/core/services/workflows/artifacts/v2/store_test.go +++ b/core/services/workflows/artifacts/v2/store_test.go @@ -22,8 +22,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type mockFetchResp struct { diff --git a/core/services/workflows/syncer/workflow_registry_test.go b/core/services/workflows/syncer/workflow_registry_test.go index ebd85ad6249..09297ba89b3 100644 --- a/core/services/workflows/syncer/workflow_registry_test.go +++ b/core/services/workflows/syncer/workflow_registry_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" ) type mockService struct{} From d9d2cc0b22c31d87b51a4cd58eefdac0d621ed28 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 12:45:31 -0800 Subject: [PATCH 27/30] test: integration-tagged tests --- .github/workflows/ci-core.yml | 10 +++--- ...-integration.yml => ci-extended-tests.yml} | 31 +++++++++++++++++-- core/cmd/chains_commands_integration_test.go | 2 ++ core/cmd/node_commands_integration_test.go | 3 ++ core/cmd/solana_transaction_commands_test.go | 2 +- .../ocr2/plugins/features_ocr2_plugin_test.go | 2 ++ .../mercury/integration_plugin_test.go | 5 +++ .../web/chains_controller_integration_test.go | 3 ++ main_test.go | 3 +- tools/bin/go_core_ccip_deployment_tests | 4 +++ tools/bin/go_core_tests | 4 +++ 11 files changed, 58 insertions(+), 11 deletions(-) rename .github/workflows/{ci-integration.yml => ci-extended-tests.yml} (86%) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 5e56bdba02f..65e4706bca9 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -207,12 +207,10 @@ jobs: test-suite: "unit" # trunk-auto-quarantine: "true" - # - cmd: go_core_tests_integration - # os: ${{ needs.runner-config.outputs.core-tests-integration-runner }} - # should-run: ${{ needs.filter.outputs.should-run-core-tests }} - # trunk-auto-quarantine: "true" - # setup-solana: "true" - # install-loopps: "true" + # migrated to ci-integration.yml workflow + - cmd: go_core_tests_integration + os: ubuntu-latest + should-run: false - cmd: go_core_fuzz os: ${{ needs.runner-config.outputs.core-fuzz-tests-runner }} diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-extended-tests.yml similarity index 86% rename from .github/workflows/ci-integration.yml rename to .github/workflows/ci-extended-tests.yml index 54ba71e7e44..f75d4ab9c72 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-extended-tests.yml @@ -1,5 +1,4 @@ -name: CI Core Integration -run-name: CI Core Integration +name: CI Extended Tests concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} @@ -16,7 +15,26 @@ on: jobs: - integration-tests: + identify-test-suites: + name: Identify Test Suites + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout the repo + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: Identify Test Suites + run: | + find . -name '*_test.go' -print0 \ + | xargs -0 grep -Pho 'tests\.BelongsToCISuite\s*\(\s*t\s*,\s*"\K[^"]*(?="\s*\))' \ + | sort \ + | uniq -c \ + | sort -nr + + extended-tests: name: "${{ matrix.type.module }} (${{matrix.type.test-suite}})" timeout-minutes: 20 runs-on: runs-on=${{ github.run_id }}-${{ strategy.job-index }}/${{ matrix.type.os }} @@ -43,6 +61,12 @@ jobs: cmd: go_core_tests os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + - module: Core + test-suite: "integration" + go-build-tags: "integration" + cmd: go_core_tests + os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + - module: Deployment cmd: go_core_ccip_deployment_tests test-suite: "solana" @@ -135,6 +159,7 @@ jobs: shell: bash env: CL_CURRENT_TEST_SUITE: ${{ matrix.type.test-suite }} + GO_BUILD_TAGS: ${{ matrix.type.go-build-tags }} CL_DATABASE_URL: ${{ env.DB_URL }} OUTPUT_FILE: ./output.txt PRODUCE_JUNIT_XML: "true" diff --git a/core/cmd/chains_commands_integration_test.go b/core/cmd/chains_commands_integration_test.go index 8427f483b3e..044b03569bf 100644 --- a/core/cmd/chains_commands_integration_test.go +++ b/core/cmd/chains_commands_integration_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" @@ -17,6 +18,7 @@ import ( func TestShell_IndexCosmosChains(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "integration") chainID := cosmostest.RandomChainID() chain := chainlink.RawConfig{ "ChainID": chainID, diff --git a/core/cmd/node_commands_integration_test.go b/core/cmd/node_commands_integration_test.go index 5e81319ae54..efe1e78baee 100644 --- a/core/cmd/node_commands_integration_test.go +++ b/core/cmd/node_commands_integration_test.go @@ -12,6 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" @@ -28,6 +29,7 @@ func cosmosStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltes func TestShell_IndexCosmosNodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "integration") chainID := cosmostest.RandomChainID() node := map[string]any{ "Name": ptr("second"), @@ -77,6 +79,7 @@ func starknetStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *clt func TestShell_IndexStarkNetNodes(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "integration") id := "starknet chain ID" node1 := map[string]any{ "Name": ptr("first"), diff --git a/core/cmd/solana_transaction_commands_test.go b/core/cmd/solana_transaction_commands_test.go index 4fe029a3302..86527a5e37b 100644 --- a/core/cmd/solana_transaction_commands_test.go +++ b/core/cmd/solana_transaction_commands_test.go @@ -26,7 +26,7 @@ import ( // TODO: move this test to `chainlink-solana` https://smartcontract-it.atlassian.net/browse/NONEVM-790 func TestShell_SolanaSendSol(t *testing.T) { - tests.BelongsToCISuite(t, "with-db") + tests.BelongsToCISuite(t, "integration") ctx := testutils.Context(t) chainID := "localnet" diff --git a/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go b/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go index 5e4ac601550..e4e5c598d77 100644 --- a/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go +++ b/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go @@ -11,6 +11,8 @@ import ( ) func TestIntegration_OCR2_plugins(t *testing.T) { + tests.BelongsToCISuite(t, "integration") + t.Setenv(string(env.MedianPlugin.Cmd), "chainlink-feeds") t.Setenv(string(env.EVMPlugin.Cmd), "chainlink-evm") ocr2.RunTestIntegrationOCR2(t) diff --git a/core/services/ocr2/plugins/mercury/integration_plugin_test.go b/core/services/ocr2/plugins/mercury/integration_plugin_test.go index 1a04d7d6652..f196cac4291 100644 --- a/core/services/ocr2/plugins/mercury/integration_plugin_test.go +++ b/core/services/ocr2/plugins/mercury/integration_plugin_test.go @@ -5,15 +5,20 @@ package mercury_test import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/config/env" ) func TestIntegration_MercuryV2_Plugin(t *testing.T) { + tests.BelongsToCISuite(t, "integration") + t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") integration_MercuryV2(t) } func TestIntegration_MercuryV3_Plugin(t *testing.T) { + tests.BelongsToCISuite(t, "integration") + t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") integration_MercuryV3(t) } diff --git a/core/web/chains_controller_integration_test.go b/core/web/chains_controller_integration_test.go index 6e80932e1c8..265fdc6e972 100644 --- a/core/web/chains_controller_integration_test.go +++ b/core/web/chains_controller_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/stretchr/testify/require" commonTypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" @@ -25,6 +26,7 @@ import ( func Test_CosmosChainsController_Show(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "integration") const validID = "Chainlink-12" @@ -132,6 +134,7 @@ TendermintURL = 'http://tender.mint' func Test_CosmosChainsController_Index(t *testing.T) { t.Parallel() + tests.BelongsToCISuite(t, "integration") chainA := chainlink.RawConfig{ "ChainID": "a" + cosmostest.RandomChainID(), diff --git a/main_test.go b/main_test.go index f8063b3edf9..64d9f053192 100644 --- a/main_test.go +++ b/main_test.go @@ -13,9 +13,10 @@ import ( "github.com/rogpeppe/go-internal/testscript" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/freeport" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink/v2/core" "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/static" diff --git a/tools/bin/go_core_ccip_deployment_tests b/tools/bin/go_core_ccip_deployment_tests index 9a3d61e8522..f8f2b96321a 100755 --- a/tools/bin/go_core_ccip_deployment_tests +++ b/tools/bin/go_core_ccip_deployment_tests @@ -5,6 +5,7 @@ set +e SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} JUNIT_FILE=${JUNIT_FILE:-"./junit.xml"} +GO_BUILD_TAGS=${GO_BUILD_TAGS:-""} GO_TEST_TIMEOUT=${GO_TEST_TIMEOUT:-"15m"} # Adjusting freeport port block size for tests. @@ -20,6 +21,9 @@ export PATH echo "Running go_core_ccip_deployment_tests for event: $GITHUB_EVENT_NAME" GO_TEST_FLAGS=( "-timeout=${GO_TEST_TIMEOUT}" ) +if [[ -n "$GO_BUILD_TAGS" ]]; then + GO_TEST_FLAGS+=( "-tags=${GO_BUILD_TAGS}" ) +fi if [[ "$GITHUB_EVENT_NAME" == 'push' ]]; then GO_TEST_FLAGS+=( "-count=1" ) diff --git a/tools/bin/go_core_tests b/tools/bin/go_core_tests index e29bda76bef..c196f87d405 100755 --- a/tools/bin/go_core_tests +++ b/tools/bin/go_core_tests @@ -5,6 +5,7 @@ set +e SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} JUNIT_FILE=${JUNIT_FILE:-"./junit.xml"} +GO_BUILD_TAGS=${GO_BUILD_TAGS:-""} GO_TEST_TIMEOUT=${GO_TEST_TIMEOUT:-"15m"} echo "Installing gotestsum..." @@ -15,6 +16,9 @@ export PATH echo "Running go_core_tests for event: $GITHUB_EVENT_NAME" GO_TEST_FLAGS=( "-timeout=${GO_TEST_TIMEOUT}" ) +if [[ -n "$GO_BUILD_TAGS" ]]; then + GO_TEST_FLAGS+=( "-tags=${GO_BUILD_TAGS}" ) +fi if [[ "$GITHUB_EVENT_NAME" == 'push' ]]; then GO_TEST_FLAGS+=( "-count=1" ) From 23dd84349e28f9bd5d9902075e6b7c83548997f8 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 13:08:38 -0800 Subject: [PATCH 28/30] more fixes --- .github/workflows/ci-extended-tests.yml | 19 ++++++++++++++----- .../ocr2/plugins/features_ocr2_plugin_test.go | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-extended-tests.yml b/.github/workflows/ci-extended-tests.yml index f75d4ab9c72..c8025977029 100644 --- a/.github/workflows/ci-extended-tests.yml +++ b/.github/workflows/ci-extended-tests.yml @@ -26,9 +26,17 @@ jobs: with: persist-credentials: false - - name: Identify Test Suites + - name: Identify Test Suites (core) run: | - find . -name '*_test.go' -print0 \ + find . -path './deployment' -prune -o -name '*_test.go' -print0 \ + | xargs -0 grep -Pho 'tests\.BelongsToCISuite\s*\(\s*t\s*,\s*"\K[^"]*(?="\s*\))' \ + | sort \ + | uniq -c \ + | sort -nr + + - name: Identify Test Suites (deployment) + run: | + find ./deployment -name '*_test.go' -print0 \ | xargs -0 grep -Pho 'tests\.BelongsToCISuite\s*\(\s*t\s*,\s*"\K[^"]*(?="\s*\))' \ | sort \ | uniq -c \ @@ -66,6 +74,7 @@ jobs: go-build-tags: "integration" cmd: go_core_tests os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache + setup-loopps: "true" - module: Deployment cmd: go_core_ccip_deployment_tests @@ -87,7 +96,7 @@ jobs: cmd: go_core_ccip_deployment_tests os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache go-mod-directory: "deployment/" - # setup-loopps: "true" + steps: - name: Enable S3 Cache for Self-Hosted Runners # these env vars are set (and exposed) when it is a self-hosted runner with extras=s3-cache @@ -95,14 +104,14 @@ jobs: uses: runs-on/action@66d4449b717b5462159659523d1241051ff470b9 # v1 - name: Checkout the repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: persist-credentials: false - name: Setup Go uses: ./.github/actions/setup-go with: - build-cache-version: ${{ matrix.type.cmd }} + build-cache-version: ${{ matrix.type.cmd }}-${{ matrix.type.test-suite }} go-version-file: ${{ matrix.type.go-mod-directory }}go.mod go-module-file: ${{ matrix.type.go-mod-directory }}go.sum diff --git a/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go b/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go index e4e5c598d77..3580c177129 100644 --- a/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go +++ b/core/internal/features/ocr2/plugins/features_ocr2_plugin_test.go @@ -6,6 +6,8 @@ package plugins import ( "testing" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/internal/features/ocr2" ) From b37857fbee7feacf93431edb9146fc6572bc9376 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 17:06:06 -0800 Subject: [PATCH 29/30] more fixes --- .github/workflows/ci-core.yml | 4 --- .github/workflows/ci-extended-tests.yml | 42 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 65e4706bca9..15149d1230e 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -73,8 +73,6 @@ jobs: # core-non-ignored - all changes except for paths which do not affect core module # - This is opt-in on purpose. To be safe, new files are assumed to have an affect on core unless listed here specifically. # - For example: core module does not depend on deployment or integration-tests module. - # all - changes in any directory - # - This is used resolve all affected modules based on changed files list-files: json filters: | core-non-ignored: @@ -93,8 +91,6 @@ jobs: - '!LICENSE' - '!.github/**' - '!core/scripts/cre/environment/examples/workflows/**' - all: - - '**' - name: Changed modules id: changed-modules diff --git a/.github/workflows/ci-extended-tests.yml b/.github/workflows/ci-extended-tests.yml index c8025977029..c1aabfa0bac 100644 --- a/.github/workflows/ci-extended-tests.yml +++ b/.github/workflows/ci-extended-tests.yml @@ -42,6 +42,47 @@ jobs: | uniq -c \ | sort -nr + changed-modules: + name: Detect Changes + permissions: + contents: read + pull-requests: read + runs-on: ubuntu-latest + outputs: + core-changes: ${{ contains(fromJson(steps.changed-modules.outputs.modules-json), '.') }} + deployment-changes: ${{ contains(fromJson(steps.changed-modules.outputs.modules-json), 'deployment') }} + steps: + - name: Checkout the repo + uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: Detect changed modules + id: changed-modules + uses: smartcontractkit/.github/actions/changed-modules-go@changed-modules-go/v1 + with: + file-patterns: | + ** + !.changeset/** + !**/*.Dockerfile + !tools/secrets/** + !tools/docker/** + !tools/benchmark/** + !**/README.md + !**/CHANGELOG.md + !*.nix + !sonar-project.properties + !nix.conf + !nix-darwin-shell-hook.sh + !LICENSE + !.github/** + !core/scripts/cre/environment/examples/workflows/** + module-patterns: | + ** + !core/scripts/** + !integration-tests/** + !system-tests/** + extended-tests: name: "${{ matrix.type.module }} (${{matrix.type.test-suite}})" timeout-minutes: 20 @@ -75,6 +116,7 @@ jobs: cmd: go_core_tests os: cpu=32/ram=64/family=c5ad/spot=false/image=ubuntu24-full-x64/extras=s3-cache setup-loopps: "true" + setup-solana: "true" - module: Deployment cmd: go_core_ccip_deployment_tests From 5e4de6e3a12b2db7697851f4fb3b4e7c20ffcf22 Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 12 Dec 2025 17:43:14 -0800 Subject: [PATCH 30/30] try graviton for unit tests --- .github/workflows/ci-core.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 15149d1230e..ccdaabd7950 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -548,10 +548,10 @@ jobs: runs-on: ubuntu-latest env: # include unique label (core/deployment/etc...) to ensure jobs are not competing for the same runner - SH_TEST_RUNNER: runs-on=${{ github.run_id }}-core/cpu=48/ram=96/family=c6i/spot=false/image=ubuntu24-full-x64/extras=s3-cache+tmpfs - SH_DEPLOYMENT_TEST_RUNNER: runs-on=${{ github.run_id }}-deployment/cpu=48/ram=96/family=c6id/spot=false/image=ubuntu24-full-x64/extras=s3-cache - SH_FUZZ_RUNNER: runs-on=${{ github.run_id}}-fuzz/cpu=8+16/ram=32+64/family=c6id+m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache - SH_RACE_TEST_RUNNER: runs-on=${{ github.run_id}}-race/cpu=64+128/ram=128+128/family=c7+m7/disk=large/spot=false/image=ubuntu24-full-x64/extras=s3-cache + SH_TEST_RUNNER: runs-on=${{ github.run_id }}-core/cpu=32/ram=64/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache + SH_DEPLOYMENT_TEST_RUNNER: runs-on=${{ github.run_id }}-deployment/cpu=32/ram=64/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache + SH_FUZZ_RUNNER: runs-on=${{ github.run_id}}-fuzz/cpu=8/ram=32/family=c6id+m6id+m6idn/spot=false/image=ubuntu24-full-x64/extras=s3-cache + SH_RACE_TEST_RUNNER: runs-on=${{ github.run_id}}-race/cpu=64/ram=128/family=c7g/spot=false/image=ubuntu24-full-arm64/extras=s3-cache+tmpfs SH_LINT_RUNNER: runs-on=${{ github.run_id }}-lint/cpu=16/ram=32/family=c6gd/spot=false/image=ubuntu24-full-arm64/extras=s3-cache GH_TEST_RUNNER: ubuntu22.04-32cores-128GB GH_FUZZ_RUNNER: ubuntu22.04-8cores-32GB