mirror of https://github.com/status-im/go-waku.git
test: add test for generating requestid
This commit is contained in:
parent
10378a5827
commit
3bf00b2f37
|
@ -0,0 +1,15 @@
|
||||||
|
package protocol
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGenerateRequestId(t *testing.T) {
|
||||||
|
// Force 2 reseed to ensure this is working as expected
|
||||||
|
for i := 1; i < 20001; i++ {
|
||||||
|
bytes := GenerateRequestId()
|
||||||
|
require.Equal(t, 32, len(bytes))
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue