Skip to content

Commit

Permalink
merge conflict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Nov 16, 2023
1 parent 6f03974 commit 51da5c1
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions integration-tests/smoke/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ func TestKeeperJobReplacement(t *testing.T) {
gom.Eventually(func(g gomega.Gomega) error {
// Check if the upkeeps are performing multiple times by analyzing their counters and checking they are greater than 10
for i := 0; i < len(upkeepIDs); i++ {
counter, err := consumers[i].Counter(utils.TestContext(t))
counter, err := consumers[i].Counter(testcontext.Get(t))
g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Failed to retrieve consumer counter for upkeep at index %d", i)
g.Expect(counter.Int64()).Should(gomega.BeNumerically(">", int64(10)),
"Expected consumer counter to be greater than 10, but got %d", counter.Int64())
Expand Down Expand Up @@ -1183,7 +1183,7 @@ func TestKeeperJobReplacement(t *testing.T) {
gom.Eventually(func(g gomega.Gomega) error {
// Check if the upkeeps are performing multiple times by analyzing their counters and checking they are greater than 10
for i := 0; i < len(upkeepIDs); i++ {
counter, err := consumers[i].Counter(utils.TestContext(t))
counter, err := consumers[i].Counter(testcontext.Get(t))
g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Failed to retrieve consumer counter for upkeep at index %d", i)
g.Expect(counter.Int64()).Should(gomega.BeNumerically(">", int64(10)),
"Expected consumer counter to be greater than 10, but got %d", counter.Int64())
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestOCRv2JobReplacement(t *testing.T) {

err = actions.StartNewOCR2Round(1, aggregatorContracts, env.EVMClient, time.Minute*5, l)
require.NoError(t, err, "Error starting new OCR2 round")
roundData, err := aggregatorContracts[0].GetRound(utils.TestContext(t), big.NewInt(1))
roundData, err := aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(1))
require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail")
require.Equal(t, int64(5), roundData.Answer.Int64(),
"Expected latest answer from OCR contract to be 5 but got %d",
Expand All @@ -158,7 +158,7 @@ func TestOCRv2JobReplacement(t *testing.T) {
err = actions.StartNewOCR2Round(2, aggregatorContracts, env.EVMClient, time.Minute*5, l)
require.NoError(t, err)

roundData, err = aggregatorContracts[0].GetRound(utils.TestContext(t), big.NewInt(2))
roundData, err = aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(2))
require.NoError(t, err, "Error getting latest OCR answer")
require.Equal(t, int64(10), roundData.Answer.Int64(),
"Expected latest answer from OCR contract to be 10 but got %d",
Expand All @@ -176,7 +176,7 @@ func TestOCRv2JobReplacement(t *testing.T) {

err = actions.StartNewOCR2Round(3, aggregatorContracts, env.EVMClient, time.Minute*3, l)
require.NoError(t, err, "Error starting new OCR2 round")
roundData, err = aggregatorContracts[0].GetRound(utils.TestContext(t), big.NewInt(3))
roundData, err = aggregatorContracts[0].GetRound(testcontext.Get(t), big.NewInt(3))
require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail")
require.Equal(t, int64(15), roundData.Answer.Int64(),
"Expected latest answer from OCR contract to be 15 but got %d",
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/smoke/ocr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestOCRJobReplacement(t *testing.T) {
err = actions.StartNewRound(1, ocrInstances, env.EVMClient, l)
require.NoError(t, err)

answer, err := ocrInstances[0].GetLatestAnswer(utils.TestContext(t))
answer, err := ocrInstances[0].GetLatestAnswer(testcontext.Get(t))
require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail")
require.Equal(t, int64(5), answer.Int64(), "Expected latest answer from OCR contract to be 5 but got %d", answer.Int64())

Expand All @@ -101,7 +101,7 @@ func TestOCRJobReplacement(t *testing.T) {
err = actions.StartNewRound(2, ocrInstances, env.EVMClient, l)
require.NoError(t, err)

answer, err = ocrInstances[0].GetLatestAnswer(utils.TestContext(t))
answer, err = ocrInstances[0].GetLatestAnswer(testcontext.Get(t))
require.NoError(t, err, "Error getting latest OCR answer")
require.Equal(t, int64(10), answer.Int64(), "Expected latest answer from OCR contract to be 10 but got %d", answer.Int64())

Expand All @@ -118,7 +118,7 @@ func TestOCRJobReplacement(t *testing.T) {
err = actions.StartNewRound(1, ocrInstances, env.EVMClient, l)
require.NoError(t, err)

answer, err = ocrInstances[0].GetLatestAnswer(utils.TestContext(t))
answer, err = ocrInstances[0].GetLatestAnswer(testcontext.Get(t))
require.NoError(t, err, "Getting latest answer from OCR contract shouldn't fail")
require.Equal(t, int64(10), answer.Int64(), "Expected latest answer from OCR contract to be 10 but got %d", answer.Int64())

Expand Down
6 changes: 3 additions & 3 deletions integration-tests/smoke/vrf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestVRFJobReplacement(t *testing.T) {
encodedProvingKeys := make([][2]*big.Int, 0)
encodedProvingKeys = append(encodedProvingKeys, provingKey)

requestHash, err := contracts.Coordinator.HashOfKey(utils.TestContext(t), encodedProvingKeys[0])
requestHash, err := contracts.Coordinator.HashOfKey(testcontext.Get(t), encodedProvingKeys[0])
require.NoError(t, err, "Getting Hash of encoded proving keys shouldn't fail")
err = contracts.Consumer.RequestRandomness(requestHash, big.NewInt(1))
require.NoError(t, err, "Requesting randomness shouldn't fail")
Expand All @@ -181,7 +181,7 @@ func TestVRFJobReplacement(t *testing.T) {
jobRuns, err := env.ClCluster.Nodes[0].API.MustReadRunsByJob(job.Data.ID)
g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Job execution shouldn't fail")

out, err := contracts.Consumer.RandomnessOutput(utils.TestContext(t))
out, err := contracts.Consumer.RandomnessOutput(testcontext.Get(t))
g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Getting the randomness output of the consumer shouldn't fail")
// Checks that the job has actually run
g.Expect(len(jobRuns.Data)).Should(gomega.BeNumerically(">=", 1),
Expand All @@ -208,7 +208,7 @@ func TestVRFJobReplacement(t *testing.T) {
jobRuns, err := env.ClCluster.Nodes[0].API.MustReadRunsByJob(job.Data.ID)
g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Job execution shouldn't fail")

out, err := contracts.Consumer.RandomnessOutput(utils.TestContext(t))
out, err := contracts.Consumer.RandomnessOutput(testcontext.Get(t))
g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Getting the randomness output of the consumer shouldn't fail")
// Checks that the job has actually run
g.Expect(len(jobRuns.Data)).Should(gomega.BeNumerically(">=", 1),
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/testsetups/keeper_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (k *KeeperBenchmarkTest) Run() {
// This RPC call can possibly time out or otherwise die. Failure is not an option, keep retrying to get our stats.
err = fmt.Errorf("initial error") // to ensure our for loop runs at least once
for err != nil {
ctx, cancel := context.WithTimeout(testcontext.Get(k.t), timeout)
ctx, cancel := context.WithTimeout(testcontext.Get(k.t), timeout)
logs, err = k.chainClient.FilterLogs(ctx, filterQuery)
cancel()
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions integration-tests/types/config/node/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
relayassets "github.com/smartcontractkit/chainlink-relay/pkg/assets"
"github.com/smartcontractkit/chainlink-testing-framework/blockchain"
"github.com/smartcontractkit/chainlink-testing-framework/utils/ptr"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets"
evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml"
"github.com/smartcontractkit/chainlink/v2/core/config/toml"
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
Expand Down
4 changes: 0 additions & 4 deletions integration-tests/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@ func BigIntSliceContains(slice []*big.Int, b *big.Int) bool {
}
return false
}
// Return background context if testing.T not set
if t == nil {
return ctx
}

0 comments on commit 51da5c1

Please sign in to comment.