Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions e2e/support/test_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -2811,6 +2811,8 @@ func userCleanup(t *testing.T) {

func invokeUserTestCode(t *testing.T, ctx context.Context, ns string, doRun func(context.Context, *gomega.WithT, string)) {
defer func() {
// Check for error logs before deleting the test namespace
checkOperatorErrorLogs(t, ctx, ns)
Comment thread
matheusandre1 marked this conversation as resolved.
DumpNamespace(t, ctx, ns)
// Also dump the operator namespace in case it's common
DumpNamespace(t, ctx, "camel-k")
Expand All @@ -2820,6 +2822,11 @@ func invokeUserTestCode(t *testing.T, ctx context.Context, ns string, doRun func
doRun(ctx, g, ns)
}

func checkOperatorErrorLogs(t *testing.T, ctx context.Context, ns string) {
g := gomega.NewWithT(t)
g.Expect(OperatorLogs(t, ctx, ns)()).ShouldNot(gomega.ContainSubstring(`"level":"error"`))
}

func deleteKnativeBroker(t *testing.T, ctx context.Context, ns metav1.Object) {
nsRef := corev1.Namespace{
TypeMeta: metav1.TypeMeta{
Expand Down