From 1c36a3778955be9c8f24c2566a16f262e863dfb3 Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Wed, 4 Sep 2024 10:21:53 +0200 Subject: [PATCH] [TO REMOVE] Check tests --- e2e/telemetry/telemetry_test.go | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/e2e/telemetry/telemetry_test.go b/e2e/telemetry/telemetry_test.go index 5b7f470acb..9520fc286f 100644 --- a/e2e/telemetry/telemetry_test.go +++ b/e2e/telemetry/telemetry_test.go @@ -66,33 +66,3 @@ func TestTelemetryTrait(t *testing.T) { g.Eventually(TailedLogs(t, ctx, pod.Namespace, pod.Name, 100), TestTimeoutLong).Should(ContainSubstring(fmt.Sprintf("http.url: Str(http://%s/customers/%s)", serviceName, name))) }) } - -func TestTelemetryAddon(t *testing.T) { - WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) { - // Check service is available - g.Eventually(ServicesByType(t, ctx, "otlp", corev1.ServiceTypeClusterIP), TestTimeoutLong).ShouldNot(BeEmpty()) - - // Create integration and activate traces by telemetry trait - ExpectExecSucceed(t, g, Kubectl("apply", "-f", "files/int-rest-consumer-addon.yaml", "-n", ns)) - g.Eventually(IntegrationPodPhase(t, ctx, ns, "rest-consumer-addon"), TestTimeoutLong).Should(Equal(corev1.PodRunning)) - - name := "Alice" - serviceName := fmt.Sprintf("rest-consumer-addon.%s", ns) - g.Expect(KamelRun(t, ctx, ns, "files/rest-producer.yaml", - "-p", fmt.Sprintf("serviceName=%s", serviceName), - "-p", "name="+name, - "--name", "rest-producer").Execute()).To(Succeed()) - g.Eventually(IntegrationPodPhase(t, ctx, ns, "rest-producer"), TestTimeoutLong).Should(Equal(corev1.PodRunning)) - g.Eventually(IntegrationLogs(t, ctx, ns, "rest-consumer-addon"), TestTimeoutLong).Should(ContainSubstring(fmt.Sprintf("get %s", name))) - g.Eventually(IntegrationLogs(t, ctx, ns, "rest-producer"), TestTimeoutLong).Should(ContainSubstring(fmt.Sprintf("%s Doe", name))) - - // Find opentelemetry collector pod : the exporter is configured to log traces with detailed verbosity. - pod, err := Pod(t, ctx, "otlp", "opentelemetrycollector")() - g.Expect(err).To(BeNil()) - g.Expect(pod).NotTo(BeNil()) - - // Ensured logs in opentelemetry collector pod are present - g.Eventually(TailedLogs(t, ctx, pod.Namespace, pod.Name, 100), TestTimeoutLong).Should(ContainSubstring(fmt.Sprintf("http.target: Str(/customers/%s)", name))) - g.Eventually(TailedLogs(t, ctx, pod.Namespace, pod.Name, 100), TestTimeoutLong).Should(ContainSubstring(fmt.Sprintf("http.url: Str(http://%s/customers/%s)", serviceName, name))) - }) -}