Skip to content

Commit 6cb7f2d

Browse files
committed
DONOTMERGE: additional debugging
Signed-off-by: timflannagan <[email protected]>
1 parent df1a538 commit 6cb7f2d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/e2e/operator_test.go

+11
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ var _ = Describe("Operator API", func() {
8686

8787
Consistently(o).ShouldNot(ContainCopiedCSVReferences())
8888

89+
defer func() {
90+
By("Checking whether the test case had failed")
91+
ctx.Ctx().DescribeResource(fmt.Sprintf("kubectl get operators %s -o yaml", o.GetName()))
92+
}()
93+
8994
defer func() {
9095
Eventually(func() error {
9196
err := client.Delete(clientCtx, o)
@@ -329,6 +334,11 @@ var _ = Describe("Operator API", func() {
329334
})
330335

331336
AfterEach(func() {
337+
By("Checking whether the test case had failed")
338+
if CurrentGinkgoTestDescription().Failed {
339+
ctx.Ctx().DescribeResource(fmt.Sprintf("kubectl get operators %s -o yaml", operatorName.Name))
340+
}
341+
332342
By("Deleting the testing namespace")
333343
Eventually(func() error {
334344
return controllerclient.IgnoreNotFound(client.Delete(clientCtx, ns))
@@ -529,6 +539,7 @@ func ReferenceComponents(refs []*corev1.ObjectReference) gomegatypes.GomegaMatch
529539

530540
for _, ref := range refs {
531541
if _, ok := actual[*ref]; !ok {
542+
ctx.Ctx().Logf("reference missing: %v - %v - %v", ref.GetObjectKind(), ref.Name, ref.Namespace)
532543
return false, nil
533544
}
534545
}

0 commit comments

Comments
 (0)