mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix bug when migrating repository (#34182)
This PR fixed a bug which is a regression from #31035
This commit is contained in:
@@ -133,7 +133,7 @@ func TestCompareCodeExpand(t *testing.T) {
|
||||
Readme: "Default",
|
||||
AutoInit: true,
|
||||
DefaultBranch: "main",
|
||||
})
|
||||
}, true)
|
||||
assert.NoError(t, err)
|
||||
|
||||
session := loginUser(t, user1.Name)
|
||||
|
@@ -48,7 +48,7 @@ func TestMirrorPull(t *testing.T) {
|
||||
IsPrivate: opts.Private,
|
||||
IsMirror: opts.Mirror,
|
||||
Status: repo_model.RepositoryBeingMigrated,
|
||||
})
|
||||
}, false)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, mirrorRepo.IsMirror, "expected pull-mirror repo to be marked as a mirror immediately after its creation")
|
||||
|
||||
|
@@ -40,7 +40,7 @@ func testMirrorPush(t *testing.T, u *url.URL) {
|
||||
|
||||
mirrorRepo, err := repo_service.CreateRepositoryDirectly(db.DefaultContext, user, user, repo_service.CreateRepoOptions{
|
||||
Name: "test-push-mirror",
|
||||
})
|
||||
}, true)
|
||||
assert.NoError(t, err)
|
||||
|
||||
session := loginUser(t, user.Name)
|
||||
|
@@ -58,7 +58,7 @@ func TestPullView_CodeOwner(t *testing.T) {
|
||||
AutoInit: true,
|
||||
ObjectFormatName: git.Sha1ObjectFormat.Name(),
|
||||
DefaultBranch: "master",
|
||||
})
|
||||
}, true)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// add CODEOWNERS to default branch
|
||||
|
Reference in New Issue
Block a user