mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-24 18:45:24 +00:00
16 lines
255 B
Go
16 lines
255 B
Go
|
package util
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestGenerateRandomStringDNSSafe(t *testing.T) {
|
||
|
for i := 0; i < 100000; i++ {
|
||
|
str, err := GenerateRandomStringDNSSafe(8)
|
||
|
assert.Nil(t, err)
|
||
|
assert.Len(t, str, 8)
|
||
|
}
|
||
|
}
|