diff --git a/test/testmetrics/metrics-hpa/01-assert.yaml b/test/testmetrics/metrics-hpa/01-assert.yaml index c56170d909..d7695db62e 100644 --- a/test/testmetrics/metrics-hpa/01-assert.yaml +++ b/test/testmetrics/metrics-hpa/01-assert.yaml @@ -1,15 +1,11 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: podtato-head-entry - labels: - app: podtato-head -spec: - selector: - matchLabels: - component: podtato-head-entry - replicas: 3 - template: - metadata: - labels: - component: podtato-head-entry +assert: deployment.yaml +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - type: pod + selector: app=podtato-head + - command: | + kubectl logs -l app=metrics-operator -n keptn-system + kubectl describe keptnmetric podtatometric -n $NAMESPACE + kubectl describe keptnmetricsprovider dynatrace -n $NAMESPACE + kubectl describe pods -l app=podtato-head -n $NAMESPACE diff --git a/test/testmetrics/metrics-hpa/deployment.yaml b/test/testmetrics/metrics-hpa/deployment.yaml new file mode 100644 index 0000000000..c56170d909 --- /dev/null +++ b/test/testmetrics/metrics-hpa/deployment.yaml @@ -0,0 +1,15 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: podtato-head-entry + labels: + app: podtato-head +spec: + selector: + matchLabels: + component: podtato-head-entry + replicas: 3 + template: + metadata: + labels: + component: podtato-head-entry diff --git a/test/testmetrics/metrics/02-teststep-assert.yaml b/test/testmetrics/metrics/02-teststep-assert.yaml index e6f95ad931..a7b57ee878 100644 --- a/test/testmetrics/metrics/02-teststep-assert.yaml +++ b/test/testmetrics/metrics/02-teststep-assert.yaml @@ -10,3 +10,11 @@ assert: # this checks that kubectl get resource succeeds - goodmetric3.yaml - goodmetric4.yaml - goodmetric5.yaml +collectors: + - type: pod + selector: app=test + - command: | + kubectl logs -l app=metrics-operator -n keptn-system + kubectl describe keptnmetric podtatometric -n $NAMESPACE + kubectl describe keptnmetricsprovider dynatrace -n $NAMESPACE + kubectl describe pods -l app=podtato-head -n $NAMESPACE