Skip to content

Commit cfd9917

Browse files
committed
fix test again
1 parent 020196f commit cfd9917

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

seth/client_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package seth_test
22

33
import (
4+
"strings"
45
"testing"
56

67
"github.com/ethereum/go-ethereum/common"
@@ -40,7 +41,9 @@ func TestRPCHealthCheckEnabled_Node_Unhealthy(t *testing.T) {
4041

4142
_, err = seth.NewClientWithConfig(cfg)
4243
require.Error(t, err, "expected error when connecting to unhealthy node")
43-
require.Contains(t, err.Error(), "RPC health check failed: failed to send transaction to network: insufficient funds for gas", "expected error message when connecting to dead node")
44+
// Geth returns "insufficient funds for gas" error
45+
// Anvil returns "insufficient funds for gas" error
46+
require.Contains(t, strings.ToLower(err.Error()), strings.ToLower("RPC health check failed: failed to send transaction to network: Insufficient funds for gas"), "expected error message when connecting to dead node")
4447
}
4548

4649
func TestRPCHealthCheckDisabled_Node_Unhealthy(t *testing.T) {

0 commit comments

Comments
 (0)