reviewers fix in tests

This commit is contained in:
2025-02-06 17:17:06 +01:00
parent e537e5d00c
commit efde2fad69
2 changed files with 9 additions and 7 deletions

View File

@@ -102,7 +102,7 @@ func TestPR(t *testing.T) {
{
pr: &models.PullRequest{Body: "", Index: 42, Base: &models.PRBranchInfo{Repo: &models.Repository{Name: "barPrj", Owner: &models.User{UserName: "foo"}}}},
reviews: []*models.PullReview{
{Body: "LGTM", User: &models.User{UserName: "super1"}, State: common.ReviewStateApproved},
{Body: "LGTM", User: &models.User{UserName: "m2"}, State: common.ReviewStateApproved},
{Body: "LGTM", User: &models.User{UserName: "super2"}, State: common.ReviewStateApproved},
{Body: "LGTM", User: &models.User{UserName: common.Bot_BuildReview}, State: common.ReviewStateApproved},
},
@@ -243,14 +243,14 @@ func TestPRMerge(t *testing.T) {
}
config := &common.AutogitConfig{
Organization: "org",
Organization: "org",
GitProjectName: "prj",
}
tests := []struct {
name string
pr *models.PullRequest
mergeError string
name string
pr *models.PullRequest
mergeError string
}{
{
name: "Merge base not merged in main",
@@ -266,7 +266,7 @@ func TestPRMerge(t *testing.T) {
SSHURL: path.Join(cmd.Dir, "prjgit"),
},
},
Head: &models.PRBranchInfo {
Head: &models.PRBranchInfo{
Sha: "88584433de1c917c1d773f62b82381848d882491940b5e9b427a540aa9057d9a", // "base_add_b2"
},
},
@@ -286,7 +286,7 @@ func TestPRMerge(t *testing.T) {
SSHURL: path.Join(cmd.Dir, "prjgit"),
},
},
Head: &models.PRBranchInfo {
Head: &models.PRBranchInfo{
Sha: "88584433de1c917c1d773f62b82381848d882491940b5e9b427a540aa9057d9a", // "base_add_b2"
},
},