Skip to content

Commit 70d1ff1

Browse files
zakiskchmouel
authored andcommitted
fix(e2e): add SinceSeconds support to pod log helpers
The GetPodLog, GetControllerLogByName, RegexpMatchingInControllerLog, RegexpMatchingInPodLog, and GoldenPodLog functions now accept an optional sinceSeconds parameter, which maps to the Kubernetes PodLogOptions.SinceSeconds field. When kubelet rotates CRI container logs (e.g. containerd splitting 0.log into 0.log.<timestamp> and a new 0.log), the TailLines option may only read from the current log file, causing regexp assertions to miss matching lines that landed in the rotated segment. This was observed in TestGithubGHEPullRequestGitCloneTask where the "fetched git-clone task" message was written at 06:30:09, CRI rotation occurred at 06:30:13, and the test checked at 06:30:21 finding only 2 lines in the new 0.log. SinceSeconds uses timestamps rather than byte offsets, so it reads across rotated CRI log files reliably. Callers that do not need time-based filtering pass nil to preserve existing behaviour. Signed-off-by: Zaki Shaikh <zashaikh@redhat.com> Assisted-by: Claude Opus 4.6 (via Claude Code)
1 parent 435b6e4 commit 70d1ff1

18 files changed

+70
-51
lines changed

test/bitbucket_datacenter_dynamic_variables_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ func TestBitbucketDataCenterDynamicVariables(t *testing.T) {
6565
wait.Succeeded(ctx, t, runcnx, opts, successOpts)
6666

6767
reg := *regexp.MustCompile(fmt.Sprintf("event: repo:refs_changed, refId: refs/heads/%s, message: %s", targetNS, commitMsg))
68-
err = wait.RegexpMatchingInPodLog(ctx, runcnx, targetNS, "pipelinesascode.tekton.dev/original-prname=pipelinerun-dynamic-vars", "step-task", reg, "", 2)
68+
err = wait.RegexpMatchingInPodLog(ctx, runcnx, targetNS, "pipelinesascode.tekton.dev/original-prname=pipelinerun-dynamic-vars", "step-task", reg, "", 2, nil)
6969
assert.NilError(t, err)
7070
}

test/gitea_access_control_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func TestGiteaACLCommentsAllowing(t *testing.T) {
259259
tgitea.WaitForPullRequestCommentMatch(t, topts)
260260
tgitea.WaitForStatus(t, topts, topts.PullRequest.Head.Sha, "", false)
261261
// checking the pod log to make sure /test <prname> works
262-
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, "pipelinesascode.tekton.dev/event-type=pull_request", "step-task", *regexp.MustCompile(".*MOTO"), "", 2)
262+
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, "pipelinesascode.tekton.dev/event-type=pull_request", "step-task", *regexp.MustCompile(".*MOTO"), "", 2, nil)
263263
assert.NilError(t, err, "Error while checking the logs of the pods")
264264
})
265265
}

test/gitea_custom_params_cel_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func TestGiteaCustomParamsInCELExpression(t *testing.T) {
6262
output := `Custom params: enable_ci=true environment=staging`
6363
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS,
6464
fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=custom-params-cel-test", prs.Items[0].Name),
65-
"step-test-custom-params-cel", *regexp.MustCompile(output), "", 2)
65+
"step-test-custom-params-cel", *regexp.MustCompile(output), "", 2, nil)
6666
assert.NilError(t, err)
6767
}
6868

@@ -124,13 +124,13 @@ func TestGiteaCustomParamsFromSecretsInCEL(t *testing.T) {
124124
output := `Secret params verified: api_key=super-secret-api-key-12345 deploy_token=deploy-token-xyz-789`
125125
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS,
126126
"tekton.dev/pipelineTask=cel-secret-params-test",
127-
"step-test-cel-secret-params", *regexp.MustCompile(output), "", 2)
127+
"step-test-cel-secret-params", *regexp.MustCompile(output), "", 2, nil)
128128
assert.NilError(t, err)
129129

130130
// Verify secrets are not leaked in controller logs
131131
maxLines := int64(1000)
132132
secretLeakRegex := regexp.MustCompile(`super-secret-api-key-12345|deploy-token-xyz-789`)
133-
err = twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *secretLeakRegex, 2, "controller", &maxLines)
133+
err = twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *secretLeakRegex, 2, "controller", &maxLines, nil)
134134
if err == nil {
135135
t.Fatal("Secret values were found in controller logs - this is a security issue!")
136136
}
@@ -234,6 +234,6 @@ func TestGiteaOnCommentParamsReResolved(t *testing.T) {
234234
output := `Trigger type verified: trigger_type=comment`
235235
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS,
236236
"tekton.dev/pipelineTask=on-comment-cel-test",
237-
"step-test-on-comment-cel", *regexp.MustCompile(output), "", 2)
237+
"step-test-on-comment-cel", *regexp.MustCompile(output), "", 2, nil)
238238
assert.NilError(t, err)
239239
}

test/gitea_gitops_commands_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestGiteaOnCommentAnnotation(t *testing.T) {
114114
last := repo.Status[len(repo.Status)-1]
115115
twait.GoldenPodLog(context.Background(), t, topts.ParamsRun, topts.TargetNS,
116116
fmt.Sprintf("tekton.dev/pipelineRun=%s", last.PipelineRunName),
117-
"step-task", strings.ReplaceAll(fmt.Sprintf("%s-pipelinerun-on-comment-annotation.golden", t.Name()), "/", "-"), 2)
117+
"step-task", strings.ReplaceAll(fmt.Sprintf("%s-pipelinerun-on-comment-annotation.golden", t.Name()), "/", "-"), 2, nil)
118118

119119
tgitea.PostCommentOnPullRequest(t, topts, fmt.Sprintf(`%s revision=main custom1=thisone custom2="another one" custom_no_initial_value="a \"quote\""`, triggerComment))
120120
waitOpts.MinNumberStatus = 4
@@ -125,7 +125,7 @@ func TestGiteaOnCommentAnnotation(t *testing.T) {
125125
// now we should have only 3 status, the last one is the on comment match with an argument redefining the revision which is a standard parameter
126126

127127
last = repo.Status[len(repo.Status)-1]
128-
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s", last.PipelineRunName), "step-task", regexp.Regexp{}, t.Name(), 2)
128+
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s", last.PipelineRunName), "step-task", regexp.Regexp{}, t.Name(), 2, nil)
129129
assert.NilError(t, err)
130130
}
131131

@@ -175,7 +175,7 @@ func TestGiteaTestPipelineRunExplicitlyWithTestComment(t *testing.T) {
175175
"we didn't target the proper pipelinerun, we tested: %s", repo.Status[0].PipelineRunName)
176176

177177
last := repo.Status[len(repo.Status)-1]
178-
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s", last.PipelineRunName), "step-task", *regexp.MustCompile("custom is awesome"), "", 2)
178+
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s", last.PipelineRunName), "step-task", *regexp.MustCompile("custom is awesome"), "", 2, nil)
179179
assert.NilError(t, err)
180180
}
181181

test/gitea_params_test.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func TestGiteaRetestPreservesSourceURL(t *testing.T) {
111111
fmt.Sprintf("tekton.dev/pipelineRun=%s", firstPR.Name),
112112
"step-test-standard-params-value",
113113
&numLines,
114+
nil,
114115
)
115116
assert.NilError(t, err)
116117
assert.Assert(t, firstOut != "")
@@ -170,6 +171,7 @@ func TestGiteaRetestPreservesSourceURL(t *testing.T) {
170171
fmt.Sprintf("tekton.dev/pipelineRun=%s", retestPR.Name),
171172
"step-test-standard-params-value",
172173
&numLines,
174+
nil,
173175
)
174176
assert.NilError(t, err)
175177
assert.Assert(t, out != "")
@@ -321,6 +323,7 @@ func TestGiteaGlobalRepoParams(t *testing.T) {
321323
regexp.Regexp{},
322324
t.Name(),
323325
2,
326+
nil,
324327
)
325328
assert.NilError(t, err)
326329
}
@@ -399,6 +402,7 @@ func TestGiteaGlobalRepoUseLocalDef(t *testing.T) {
399402
regexp.Regexp{},
400403
t.Name(),
401404
2,
405+
nil,
402406
)
403407
assert.NilError(t, err)
404408
}
@@ -484,7 +488,7 @@ func TestGiteaParamsOnRepoCR(t *testing.T) {
484488
assert.NilError(t,
485489
twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=params",
486490
repo.Status[0].PipelineRunName), "step-test-params-value", *regexp.MustCompile(
487-
"I am the most Kawaī params\nSHHHHHHH\nFollow me on my ig #nofilter\n{{ no_match }}\nHey I show up from a payload match\n{{ secret_nothere }}\n{{ no_initial_value }}"), "", 2))
491+
"I am the most Kawaī params\nSHHHHHHH\nFollow me on my ig #nofilter\n{{ no_match }}\nHey I show up from a payload match\n{{ secret_nothere }}\n{{ no_initial_value }}"), "", 2, nil))
488492
}
489493

490494
// TestGiteaParamsBodyHeadersCEL Test that we can access the pull request body and headers in params
@@ -515,7 +519,7 @@ func TestGiteaParamsBodyHeadersCEL(t *testing.T) {
515519
output := `Look mum I know that we are acting on a pull_request
516520
my email is a true beauty and like groot, I AM pac`
517521
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=cel-pullrequest-params",
518-
repo.Status[0].PipelineRunName), "step-test-cel-params-value", *regexp.MustCompile(output), "", 2)
522+
repo.Status[0].PipelineRunName), "step-test-cel-params-value", *regexp.MustCompile(output), "", 2, nil)
519523
assert.NilError(t, err)
520524

521525
// Merge the pull request so we can generate a push event and wait that it is updated
@@ -553,7 +557,7 @@ my email is a true beauty and like groot, I AM pac`
553557
// push matching the expanded CEL body and headers values
554558
output = `Look mum I know that we are acting on a push
555559
my email is a true beauty and you can call me pacman`
556-
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=cel-push-params", sortedstatus[0].PipelineRunName), "step-test-cel-params-value", *regexp.MustCompile(output), "", 2)
560+
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=cel-push-params", sortedstatus[0].PipelineRunName), "step-test-cel-params-value", *regexp.MustCompile(output), "", 2, nil)
557561
assert.NilError(t, err)
558562
}
559563

@@ -599,7 +603,7 @@ func TestGiteaParamsChangedFilesCEL(t *testing.T) {
599603
assert.Equal(t, len(repo.Status), 1, repo.Status)
600604
twait.GoldenPodLog(context.Background(), t, topts.ParamsRun, topts.TargetNS,
601605
fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=changed-files-pullrequest-params", repo.Status[0].PipelineRunName),
602-
"step-test-changed-files-params-pull", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-pullrequest-params-1.golden", t.Name()), "/", "-"), 2)
606+
"step-test-changed-files-params-pull", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-pullrequest-params-1.golden", t.Name()), "/", "-"), 2, nil)
603607
// ======================================================================================================================
604608
// Merge the pull request so we can generate a push event and wait that it is updated
605609
// ======================================================================================================================
@@ -633,7 +637,7 @@ func TestGiteaParamsChangedFilesCEL(t *testing.T) {
633637

634638
twait.GoldenPodLog(context.Background(), t, topts.ParamsRun, topts.TargetNS,
635639
fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=changed-files-push-params", sortedstatus[0].PipelineRunName),
636-
"step-test-changed-files-params-push", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-push-params-1.golden", t.Name()), "/", "-"), 2)
640+
"step-test-changed-files-params-push", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-push-params-1.golden", t.Name()), "/", "-"), 2, nil)
637641

638642
// ======================================================================================================================
639643
// Create second pull request with all change types
@@ -645,7 +649,7 @@ func TestGiteaParamsChangedFilesCEL(t *testing.T) {
645649
assert.Equal(t, len(repo.Status), 3, repo.Status)
646650
twait.GoldenPodLog(context.Background(), t, topts.ParamsRun, topts.TargetNS,
647651
fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=changed-files-pullrequest-params", repo.Status[2].PipelineRunName),
648-
"step-test-changed-files-params-pull", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-pullrequest-params-2.golden", t.Name()), "/", "-"), 2)
652+
"step-test-changed-files-params-pull", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-pullrequest-params-2.golden", t.Name()), "/", "-"), 2, nil)
649653

650654
// ======================================================================================================================
651655
// Merge the pull request so we can generate a second push event and wait that it is updated
@@ -681,7 +685,7 @@ func TestGiteaParamsChangedFilesCEL(t *testing.T) {
681685
// push matching the expanded CEL body and headers values
682686
twait.GoldenPodLog(context.Background(), t, topts.ParamsRun, topts.TargetNS,
683687
fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=changed-files-push-params", sortedstatus[0].PipelineRunName),
684-
"step-test-changed-files-params-push", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-push-params-2.golden", t.Name()), "/", "-"), 2)
688+
"step-test-changed-files-params-push", strings.ReplaceAll(fmt.Sprintf("%s-changed-files-push-params-2.golden", t.Name()), "/", "-"), 2, nil)
685689
}
686690

687691
// TestGiteaParamsCelPrefix tests the cel: prefix for arbitrary CEL expressions.
@@ -721,6 +725,7 @@ func TestGiteaParamsCelPrefix(t *testing.T) {
721725
regexp.Regexp{},
722726
t.Name(),
723727
2,
728+
nil,
724729
)
725730
assert.NilError(t, err)
726731
}

test/gitea_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func TestGiteaPullRequestResolvedTektonParamsRemotePipeline(t *testing.T) {
144144
err := twait.RegexpMatchingInPodLog(context.Background(),
145145
topts.ParamsRun,
146146
topts.TargetNS, "pipelinesascode.tekton.dev/event-type=pull_request", "step-task",
147-
*regexp.MustCompile("Hello " + topts.TargetRepoName), "", 2)
147+
*regexp.MustCompile("Hello " + topts.TargetRepoName), "", 2, nil)
148148
assert.NilError(t, err)
149149
}
150150

@@ -162,7 +162,7 @@ func TestGiteaPullRequestPrivateRepository(t *testing.T) {
162162
defer f()
163163
reg := regexp.MustCompile(".*successfully fetched git-clone task from default configured catalog Hub")
164164
maxLines := int64(1000)
165-
err := twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *reg, 20, "controller", &maxLines)
165+
err := twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *reg, 20, "controller", &maxLines, nil)
166166
assert.NilError(t, err)
167167
tgitea.WaitForSecretDeletion(t, topts, topts.TargetRefName)
168168
}
@@ -255,7 +255,7 @@ func TestGiteaBadYamlValidation(t *testing.T) {
255255
maxLines := int64(1000)
256256
assert.NilError(t, twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *regexp.MustCompile(
257257
"cannot read the PipelineRun: pr-bad-format.yaml, error: yaml validation error: line 3: could not find expected ':'"),
258-
10, "controller", &maxLines))
258+
10, "controller", &maxLines, nil))
259259
}
260260

261261
// TestGiteaInvalidSpecValues tests invalid field values of a PipelinRun and ensures that these
@@ -950,7 +950,7 @@ func TestGiteaOnPullRequestLabels(t *testing.T) {
950950
assert.NilError(t, err)
951951
twait.GoldenPodLog(context.Background(), t, topts.ParamsRun, topts.TargetNS,
952952
fmt.Sprintf("tekton.dev/pipelineRun=%s,tekton.dev/pipelineTask=task", repo.Status[0].PipelineRunName),
953-
"step-success", strings.ReplaceAll(fmt.Sprintf("%s.golden", t.Name()), "/", "-"), 2)
953+
"step-success", strings.ReplaceAll(fmt.Sprintf("%s.golden", t.Name()), "/", "-"), 2, nil)
954954

955955
// Make sure the on-label pr has triggered and post status
956956
topts.Regexp = regexp.MustCompile(fmt.Sprintf("Pipelines as Code CI/%s.* has <b>successfully</b> validated your commit", prName))
@@ -999,7 +999,7 @@ func TestGiteaBadLinkOfTask(t *testing.T) {
999999
defer f()
10001000
errre := regexp.MustCompile("There was an error starting the PipelineRun")
10011001
maxLines := int64(1000)
1002-
assert.NilError(t, twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *errre, 10, "controller", &maxLines))
1002+
assert.NilError(t, twait.RegexpMatchingInControllerLog(ctx, topts.ParamsRun, *errre, 10, "controller", &maxLines, nil))
10031003
}
10041004

10051005
// TestGiteaPipelineRunWithSameName checks that we fail properly with the error from the
@@ -1162,7 +1162,7 @@ func verifyProvenance(t *testing.T, topts *tgitea.TestOpts, expectedOutput, cNam
11621162

11631163
// check the output of the PipelineRun logs
11641164
err = twait.RegexpMatchingInPodLog(context.Background(), topts.ParamsRun, topts.TargetNS, "pipelinesascode.tekton.dev/event-type=pull_request",
1165-
cName, *regexp.MustCompile(expectedOutput), "", 2)
1165+
cName, *regexp.MustCompile(expectedOutput), "", 2, nil)
11661166
assert.NilError(t, err)
11671167
}
11681168

test/github_incoming_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func verifyIncomingWebhook(t *testing.T, randomedString, pipelinerunName string,
311311
}
312312
assert.Assert(t, prName == "pipelinerun-incoming", "Expected PipelineRun name 'pipelinerun-incoming', got '%s'", prName)
313313

314-
err = wait.RegexpMatchingInPodLog(context.Background(), runcnx, randomedString, "pipelinesascode.tekton.dev/event-type=incoming", "step-task", *regexp.MustCompile(".*It's a Bird... It's a Plane... It's Superman"), "", 2)
314+
err = wait.RegexpMatchingInPodLog(context.Background(), runcnx, randomedString, "pipelinesascode.tekton.dev/event-type=incoming", "step-task", *regexp.MustCompile(".*It's a Bird... It's a Plane... It's Superman"), "", 2, nil)
315315
assert.NilError(t, err, "Error while checking the logs of the pods")
316316
} else {
317317
runcnx.Clients.Log.Infof("Successfully verified no PipelineRun was created for non-matching branch %s with targets %v", randomedString, targets)

test/github_pullrequest_privaterepository_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ func TestGithubGHEPullRequestGitCloneTask(t *testing.T) {
2929
ctx, err := cctx.GetControllerCtxInfo(ctx, g.Cnx)
3030
assert.NilError(t, err)
3131

32-
maxLines := int64(1000)
32+
sinceSeconds := int64(20)
3333
assert.NilError(t, wait.RegexpMatchingInControllerLog(ctx, g.Cnx, *regexp.MustCompile(".*fetched git-clone task"),
34-
10, "ghe-controller", &maxLines), "Error while checking the logs of the pipelines-as-code controller pod")
34+
10, "ghe-controller", nil, &sinceSeconds), "Error while checking the logs of the pipelines-as-code controller pod")
3535
defer g.TearDown(ctx, t)
3636
}
3737

test/github_pullrequest_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ func TestGithubGHEPullandPushMatchTriggerOnlyPull(t *testing.T) {
752752

753753
reg := regexp.MustCompile(fmt.Sprintf("Skipping push event for commit.*as it belongs to pull request #%d", g.PRNumber))
754754
maxLines := int64(1000)
755-
err = twait.RegexpMatchingInControllerLog(ctx, g.Cnx, *reg, 20, "ghe-controller", &maxLines)
755+
err = twait.RegexpMatchingInControllerLog(ctx, g.Cnx, *reg, 20, "ghe-controller", &maxLines, nil)
756756
assert.NilError(t, err)
757757
}
758758

@@ -813,7 +813,7 @@ func TestGithubGHEIgnoreTagPushCommitsFromSkipPushEventsSetting(t *testing.T) {
813813

814814
reg := regexp.MustCompile(fmt.Sprintf("Processing tag push event for commit %s despite skip-push-events-for-pr-commits being enabled.*", g.SHA))
815815
maxLines := int64(1000)
816-
err = twait.RegexpMatchingInControllerLog(ctx, g.Cnx, *reg, 20, "ghe-controller", &maxLines)
816+
err = twait.RegexpMatchingInControllerLog(ctx, g.Cnx, *reg, 20, "ghe-controller", &maxLines, nil)
817817
assert.NilError(t, err)
818818

819819
g.Cnx.Clients.Log.Infof("Deleting tag %s", tag)
@@ -867,6 +867,7 @@ func TestGithubGHEPullRequestCelPrefix(t *testing.T) {
867867
regexp.Regexp{},
868868
t.Name(),
869869
2,
870+
nil,
870871
)
871872
assert.NilError(t, err)
872873
}

test/github_pullrequest_test_comment_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ func TestGithubGHEOnCommentAnnotation(t *testing.T) {
9090
assert.Equal(t, *repo.Status[len(repo.Status)-1].EventType, opscomments.OnCommentEventType.String())
9191
lastPrName := repo.Status[len(repo.Status)-1].PipelineRunName
9292

93-
err = twait.RegexpMatchingInPodLog(context.Background(), g.Cnx, g.TargetNamespace, fmt.Sprintf("tekton.dev/pipelineRun=%s", lastPrName), "step-task", *regexp.MustCompile(triggerComment), "", 2)
93+
err = twait.RegexpMatchingInPodLog(context.Background(), g.Cnx, g.TargetNamespace, fmt.Sprintf("tekton.dev/pipelineRun=%s", lastPrName), "step-task", *regexp.MustCompile(triggerComment), "", 2, nil)
9494
assert.NilError(t, err)
9595

9696
err = twait.RegexpMatchingInPodLog(context.Background(), g.Cnx, g.TargetNamespace, fmt.Sprintf("tekton.dev/pipelineRun=%s", lastPrName), "step-task", *regexp.MustCompile(fmt.Sprintf(
97-
"The event is %s", opscomments.OnCommentEventType.String())), "", 2)
97+
"The event is %s", opscomments.OnCommentEventType.String())), "", 2, nil)
9898
assert.NilError(t, err)
9999
}

0 commit comments

Comments
 (0)