From 2da47a95be68f5193538a55fdc0cf4df15d89711 Mon Sep 17 00:00:00 2001 From: Awbrey Hughlett Date: Mon, 12 Feb 2024 15:50:14 -0500 Subject: [PATCH] Add New CI Test Script for Mercury LOOPP (#11987) * Add New Test File for Mercury LOOPP This commit adds a new test file for mercury specific integration tests and are configured to only run when the `integration` build flag is provided. * remove parallel tests for plugin --- .github/workflows/ci-core.yml | 1 + .../mercury/integration_plugin_test.go | 27 +++++++++++++++++++ .../ocr2/plugins/mercury/integration_test.go | 12 +++++++++ 3 files changed, 40 insertions(+) create mode 100644 core/services/ocr2/plugins/mercury/integration_plugin_test.go diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 5ffa971ed9e..e681f887700 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -82,6 +82,7 @@ jobs: pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-starknet/relayer) go install ./pkg/chainlink/cmd/chainlink-starknet popd + make install-mercury-loop - name: Increase Race Timeout if: github.event.schedule != '' run: | diff --git a/core/services/ocr2/plugins/mercury/integration_plugin_test.go b/core/services/ocr2/plugins/mercury/integration_plugin_test.go new file mode 100644 index 00000000000..74285f32dcb --- /dev/null +++ b/core/services/ocr2/plugins/mercury/integration_plugin_test.go @@ -0,0 +1,27 @@ +//go:build integration + +package mercury_test + +import ( + "testing" + + "github.com/smartcontractkit/chainlink/v2/core/config/env" +) + +func TestIntegration_MercuryV1_Plugin(t *testing.T) { + t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") + + integration_MercuryV1(t) +} + +func TestIntegration_MercuryV2_Plugin(t *testing.T) { + t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") + + integration_MercuryV2(t) +} + +func TestIntegration_MercuryV3_Plugin(t *testing.T) { + t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") + + integration_MercuryV3(t) +} diff --git a/core/services/ocr2/plugins/mercury/integration_test.go b/core/services/ocr2/plugins/mercury/integration_test.go index 6d847098f94..0ebc6a5e354 100644 --- a/core/services/ocr2/plugins/mercury/integration_test.go +++ b/core/services/ocr2/plugins/mercury/integration_test.go @@ -128,6 +128,10 @@ func setupBlockchain(t *testing.T) (*bind.TransactOpts, *backends.SimulatedBacke func TestIntegration_MercuryV1(t *testing.T) { t.Parallel() + integration_MercuryV1(t) +} + +func integration_MercuryV1(t *testing.T) { var logObservers []*observer.ObservedLogs t.Cleanup(func() { detectPanicLogs(t, logObservers) @@ -466,6 +470,10 @@ func TestIntegration_MercuryV1(t *testing.T) { func TestIntegration_MercuryV2(t *testing.T) { t.Parallel() + integration_MercuryV2(t) +} + +func integration_MercuryV2(t *testing.T) { var logObservers []*observer.ObservedLogs t.Cleanup(func() { detectPanicLogs(t, logObservers) @@ -736,6 +744,10 @@ func TestIntegration_MercuryV2(t *testing.T) { func TestIntegration_MercuryV3(t *testing.T) { t.Parallel() + integration_MercuryV3(t) +} + +func integration_MercuryV3(t *testing.T) { var logObservers []*observer.ObservedLogs t.Cleanup(func() { detectPanicLogs(t, logObservers)