mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-23 19:41:58 -08:00
history replay enhancements
This commit is contained in:
parent
f3d138d909
commit
2c7c8fbaf9
18 changed files with 264 additions and 255 deletions
|
|
@ -16,7 +16,7 @@ const (
|
|||
|
||||
func TestGenerateSecretToken(t *testing.T) {
|
||||
token := GenerateSecretToken()
|
||||
if len(token) != 32 {
|
||||
if len(token) < 22 {
|
||||
t.Errorf("bad token: %v", token)
|
||||
}
|
||||
}
|
||||
|
|
@ -46,3 +46,9 @@ func TestTokenCompare(t *testing.T) {
|
|||
t.Error("the empty token should not match anything")
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkGenerateSecretToken(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
GenerateSecretToken()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue