Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a smoke test that is run as part of the scorecard tests #1252

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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 bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ stages:
storage:
spec:
mountPath: {}
- image: quay.io/operator-framework/scorecard-test-kuttl:v2.0.0
labels:
suite: kuttlsuite
test: kuttltest1
storage:
spec:
mountPath: {}
storage:
spec:
mountPath: {}
14 changes: 14 additions & 0 deletions bundle/tests/scorecard/kuttl/kuttl-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
crdDir: ./tests/_build/crds/
artifactsDir: ./tests/_build/artifacts/
kindContainers:
- local/opentelemetry-operator:e2e
commands:
# - command: make cert-manager
- command: kubectl apply -f ./tests/_build/manifests/01-opentelemetry-operator.yaml
- command: kubectl wait --timeout=5m --for=condition=available deployment opentelemetry-operator-controller-manager -n opentelemetry-operator-system
- command: sleep 5s
testDirs:
- ./tests/e2e/
timeout: 150
64 changes: 64 additions & 0 deletions bundle/tests/scorecard/kuttl/smoketest/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: simplest-collector
status:
readyReplicas: 1

---

apiVersion: v1
kind: Service
metadata:
name: simplest-collector-headless
spec:
ports:
- appProtocol: grpc
name: jaeger-grpc
port: 14250
protocol: TCP
targetPort: 14250
- appProtocol: grpc
name: otlp-grpc
port: 4317
protocol: TCP
targetPort: 4317
- appProtocol: http
name: otlp-http
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318

---

apiVersion: v1
kind: Service
metadata:
name: simplest-collector
spec:
ports:
- appProtocol: grpc
name: jaeger-grpc
port: 14250
protocol: TCP
targetPort: 14250
- appProtocol: grpc
name: otlp-grpc
port: 4317
protocol: TCP
targetPort: 4317
- appProtocol: http
name: otlp-http
port: 4318
protocol: TCP
targetPort: 4318
- appProtocol: http
name: otlp-http-legacy
port: 55681
protocol: TCP
targetPort: 4318
25 changes: 25 additions & 0 deletions bundle/tests/scorecard/kuttl/smoketest/00-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
config: |
receivers:
jaeger:
protocols:
grpc:
otlp:
protocols:
grpc:
http:
processors:

exporters:
logging:

service:
pipelines:
traces:
receivers: [jaeger,otlp]
processors: []
exporters: [logging]
4 changes: 2 additions & 2 deletions config/scorecard/bases/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kind: Configuration
metadata:
name: config
stages:
- parallel: true
tests: []
- parallel: true
tests: []
6 changes: 6 additions & 0 deletions config/scorecard/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ patchesJson6902:
version: v1alpha3
kind: Configuration
name: config
- path: patches/smoke.config.yaml
target:
group: scorecard.operatorframework.io
version: v1alpha3
kind: Configuration
name: config
#+kubebuilder:scaffold:patchesJson6902
7 changes: 7 additions & 0 deletions config/scorecard/patches/smoke.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- op: add
path: /stages/0/tests/-
value:
image: quay.io/operator-framework/scorecard-test-kuttl:v2.0.0
labels:
suite: kuttlsuite
test: kuttltest1