Skip to content

Commit

Permalink
changed test name and fn name
Browse files Browse the repository at this point in the history
  • Loading branch information
anupsv committed Sep 19, 2024
1 parent c7209a0 commit 951092b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions e2e/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestOpClientKeccak256MalformedInputs(t *testing.T) {
require.Error(t, err)

// should fail with proper error message as is now, and cannot contain panics or nils
assert.True(t, strings.Contains(err.Error(), "invalid input") && !isPanic(err.Error()))
assert.True(t, strings.Contains(err.Error(), "invalid input") && !isNilPtrDerefPanic(err.Error()))

// The below test panics silently.
input := op_plasma.NewGenericCommitment([]byte(""))
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestOptimismClientWithGenericCommitment(t *testing.T) {
require.Equal(t, testPreimage, preimage)
}

func TestProxyClientIntegrationOnly(t *testing.T) {
func TestProxyClientServerIntegration(t *testing.T) {
if !runIntegrationTests && !runTestnetIntegrationTests {
t.Skip("Skipping test as INTEGRATION or TESTNET env var not set")
}
Expand Down Expand Up @@ -168,20 +168,20 @@ func TestProxyClientIntegrationOnly(t *testing.T) {
_, err := daClient.GetData(ts.Ctx, testCert)
require.Error(t, err)
assert.True(t, strings.Contains(err.Error(),
"commitment is too short") && !isPanic(err.Error()))
"commitment is too short") && !isNilPtrDerefPanic(err.Error()))

testCert = []byte{1}
_, err = daClient.GetData(ts.Ctx, testCert)
require.Error(t, err)
assert.True(t, strings.Contains(err.Error(),
"commitment is too short") && !isPanic(err.Error()))
"commitment is too short") && !isNilPtrDerefPanic(err.Error()))

testCert = []byte(e2e.RandString(10000))
_, err = daClient.GetData(ts.Ctx, testCert)
require.Error(t, err)
assert.True(t, strings.Contains(err.Error(),
"failed to decode DA cert to RLP format: rlp: expected input list for verify.Certificate") &&
!isPanic(err.Error()))
!isNilPtrDerefPanic(err.Error()))
})

}
Expand Down

0 comments on commit 951092b

Please sign in to comment.