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 911626348efeb2f631ba23d0aadb3dbb4ebf2073 Author: Pasquale Congiusti <pasquale.congiu...@gmail.com> AuthorDate: Thu Aug 31 12:14:30 2023 +0200 fix(ctrl): unsupported API message change --- e2e/knative/kamelet_test.go | 5 +++-- pkg/util/kubernetes/errors.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go index a89835fd0..379bf0e70 100644 --- a/e2e/knative/kamelet_test.go +++ b/e2e/knative/kamelet_test.go @@ -48,6 +48,7 @@ func TestKameletChange(t *testing.T) { Expect(CreateKnativeChannel(ns, knChannel)()).To(Succeed()) // Consumer route that will read from the KNative channel Expect(KamelRunWithID(operatorID, ns, "files/test-kamelet-display.groovy", "-w").Execute()).To(Succeed()) + Eventually(IntegrationPodPhase(ns, "test-kamelet-display")).Should(Equal(corev1.PodRunning)) // Create the Pipe Expect(KamelBindWithID(operatorID, ns, @@ -58,9 +59,9 @@ func TestKameletChange(t *testing.T) { "--annotation", "trait.camel.apache.org/health.readiness-initial-delay=10", "--name", timerPipe, ).Execute()).To(Succeed()) - - Eventually(IntegrationPodPhase(ns, timerPipe), TestTimeoutLong).Should(Equal(corev1.PodRunning)) + Eventually(IntegrationPodPhase(ns, timerPipe)).Should(Equal(corev1.PodRunning)) Eventually(IntegrationConditionStatus(ns, timerPipe, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) + // Consume the message Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("HelloKNative!")) Eventually(PipeCondition(ns, timerPipe, v1.PipeConditionReady), TestTimeoutMedium).Should(And( diff --git a/pkg/util/kubernetes/errors.go b/pkg/util/kubernetes/errors.go index dd8654466..05f8b9a6f 100644 --- a/pkg/util/kubernetes/errors.go +++ b/pkg/util/kubernetes/errors.go @@ -22,5 +22,5 @@ import "strings" // IsUnknownAPIError checks if the given error is due to some missing APIs in the cluster. // Apparently there's no such method in Kubernetes Go API. func IsUnknownAPIError(err error) bool { - return err != nil && strings.HasPrefix(err.Error(), "no matches for kind") + return err != nil && (strings.HasPrefix(err.Error(), "no matches for kind") || strings.HasPrefix(err.Error(), "failed to get API group resources")) }