mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-23 10:05:19 +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>
17 lines
299 B
Go
17 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)
|
|
}
|
|
}
|