mirror of
https://github.com/go-gitea/gitea
synced 2024-11-01 01:03:39 +01:00
baadb51445
* Add copyright Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add gitea-vet and fix non-compliance Signed-off-by: jolheiser <john.olheiser@gmail.com> * Combine tools.go into build.go and clean up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove extra GO111MODULE=on Signed-off-by: jolheiser <john.olheiser@gmail.com>
25 lines
459 B
Go
25 lines
459 B
Go
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
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)
|
|
}
|