Improve fuzz, fix typo, cleanup
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -20,11 +21,12 @@ func BenchmarkDup(b *testing.B) {
|
||||
}
|
||||
|
||||
func FuzzDup(f *testing.F) {
|
||||
c := http.Client{}
|
||||
|
||||
f.Fuzz(func(t *testing.T, firstID uint16, secondID uint16) {
|
||||
c := http.Client{}
|
||||
req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("http://127.0.0.1:8001/%d/%d", firstID, secondID), nil)
|
||||
require.NoError(t, err)
|
||||
assert.NoError(t, err)
|
||||
_, err = c.Do(req)
|
||||
require.NoError(t, err)
|
||||
assert.NoError(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user