0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 17:14:16 +01:00

Merge pull request #1875 from ethantkoenig/test/unused

Run unused test
This commit is contained in:
Andrey Nering 2017-06-04 17:10:10 -03:00 committed by GitHub
commit 858126bca1
2 changed files with 8 additions and 6 deletions

View file

@ -7,8 +7,16 @@ import (
"testing"
"code.gitea.io/gitea/modules/setting"
"github.com/stretchr/testify/assert"
)
// TestFixturesAreConsistent assert that test fixtures are consistent
func TestFixturesAreConsistent(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
CheckConsistencyForAll(t)
}
func TestMain(m *testing.M) {
if err := CreateTestEngine(); err != nil {
fmt.Printf("Error creating test engine: %v\n", err)

View file

@ -32,12 +32,6 @@ func CreateTestEngine() error {
return InitFixtures(&testfixtures.SQLite{}, "fixtures/")
}
// TestFixturesAreConsistent assert that test fixtures are consistent
func TestFixturesAreConsistent(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
CheckConsistencyForAll(t)
}
// PrepareTestDatabase load test fixtures into test database
func PrepareTestDatabase() error {
return LoadFixtures()