mirror of
https://github.com/jeremyd/ergo.git
synced 2026-04-26 23:49:59 -07:00
history replay enhancements
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user