diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/appstate/appstate_test.go | 5 | ||||
-rw-r--r-- | modules/convert/main_test.go | 4 | ||||
-rw-r--r-- | modules/indexer/code/indexer_test.go | 4 | ||||
-rw-r--r-- | modules/indexer/issues/indexer_test.go | 4 | ||||
-rw-r--r-- | modules/indexer/stats/indexer_test.go | 4 | ||||
-rw-r--r-- | modules/notification/action/action_test.go | 4 | ||||
-rw-r--r-- | modules/repository/main_test.go | 4 |
7 files changed, 22 insertions, 7 deletions
diff --git a/modules/appstate/appstate_test.go b/modules/appstate/appstate_test.go index 15fbc829ba..e4a0d72850 100644 --- a/modules/appstate/appstate_test.go +++ b/modules/appstate/appstate_test.go @@ -14,7 +14,10 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", ".."), "") + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", ".."), + FixtureFiles: []string{""}, // load nothing + }) } type testItem1 struct { diff --git a/modules/convert/main_test.go b/modules/convert/main_test.go index 307fd06197..84f16b9af3 100644 --- a/modules/convert/main_test.go +++ b/modules/convert/main_test.go @@ -12,5 +12,7 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", "..")) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", ".."), + }) } diff --git a/modules/indexer/code/indexer_test.go b/modules/indexer/code/indexer_test.go index d56c33653f..06923dfd25 100644 --- a/modules/indexer/code/indexer_test.go +++ b/modules/indexer/code/indexer_test.go @@ -18,7 +18,9 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", "..", "..")) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", "..", ".."), + }) } func testIndexer(name string, t *testing.T, indexer Indexer) { diff --git a/modules/indexer/issues/indexer_test.go b/modules/indexer/issues/indexer_test.go index d516615b56..6bafcbdf24 100644 --- a/modules/indexer/issues/indexer_test.go +++ b/modules/indexer/issues/indexer_test.go @@ -23,7 +23,9 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", "..", "..")) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", "..", ".."), + }) } func TestBleveSearchIssues(t *testing.T) { diff --git a/modules/indexer/stats/indexer_test.go b/modules/indexer/stats/indexer_test.go index b5c58ab25a..c8bd8d1783 100644 --- a/modules/indexer/stats/indexer_test.go +++ b/modules/indexer/stats/indexer_test.go @@ -23,7 +23,9 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", "..", "..")) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", "..", ".."), + }) } func TestRepoStatsIndex(t *testing.T) { diff --git a/modules/notification/action/action_test.go b/modules/notification/action/action_test.go index 3664b82104..2898c8ec3d 100644 --- a/modules/notification/action/action_test.go +++ b/modules/notification/action/action_test.go @@ -18,7 +18,9 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", "..", "..")) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", "..", ".."), + }) } func TestRenameRepoAction(t *testing.T) { diff --git a/modules/repository/main_test.go b/modules/repository/main_test.go index 262d339481..42134fa7ad 100644 --- a/modules/repository/main_test.go +++ b/modules/repository/main_test.go @@ -12,5 +12,7 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, filepath.Join("..", "..")) + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: filepath.Join("..", ".."), + }) } |