Skip to content

Commit

Permalink
Add New CI Test Script for Mercury LOOPP (#11987)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
EasterTheBunny authored Feb 12, 2024
1 parent 877f2f5 commit 2da47a9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
27 changes: 27 additions & 0 deletions core/services/ocr2/plugins/mercury/integration_plugin_test.go
Original file line number Diff line number Diff line change
@@ -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)
}
12 changes: 12 additions & 0 deletions core/services/ocr2/plugins/mercury/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2da47a9

Please sign in to comment.