This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 8b613a87a4daa2d5e1851710a03381382e2130f7 Author: Pasquale Congiusti <[email protected]> AuthorDate: Tue Jun 25 14:58:10 2024 +0200 fix(e2e): don't panic if no operatorPod --- e2e/support/test_support.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index dad82e2a4..075204cc2 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -2471,7 +2471,10 @@ func operatorPods(t *testing.T, ctx context.Context, ns string) []corev1.Pod { func OperatorPod(t *testing.T, ctx context.Context, ns string) func() *corev1.Pod { return func() *corev1.Pod { pods := operatorPods(t, ctx, ns) - return &pods[0] + if len(pods) > 0 { + return &pods[0] + } + return nil } }
