Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nish Krishnan committed Feb 4, 2021
1 parent 5bafe8d commit 439cf49
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions server/events_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ func TestGitHubWorkflowWithPolicyCheck(t *testing.T) {
{"exp-output-autoplan.txt"},
{"exp-output-auto-policy-check.txt"},
{"exp-output-apply-failed.txt"},
{"exp-output-merge.txt"}
{"exp-output-merge.txt"},
},
},
{
Expand All @@ -487,7 +487,7 @@ func TestGitHubWorkflowWithPolicyCheck(t *testing.T) {
{"exp-output-auto-policy-check.txt"},
{"exp-output-approve-policies.txt"},
{"exp-output-apply-failed.txt"},
{"exp-output-merge.txt"}
{"exp-output-merge.txt"},
},
},
}
Expand Down Expand Up @@ -532,11 +532,7 @@ func TestGitHubWorkflowWithPolicyCheck(t *testing.T) {
// replies) that we expect. We expect each plan to have 2 comments,
// one for plan one for policy check and apply have 1 for each
// comment plus one for the locks deleted at the end.
expNumReplies := len(c.Comments)

if c.ExpMergeable {
expNumReplies++
}
expNumReplies := len(c.Comments) + 1

if c.ExpAutoplan {
expNumReplies++
Expand Down Expand Up @@ -589,7 +585,7 @@ func setupE2E(t *testing.T, repoDir string, policyChecksEnabled bool) (server.Ev
e2eGitlabGetter := mocks.NewMockGitlabMergeRequestGetter()

// Real dependencies.
logger := logging.NewSimpleLogger("server", true, logging.Debug)
logger := logging.NewSimpleLogger("server", true, logging.Error)
eventParser := &events.EventParser{
GithubUser: "github-user",
GithubToken: "github-token",
Expand Down

0 comments on commit 439cf49

Please sign in to comment.