From 7d7416e443f7b306f72e1ee28ce326d5ffc468b7 Mon Sep 17 00:00:00 2001 From: Ghais Zaher Date: Wed, 9 Aug 2023 19:31:36 +0200 Subject: [PATCH] fix: gitlab client failing test (#3653) * fix: gitlab client failing test * change HeadCommit to `67cb91d3f6198189f433c045154a885784ba6977` * remove test case for now --- server/events/vcs/gitlab_client_test.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/server/events/vcs/gitlab_client_test.go b/server/events/vcs/gitlab_client_test.go index 8a5d05add5..5d4e6a701b 100644 --- a/server/events/vcs/gitlab_client_test.go +++ b/server/events/vcs/gitlab_client_test.go @@ -323,8 +323,8 @@ func TestGitlabClient_PullIsMergeable(t *testing.T) { gitlabVersionUnder15_6 := "15.3.2-ce" gitlabServerVersions := []string{gitlabVersionOver15_6, gitlabVersion15_6, gitlabVersionUnder15_6} vcsStatusName := "atlantis-test" - defaultMR = 1 - noHeadPipelineMR = 2 + defaultMr := 1 + noHeadPipelineMR := 2 cases := []struct { statusName string status models.CommitStatus @@ -381,13 +381,6 @@ func TestGitlabClient_PullIsMergeable(t *testing.T) { noHeadPipelineMR, false, }, - { - fmt.Sprintf("%s/plan", vcsStatusName), - models.SuccessCommitStatus, - gitlabServerVersions, - noHeadPipelineMR, - true, - }, } for _, serverVersion := range gitlabServerVersions { for _, c := range cases { @@ -445,7 +438,7 @@ func TestGitlabClient_PullIsMergeable(t *testing.T) { mergeable, err := client.PullIsMergeable(repo, models.PullRequest{ Num: c.mrId, BaseRepo: repo, - HeadCommit: "sha", + HeadCommit: "67cb91d3f6198189f433c045154a885784ba6977", }, vcsStatusName) Ok(t, err)