aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/main_test.go8
-rw-r--r--models/unit_tests.go6
2 files changed, 8 insertions, 6 deletions
diff --git a/models/main_test.go b/models/main_test.go
index 304bbccaa9..af1f7b6004 100644
--- a/models/main_test.go
+++ b/models/main_test.go
@@ -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)
diff --git a/models/unit_tests.go b/models/unit_tests.go
index 44b2e2c637..a3459e49f7 100644
--- a/models/unit_tests.go
+++ b/models/unit_tests.go
@@ -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()