1
0
Fork 0
forked from forgejo/forgejo

Implements generator cli for secrets (#3531)

Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
This commit is contained in:
Codruț Constantin Gușoi 2018-02-18 18:14:37 +00:00 committed by Lauris BH
parent e59fe7c8d9
commit 96c268c0fc
12 changed files with 215 additions and 67 deletions

View file

@ -0,0 +1,20 @@
package generate
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestMain(m *testing.M) {
retVal := m.Run()
os.Exit(retVal)
}
func TestGetRandomString(t *testing.T) {
randomString, err := GetRandomString(4)
assert.NoError(t, err)
assert.Len(t, randomString, 4)
}