Skip to content

Commit a8db555

Browse files
zakiskchmouel
authored andcommitted
fix: PR close condition in e2e tests
this fixes the if condition in TearDown func for GitHub. Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
1 parent cb4296f commit a8db555

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/pkg/github/pr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func (g *PRTest) TearDown(ctx context.Context, t *testing.T) {
219219
// Collect GitHub API call information from controller logs
220220
g.collectGitHubAPICalls(ctx, t)
221221

222-
if g.PRNumber != -1 && g.Provider != nil && g.Logger != nil {
222+
if g.PRNumber > 0 && g.Provider != nil && g.Logger != nil {
223223
g.Logger.Infof("Closing PR %d", g.PRNumber)
224224
state := "closed"
225225
_, _, err := g.Provider.Client().PullRequests.Edit(ctx,

0 commit comments

Comments
 (0)