summaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index db78eead86..dc0d41edef 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -17,6 +17,8 @@ import (
"code.gitea.io/gitea/routers"
"code.gitea.io/gitea/routers/routes"
+ "github.com/Unknwon/com"
+ "github.com/stretchr/testify/assert"
"gopkg.in/macaron.v1"
"gopkg.in/testfixtures.v2"
)
@@ -48,7 +50,7 @@ func TestMain(m *testing.M) {
err := models.InitFixtures(
helper,
- "integrations/gitea-integration/fixtures/",
+ "models/fixtures/",
)
if err != nil {
fmt.Printf("Error initializing test database: %v\n", err)
@@ -57,6 +59,12 @@ func TestMain(m *testing.M) {
os.Exit(m.Run())
}
+func prepareTestEnv(t *testing.T) {
+ assert.NoError(t, models.LoadFixtures())
+ assert.NoError(t, os.RemoveAll("integrations/gitea-integration"))
+ assert.NoError(t, com.CopyDir("integrations/gitea-integration-meta", "integrations/gitea-integration"))
+}
+
type TestResponseWriter struct {
HeaderCode int
Writer io.Writer