diff --git a/integration/contractdeployer/contract_deployer_test.go b/integration/contractdeployer/contract_deployer_test.go index 398254b03c..7d48233525 100644 --- a/integration/contractdeployer/contract_deployer_test.go +++ b/integration/contractdeployer/contract_deployer_test.go @@ -33,7 +33,6 @@ const ( erc20ParamThree = "1000000000000000000" testLogs = "../.build/noderunner/" receiptTimeout = 30 * time.Second // The time to wait for a receipt for a transaction. - _portOffset = 1000 ) func init() { //nolint:gochecknoinits @@ -82,7 +81,7 @@ func TestCanDeployLayer2ERC20Contract(t *testing.T) { } func TestFaucetSendsFundsOnlyIfNeeded(t *testing.T) { - startPort := integration.StartPortContractDeployerTest + _portOffset + startPort := integration.StartPortContractDeployerTest hostWSPort := startPort + integration.DefaultHostRPCWSOffset createObscuroNetwork(t, startPort) diff --git a/integration/faucet/faucet_test.go b/integration/faucet/faucet_test.go index 3085a5324e..8f36ffbfa0 100644 --- a/integration/faucet/faucet_test.go +++ b/integration/faucet/faucet_test.go @@ -23,6 +23,7 @@ import ( "github.com/obscuronet/go-obscuro/tools/faucet/container" "github.com/obscuronet/go-obscuro/tools/faucet/faucet" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func init() { //nolint:gochecknoinits @@ -62,25 +63,25 @@ func TestFaucet(t *testing.T) { assert.NoError(t, err) initialFaucetBal, err := getFaucetBalance(faucetConfig.ServerPort) - assert.NoError(t, err) - assert.NotZero(t, initialFaucetBal) + require.NoError(t, err) + require.NotZero(t, initialFaucetBal) rndWallet := datagenerator.RandomWallet(integration.ObscuroChainID) err = fundWallet(faucetConfig.ServerPort, rndWallet) - assert.NoError(t, err) + require.NoError(t, err) obsClient, err := obsclient.DialWithAuth(fmt.Sprintf("http://%s:%d", network.Localhost, startPort+integration.DefaultHostRPCHTTPOffset), rndWallet, testlog.Logger()) - assert.NoError(t, err) + require.NoError(t, err) currentBalance, err := obsClient.BalanceAt(context.Background(), nil) - assert.NoError(t, err) + require.NoError(t, err) if currentBalance.Cmp(big.NewInt(0)) <= 0 { t.Fatalf("Unexpected balance, got: %d, expected > 0", currentBalance.Int64()) } endFaucetBal, err := getFaucetBalance(faucetConfig.ServerPort) - assert.NoError(t, err) + require.NoError(t, err) assert.NotZero(t, endFaucetBal) // faucet balance should have decreased assert.Less(t, endFaucetBal.Cmp(initialFaucetBal), 0)