Skip to content

Commit a49b1d7

Browse files
committed
Assert startedEventSourcesAndQueue is set in tests.
1 parent 6f6325c commit a49b1d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/internal/controller/controller_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ var _ = Describe("controller", func() {
592592
wg.Wait()
593593
})
594594

595-
It("should reset c.startWatches to nil after returning", func() {
595+
It("should reset c.startWatches to nil after returning and startedEventSourcesAndQueue", func() {
596596
ctx, cancel := context.WithCancel(context.Background())
597597
defer cancel()
598598

@@ -607,6 +607,7 @@ var _ = Describe("controller", func() {
607607
err := ctrl.startEventSourcesAndQueueLocked(ctx)
608608
Expect(err).NotTo(HaveOccurred())
609609
Expect(ctrl.startWatches).To(BeNil(), "startWatches should be reset to nil after returning")
610+
Expect(ctrl.startedEventSourcesAndQueue).To(BeTrue(), "startedEventSourcesAndQueue should be set to true after startEventSourcesAndQueueLocked returns without error")
610611
})
611612
})
612613

0 commit comments

Comments
 (0)