From b772603d78cb10f0501f3d08b01553bb33914b6e Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sun, 12 Jun 2022 14:15:01 +0800 Subject: migrations: add tests and remove XORM (#7050) --- internal/db/backup_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/db/backup_test.go') diff --git a/internal/db/backup_test.go b/internal/db/backup_test.go index 047a2dca..1221dac3 100644 --- a/internal/db/backup_test.go +++ b/internal/db/backup_test.go @@ -20,6 +20,7 @@ import ( "gogs.io/gogs/internal/auth/github" "gogs.io/gogs/internal/auth/pam" "gogs.io/gogs/internal/cryptoutil" + "gogs.io/gogs/internal/dbtest" "gogs.io/gogs/internal/lfsutil" "gogs.io/gogs/internal/testutil" ) @@ -35,7 +36,7 @@ func TestDumpAndImport(t *testing.T) { t.Fatalf("New table has added (want 4 got %d), please add new tests for the table and update this check", len(Tables)) } - db := initTestDB(t, "dumpAndImport", Tables...) + db := dbtest.NewDB(t, "dumpAndImport", Tables...) setupDBToDump(t, db) dumpTables(t, db) importTables(t, db) -- cgit v1.2.3