diff options
author | Codruț Constantin Gușoi <codrut.gusoi@gmail.com> | 2018-02-18 18:14:37 +0000 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-02-18 20:14:37 +0200 |
commit | 96c268c0fcc22604103f67821d66fef39944e80b (patch) | |
tree | fb5a97ff8557ae18dd22b227e52fcd811320eac3 /modules/generate/generate_test.go | |
parent | e59fe7c8d9eb8e49858cb2d59e8732f6058756ff (diff) | |
download | gitea-96c268c0fcc22604103f67821d66fef39944e80b.tar.gz gitea-96c268c0fcc22604103f67821d66fef39944e80b.zip |
Implements generator cli for secrets (#3531)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
Diffstat (limited to 'modules/generate/generate_test.go')
-rw-r--r-- | modules/generate/generate_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/generate/generate_test.go b/modules/generate/generate_test.go new file mode 100644 index 0000000000..538471af49 --- /dev/null +++ b/modules/generate/generate_test.go @@ -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) +} |