diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-11-03 01:51:03 +0800 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-11-02 18:51:03 +0100 |
commit | f70758dec918b01f0895bb747decfdf110ae52bd (patch) | |
tree | d15d365b386a3369944f805edfad025e7550633a /integrations/integration_test.go | |
parent | eecaba20310483f64e0e4500fa3ac85e23ced18e (diff) | |
download | gitea-f70758dec918b01f0895bb747decfdf110ae52bd.tar.gz gitea-f70758dec918b01f0895bb747decfdf110ae52bd.zip |
Add git clone test on integration test (#1682)
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r-- | integrations/integration_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 55014b5a41..eae0638587 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -16,6 +16,7 @@ import ( "net/url" "os" "path" + "path/filepath" "strings" "testing" @@ -51,7 +52,7 @@ func TestMain(m *testing.M) { err := models.InitFixtures( helper, - "models/fixtures/", + path.Join(filepath.Dir(setting.AppPath), "models/fixtures/"), ) if err != nil { fmt.Printf("Error initializing test database: %v\n", err) @@ -134,7 +135,9 @@ func initIntegrationTest() { func prepareTestEnv(t testing.TB) { assert.NoError(t, models.LoadFixtures()) assert.NoError(t, os.RemoveAll(setting.RepoRootPath)) - assert.NoError(t, com.CopyDir("integrations/gitea-repositories-meta", setting.RepoRootPath)) + + assert.NoError(t, com.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), + setting.RepoRootPath)) } type TestSession struct { |