@@ -20,7 +20,9 @@ func addUnicodeTestCases(f *testing.F) {
20
20
}
21
21
}
22
22
23
- func FuzzProxyClientServerIntegration (f * testing.F ) {
23
+ // FuzzProxyClientServerIntegrationAndOpClientKeccak256MalformedInputs will fuzz the proxy client server integration
24
+ // and op client keccak256 with malformed inputs
25
+ func FuzzProxyClientServerIntegrationAndOpClientKeccak256MalformedInputs (f * testing.F ) {
24
26
if ! runFuzzTests {
25
27
f .Skip ("Skipping test as FUZZ env var not set" )
26
28
}
@@ -31,37 +33,21 @@ func FuzzProxyClientServerIntegration(f *testing.F) {
31
33
ts , kill := e2e .CreateTestSuite (f , tsConfig )
32
34
defer kill ()
33
35
36
+ // Add each printable Unicode character as a seed
34
37
addUnicodeTestCases (f )
35
38
36
39
cfg := & client.Config {
37
40
URL : ts .Address (),
38
41
}
39
42
daClient := client .New (cfg )
43
+ daClientPcFalse := op_plasma .NewDAClient (ts .Address (), false , false )
40
44
41
- // Add each printable Unicode character as a seed including ascii
42
45
f .Fuzz (func (t * testing.T , _ string , data []byte ) {
43
46
_ , err := daClient .SetData (ts .Ctx , data )
44
47
require .NoError (t , err )
45
48
})
46
- }
47
-
48
- func FuzzOpClientKeccak256MalformedInputs (f * testing.F ) {
49
49
50
- if ! runFuzzTests {
51
- f .Skip ("Skipping test as FUZZ env var not set" )
52
- }
53
-
54
- testCfg := e2e .TestConfig (useMemory ())
55
- testCfg .UseKeccak256ModeS3 = true
56
- tsConfig := e2e .TestSuiteConfig (f , testCfg )
57
- ts , kill := e2e .CreateTestSuite (f , tsConfig )
58
- defer kill ()
59
- addUnicodeTestCases (f )
60
-
61
- daClientPcFalse := op_plasma .NewDAClient (ts .Address (), false , false )
62
-
63
- // Fuzz the SetInput function with random data
64
- // seed and data are expected. `seed` value is seed: {i} and data is the one with the random string
50
+ // seed and data are expected. `seed` value is seed: {rune} and data is the one with the random byte/s
65
51
f .Fuzz (func (t * testing.T , _ string , data []byte ) {
66
52
67
53
_ , err := daClientPcFalse .SetInput (ts .Ctx , data )
@@ -71,5 +57,4 @@ func FuzzOpClientKeccak256MalformedInputs(f *testing.F) {
71
57
}
72
58
73
59
})
74
-
75
60
}
0 commit comments