-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/autoshard-store-api
- Loading branch information
Showing
24 changed files
with
252 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package tests | ||
|
||
import ( | ||
"github.com/stretchr/testify/require" | ||
"github.com/waku-org/go-waku/waku/v2/utils" | ||
"go.uber.org/zap" | ||
"strconv" | ||
"testing" | ||
) | ||
|
||
func TestStringGenerators(t *testing.T) { | ||
|
||
log := utils.Logger() | ||
|
||
// Generate string and print out to console | ||
for i := 0; i < 1000; i++ { | ||
x, err := GenerateRandomASCIIString(1, 4097) | ||
require.NoError(t, err) | ||
log.Info("Generated random ASCII string", zap.String(strconv.Itoa(i), x)) | ||
|
||
x, err = GenerateRandomUTF8String(1, 4097, false) | ||
require.NoError(t, err) | ||
log.Info("Generated random UTF8 string", zap.String(strconv.Itoa(i), x)) | ||
|
||
x, err = GenerateRandomUTF8String(1, 4097, true) | ||
require.NoError(t, err) | ||
log.Info("Generated uncommon UTF8 string", zap.String(strconv.Itoa(i), x)) | ||
|
||
x, err = GenerateRandomJSONString() | ||
require.NoError(t, err) | ||
log.Info("Generated random JSON string", zap.String(strconv.Itoa(i), x)) | ||
|
||
x, err = GenerateRandomBase64String(1025) | ||
require.NoError(t, err) | ||
log.Info("Generated random Base64 string", zap.String(strconv.Itoa(i), x)) | ||
|
||
x, err = GenerateRandomURLEncodedString(2049) | ||
require.NoError(t, err) | ||
log.Info("Generated random URL encoded string", zap.String(strconv.Itoa(i), x)) | ||
|
||
x, err = GenerateRandomSQLInsert() | ||
require.NoError(t, err) | ||
log.Info("Generated random SQL insert string", zap.String(strconv.Itoa(i), x)) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.