Skip to content

Commit

Permalink
integration-tests: restore original module name; remove self-replace (#…
Browse files Browse the repository at this point in the history
…1478)

## Motivation

The module import path for `integration-tests` was split brained
between:
- github.com/smartcontractkit/chainlink/integration-tests
- github.com/smartcontractkit/ccip/integration-tests

And patched with a self-replace:
```
github.com/smartcontractkit/chainlink/integration-tests => ../integration-tests
```
Which was breaking `gomods`

## Solution

This PR removes the replace and restores the original import path, and
re-enables gomods.
  • Loading branch information
jmank88 authored Oct 4, 2024
1 parent 29f7edf commit ace434b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 26 deletions.
18 changes: 5 additions & 13 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ gomod: ## Ensure chainlink's go dependencies are installed.
go mod download

.PHONY: gomodtidy
gomodtidy: ## Run go mod tidy on all modules.
go mod tidy
cd ./core/scripts && go mod tidy
cd ./integration-tests && go mod tidy
cd ./integration-tests/load && go mod tidy
cd ./dashboard-lib && go mod tidy
gomodtidy: gomods ## Run go mod tidy on all modules.
gomods tidy

.PHONY: docs
docs: ## Install and run pkgsite to view Go docs
Expand Down Expand Up @@ -93,12 +89,8 @@ abigen: ## Build & install abigen.
./tools/bin/build_abigen

.PHONY: generate
generate: pnpmdep abigen codecgen mockery protoc ## Execute all go:generate commands.
go generate -x ./...
cd ./core/scripts && go generate -x ./...
cd ./integration-tests && go generate -x ./...
cd ./integration-tests/load && go generate -x ./...
cd ./dashboard-lib && go generate -x ./...
generate: pnpmdep abigen codecgen mockery protoc gomods ## Execute all go:generate commands.
gomods -w go generate -x ./...
mockery

.PHONY: rm-mocked
Expand Down Expand Up @@ -140,7 +132,7 @@ presubmit: ## Format go files and imports.

.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/[email protected].1
go install github.com/jmank88/[email protected].5

.PHONY: mockery
mockery: $(mockery) ## Install mockery.
Expand Down
13 changes: 6 additions & 7 deletions integration-tests/ccip-tests/load/ccip_loadgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,27 @@ import (
"testing"
"time"

"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"

"github.com/AlekSi/pointer"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/rs/zerolog"
"github.com/smartcontractkit/ccip/integration-tests/ccip-tests/contracts"
chain_selectors "github.com/smartcontractkit/chain-selectors"
"github.com/stretchr/testify/require"
"go.uber.org/atomic"

chain_selectors "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"
"github.com/smartcontractkit/chainlink-testing-framework/wasp"

"github.com/smartcontractkit/chainlink-common/pkg/config"

"github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions"
"github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts"
"github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig"
"github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testreporters"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers"

"github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/actions"
"github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testreporters"
)

// CCIPLaneOptimized is a light-weight version of CCIPLane, It only contains elements which are used during load triggering and validation
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/docker/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"github.com/testcontainers/testcontainers-go"

"github.com/smartcontractkit/ccip/integration-tests/docker/cmd/internal"
"github.com/smartcontractkit/chainlink/integration-tests/docker/cmd/internal"
)

var rootCmd = &cobra.Command{
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/smartcontractkit/ccip/integration-tests
module github.com/smartcontractkit/chainlink/integration-tests

go 1.22.5

Expand Down Expand Up @@ -40,7 +40,6 @@ require (
github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0
github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.2
github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.0
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
github.com/spf13/cobra v1.8.1
Expand Down Expand Up @@ -528,7 +527,6 @@ replace (
// type func(a Label, b Label) bool of func(a, b Label) bool {…} does not match inferred type func(a Label, b Label) int for func(a E, b E) int
github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510

github.com/smartcontractkit/chainlink/integration-tests => ../integration-tests
)

exclude github.com/sourcegraph/sourcegraph/lib v0.0.0-20221216004406-749998a2ac74
4 changes: 2 additions & 2 deletions integration-tests/web/sdk/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/Khan/genqlient/graphql"

"github.com/smartcontractkit/ccip/integration-tests/web/sdk/client/internal/doer"
"github.com/smartcontractkit/ccip/integration-tests/web/sdk/internal/generated"
"github.com/smartcontractkit/chainlink/integration-tests/web/sdk/client/internal/doer"
"github.com/smartcontractkit/chainlink/integration-tests/web/sdk/internal/generated"
)

type Client interface {
Expand Down

0 comments on commit ace434b

Please sign in to comment.