Skip to content

Commit cf95119

Browse files
committed
Add regression end-to-end test for event generation
Single-cluster end-to-end tests for GitRepo deployments now validate that `GotNewCommit` events are generated, which should help catch future event recording-related issues.
1 parent f7e13ee commit cf95119

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

e2e/single-cluster/gitrepo_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ var _ = Describe("Monitoring Git repos via HTTP for change", Label("infra-setup"
152152
out, _ := k.Namespace(targetNamespace).Get("deployments")
153153
return out
154154
}, testenv.MediumTimeout, testenv.ShortTimeout).Should(ContainSubstring("newsleep"))
155+
156+
By("checking that events are generated")
157+
Eventually(func() string {
158+
out, _ := k.Get("events", "--field-selector=reason=GotNewCommit")
159+
return out
160+
}).Should(ContainSubstring(commit))
155161
})
156162
})
157163

0 commit comments

Comments
 (0)