Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade ctf #522

Merged
merged 8 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/integration-tests-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ jobs:
run: | # https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md
cat << EOF > config.toml
[ChainlinkImage]
image="${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink"
version="starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}"
[Network]
selected_networks=["SIMULATED"]
Expand All @@ -187,7 +186,7 @@ jobs:
# shellcheck disable=SC2086
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Run Tests ${{ matrix.image.name }}
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@00c164251be2a7c5b2b23a6e5f7014982f232c14 # v2.3.31
with:
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
test_command_to_run: nix develop -c sh -c "make test=${{ matrix.image.test-name }} test-integration-smoke-ci"
Expand All @@ -200,3 +199,7 @@ jobs:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/smoke/logs
env:
KILLGRAVE_INTERNAL_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/friendsofgo/killgrave
CHAINLINK_IMAGE: ${{ env.CL_ECR }}
CHAINLINK_VERSION: starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}
6 changes: 5 additions & 1 deletion .github/workflows/integration-tests-soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
echo "::add-mask::$BASE64_CONFIG_OVERRIDE"
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> "$GITHUB_ENV"
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@00c164251be2a7c5b2b23a6e5f7014982f232c14 # v2.3.31
with:
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestOCRBasicSoak/embedded ./soak
Expand All @@ -80,4 +80,8 @@ jobs:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/soak/logs
env:
KILLGRAVE_INTERNAL_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/friendsofgo/killgrave
CHAINLINK_IMAGE: ${{ env.CL_ECR }}
CHAINLINK_VERSION: starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}

8 changes: 4 additions & 4 deletions integration-tests/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"github.com/stretchr/testify/require"
"gopkg.in/guregu/null.v4"

ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/config"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/environment"
"github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink"
mock_adapter "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/mock-adapter"
ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config"
"github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment"
"github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/pkg/helm/chainlink"
mock_adapter "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/pkg/helm/mock-adapter"
"github.com/smartcontractkit/chainlink/integration-tests/client"
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
"github.com/smartcontractkit/chainlink/v2/core/services/job"
Expand Down
15 changes: 9 additions & 6 deletions integration-tests/common/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import (
"fmt"
"math/big"
"net/http"
"os"
"testing"
"time"

test_env_ctf "github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env"

"github.com/NethermindEth/juno/core/felt"
starknetdevnet "github.com/NethermindEth/starknet.go/devnet"
starknetutils "github.com/NethermindEth/starknet.go/utils"
Expand All @@ -18,10 +21,9 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/logger"
test_env_ctf "github.com/smartcontractkit/chainlink-testing-framework/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
"github.com/smartcontractkit/chainlink/integration-tests/client"
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
test_env_integrations "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"

test_env_starknet "github.com/smartcontractkit/chainlink-starknet/integration-tests/docker/testenv"
"github.com/smartcontractkit/chainlink-starknet/integration-tests/testconfig"
Expand Down Expand Up @@ -83,7 +85,7 @@ type ChainlinkClient struct {
}

type StarknetClusterTestEnv struct {
*test_env.CLClusterTestEnv
*test_env_integrations.CLClusterTestEnv
Starknet *test_env_starknet.Starknet
Killgrave *test_env_ctf.Killgrave
}
Expand Down Expand Up @@ -154,7 +156,7 @@ func (m *OCRv2TestState) DeployCluster() {
m.Common.RPCDetails.MockServerEndpoint = m.Common.Env.URLs["qa_mock_adapter_internal"][0]
m.Common.RPCDetails.MockServerURL = "five"
} else { // Otherwise use docker
env, err := test_env.NewTestEnv()
env, err := test_env_integrations.NewTestEnv()
require.NoError(m.TestConfig.T, err)
stark := test_env_starknet.NewStarknet([]string{env.DockerNetwork.Name}, *m.Common.TestConfig.Common.DevnetImage)
err = stark.StartContainer()
Expand All @@ -170,7 +172,7 @@ func (m *OCRv2TestState) DeployCluster() {
}

// Creating docker containers
b, err := test_env.NewCLTestEnvBuilder().
b, err := test_env_integrations.NewCLTestEnvBuilder().
WithNonEVM().
WithTestInstance(m.TestConfig.T).
WithTestConfig(m.TestConfig.TestConfig).
Expand All @@ -182,6 +184,7 @@ func (m *OCRv2TestState) DeployCluster() {
require.NoError(m.TestConfig.T, err)
env, err = b.Build()
require.NoError(m.TestConfig.T, err)
env.MockAdapter.ContainerName = os.Getenv("KILLGRAVE_INTERNAL_IMAGE")
m.Clients.DockerEnv = &StarknetClusterTestEnv{
CLClusterTestEnv: env,
Starknet: stark,
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/docker/testenv/stark.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
tc "github.com/testcontainers/testcontainers-go"
tcwait "github.com/testcontainers/testcontainers-go/wait"

"github.com/smartcontractkit/chainlink-testing-framework/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext"
"github.com/smartcontractkit/chainlink-testing-framework/lib/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/lib/logging"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
)

const (
Expand Down
Loading
Loading