/kind bug
|
It("should return an error if any Components fail to Start", func(done Done) { |
|
m, err := New(cfg, options) |
|
Expect(err).NotTo(HaveOccurred()) |
|
c1 := make(chan struct{}) |
|
Expect(m.Add(RunnableFunc(func(s <-chan struct{}) error { |
|
defer GinkgoRecover() |
|
defer close(c1) |
|
return nil |
|
}))).To(Succeed()) |
|
|
|
c2 := make(chan struct{}) |
|
Expect(m.Add(RunnableFunc(func(s <-chan struct{}) error { |
|
defer GinkgoRecover() |
|
defer close(c2) |
|
return fmt.Errorf("expected error") |
|
}))).To(Succeed()) |
|
|
|
c3 := make(chan struct{}) |
|
Expect(m.Add(RunnableFunc(func(s <-chan struct{}) error { |
|
defer GinkgoRecover() |
|
defer close(c3) |
|
return nil |
|
}))).To(Succeed()) |
|
|
|
go func() { |
|
defer GinkgoRecover() |
|
Expect(m.Start(stop)).NotTo(HaveOccurred()) |
|
close(done) |
|
}() |
|
<-c1 |
|
<-c2 |
|
<-c3 |
|
}) |
This piece of code should expect an error in the end but actually it's not.
This test case should not panic, it should not use GinkgoRecover.
Probably there is a bug in the test.
/kind bug
controller-runtime/pkg/manager/manager_test.go
Lines 254 to 286 in d6324a4
This piece of code should expect an error in the end but actually it's not.
This test case should not panic, it should not use
GinkgoRecover.Probably there is a bug in the test.