mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-04 20:53:06 +00:00
a6b19e85db
* linter fixes Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> * conf Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> * update nix hash Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> --------- Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
16 lines
299 B
Go
16 lines
299 B
Go
package util
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGenerateRandomStringDNSSafe(t *testing.T) {
|
|
for i := 0; i < 100000; i++ {
|
|
str, err := GenerateRandomStringDNSSafe(8)
|
|
require.NoError(t, err)
|
|
assert.Len(t, str, 8)
|
|
}
|
|
}
|