Skip to content

Commit

Permalink
Fix failing test case. (open-telemetry#2178)
Browse files Browse the repository at this point in the history
  • Loading branch information
IshwarKanse authored Sep 29, 2023
1 parent f630af4 commit 0c6afc7
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 85 deletions.
22 changes: 22 additions & 0 deletions tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,25 @@ status:
availableReplicas: 1
readyReplicas: 1
replicas: 1

---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/instance: kuttl-otlp-metrics.cluster-collector
app.kubernetes.io/managed-by: opentelemetry-operator
app.kubernetes.io/name: cluster-collector-collector
name: cluster-collector-collector
namespace: kuttl-otlp-metrics
spec:
endpoints:
- port: monitoring
- port: prometheus
namespaceSelector:
matchNames:
- kuttl-otlp-metrics
selector:
matchLabels:
app.kubernetes.io/instance: kuttl-otlp-metrics.cluster-collector
app.kubernetes.io/managed-by: opentelemetry-operator
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ metadata:
namespace: kuttl-otlp-metrics
spec:
mode: deployment
ports:
- name: promexporter
port: 8889
protocol: TCP
observability:
metrics:
enableMetrics: true
config: |
receivers:
otlp:
Expand All @@ -19,10 +18,10 @@ spec:
http:
processors:
exporters:
jaeger:
endpoint: jaeger-allinone-collector-headless.kuttl-otlp-metrics.svc:14250
otlp:
endpoint: jaeger-allinone-collector-headless.kuttl-otlp-metrics.svc:4317
tls:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
insecure: true
prometheus:
endpoint: 0.0.0.0:8889
resource_to_telemetry_conversion:
Expand All @@ -32,7 +31,7 @@ spec:
traces:
receivers: [otlp]
processors: []
exporters: [jaeger]
exporters: [otlp]
metrics:
receivers: [otlp]
processors: []
Expand Down
43 changes: 20 additions & 23 deletions tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
apiVersion: batch/v1
kind: Job
metadata:
name: telemetrygen-traces
status:
active: 1
ready: 1

---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
apiVersion: batch/v1
kind: Job
metadata:
name: otel-collector
namespace: kuttl-otlp-metrics
spec:
podMetricsEndpoints:
- port: metrics
- metricRelabelings:
- action: labeldrop
regex: instance
- action: labeldrop
regex: job
port: promexporter
relabelings:
- action: labeldrop
regex: pod
- action: labeldrop
regex: container
- action: labeldrop
regex: endpoint
selector:
matchLabels:
app.kubernetes.io/name: cluster-collector-collector
name: telemetrygen-metrics
status:
active: 1
ready: 1

---
apiVersion: v1
kind: Pod
status:
phase: Running
26 changes: 0 additions & 26 deletions tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml

This file was deleted.

26 changes: 5 additions & 21 deletions tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
apiVersion: batch/v1
kind: Job
metadata:
name: telemetrygen-traces
status:
active: 1
ready: 1

---
apiVersion: batch/v1
kind: Job
metadata:
name: telemetrygen-metrics
status:
active: 1
ready: 1

---
apiVersion: v1
kind: Pod
status:
phase: Running
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 30
commands:
- script: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh
3 changes: 1 addition & 2 deletions tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 30
commands:
- script: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh
- script: ./tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh
5 changes: 0 additions & 5 deletions tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml

This file was deleted.

0 comments on commit 0c6afc7

Please sign in to comment.