Skip to content

Commit

Permalink
use test context
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Nov 16, 2023
1 parent afe9471 commit ba973ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions integration-tests/docker/test_env/sol.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/smartcontractkit/chainlink-solana/integration-tests/utils"
"github.com/smartcontractkit/chainlink-testing-framework/docker/test_env"
"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext"
)

const (
Expand Down Expand Up @@ -78,7 +79,7 @@ func (s *Solana) StartContainer() error {
if err != nil {
return err
}
c, err := tc.GenericContainer(context.Background(), tc.GenericContainerRequest{
c, err := tc.GenericContainer(testcontext.Get(s.t), tc.GenericContainerRequest{
ContainerRequest: *cReq,
Reuse: true,
Started: true,
Expand All @@ -88,15 +89,15 @@ func (s *Solana) StartContainer() error {
return fmt.Errorf("cannot start Solana container: %w", err)
}
s.Container = c
host, err := test_env.GetHost(context.Background(), c)
host, err := test_env.GetHost(testcontext.Get(s.t), c)
if err != nil {
return err
}
httpPort, err := c.MappedPort(context.Background(), test_env.NatPort(SOL_HTTP_PORT))
httpPort, err := c.MappedPort(testcontext.Get(s.t), test_env.NatPort(SOL_HTTP_PORT))
if err != nil {
return err
}
wsPort, err := c.MappedPort(context.Background(), test_env.NatPort(SOL_WS_PORT))
wsPort, err := c.MappedPort(testcontext.Get(s.t), test_env.NatPort(SOL_WS_PORT))
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package smoke

import (
"context"
"fmt"
"sort"
"testing"
Expand All @@ -17,6 +16,7 @@ import (
"gopkg.in/guregu/null.v4"

"github.com/smartcontractkit/chainlink-testing-framework/logging"
"github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext"
"github.com/smartcontractkit/chainlink/integration-tests/actions"
"github.com/smartcontractkit/chainlink/integration-tests/client"
"github.com/smartcontractkit/chainlink/v2/core/services/job"
Expand Down Expand Up @@ -70,7 +70,7 @@ func TestSolanaGauntletOCRV2Smoke(t *testing.T) {

// Setting up RPC
c := rpc.New(gauntletConfig["NODE_URL"])
wsc, err := ws.Connect(context.Background(), gauntletConfig["WS_URL"])
wsc, err := ws.Connect(testcontext.Get(t), gauntletConfig["WS_URL"])
require.NoError(t, err)

_, err = sg.DeployOCR2()
Expand Down

0 comments on commit ba973ba

Please sign in to comment.