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:
parent
e59fe7c8d9
commit
96c268c0fc
12 changed files with 215 additions and 67 deletions
20
modules/generate/generate_test.go
Normal file
20
modules/generate/generate_test.go
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue