mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 12:07:20 +00:00
Remove SavePatch and generate patches on the fly (#9302)
* Save patches to temporary files * Remove SavePatch and generate patches on the fly * Use ioutil.TempDir * fixup! Use ioutil.TempDir * fixup! fixup! Use ioutil.TempDir * RemoveAll LocalCopyPath() in initIntergrationTest * Default to status checking on PR creation * Remove unnecessary set to StatusChecking * Protect against unable to load repo * Handle conflicts * Restore original conflict setting * In TestPullRequests update status to StatusChecking before running TestPatch
This commit is contained in:
@ -125,6 +125,7 @@ func initIntegrationTest() {
|
||||
|
||||
setting.SetCustomPathAndConf("", "", "")
|
||||
setting.NewContext()
|
||||
os.RemoveAll(models.LocalCopyPath())
|
||||
setting.CheckLFSVersion()
|
||||
setting.InitDBConfig()
|
||||
|
||||
@ -182,7 +183,6 @@ func prepareTestEnv(t testing.TB, skip ...int) func() {
|
||||
deferFn := PrintCurrentTest(t, ourSkip)
|
||||
assert.NoError(t, models.LoadFixtures())
|
||||
assert.NoError(t, os.RemoveAll(setting.RepoRootPath))
|
||||
assert.NoError(t, os.RemoveAll(models.LocalCopyPath()))
|
||||
|
||||
assert.NoError(t, com.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"),
|
||||
setting.RepoRootPath))
|
||||
|
Reference in New Issue
Block a user