diff --git a/test/integration/metrics/01-teststep-install.yaml b/test/integration/metrics/01-teststep-install.yaml index 63bd101959..df18fd2531 100644 --- a/test/integration/metrics/01-teststep-install.yaml +++ b/test/integration/metrics/01-teststep-install.yaml @@ -5,6 +5,7 @@ apply: - goodmetric2.yaml - goodmetric3.yaml - goodmetric4.yaml + - goodmetric5.yaml commands: - - command: kubectl apply -f badmetric.yaml + - command: kubectl apply -f badmetric1.yaml badmetric2.yaml ignoreFailure: true # we must install ignoring the validating webhook error to proceed with the test diff --git a/test/integration/metrics/02-teststep-assert.yaml b/test/integration/metrics/02-teststep-assert.yaml index f81d486c75..800b17487b 100644 --- a/test/integration/metrics/02-teststep-assert.yaml +++ b/test/integration/metrics/02-teststep-assert.yaml @@ -1,9 +1,11 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep error: # this checks that kubectl get resource fails, AKA bad CRD not added - - badmetric.yaml + - badmetric1.yaml + - badmetric2.yaml assert: # this checks that kubectl get resource succeeds - goodmetric1.yaml - goodmetric2.yaml - goodmetric3.yaml - goodmetric4.yaml + - goodmetric5.yaml diff --git a/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml b/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml index 5041c54e85..6f140506ec 100644 --- a/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml +++ b/test/integration/metrics/03-teststep-retrieve-metrics-via-api.yaml @@ -5,3 +5,4 @@ commands: - script: ./retrieve-metrics.sh "podtato-head2" - script: ./retrieve-metrics.sh "podtato-head3" - script: ./retrieve-metrics.sh "podtato-head4" + - script: ./retrieve-metrics.sh "podtato-head5" diff --git a/test/integration/metrics/badmetric.yaml b/test/integration/metrics/badmetric1.yaml similarity index 100% rename from test/integration/metrics/badmetric.yaml rename to test/integration/metrics/badmetric1.yaml diff --git a/test/integration/metrics/badmetric2.yaml b/test/integration/metrics/badmetric2.yaml new file mode 100644 index 0000000000..05d6088d65 --- /dev/null +++ b/test/integration/metrics/badmetric2.yaml @@ -0,0 +1,12 @@ +apiVersion: metrics.keptn.sh/v1alpha3 +kind: KeptnMetric +metadata: + name: podtato-head1 +spec: + provider: + name: "my-provider" + query: "sum(kube_pod_container_resource_limits{resource='cpu'})" + fetchIntervalSeconds: 5 + range: + interval: "5m" + step: "1mins" diff --git a/test/integration/metrics/goodmetric5.yaml b/test/integration/metrics/goodmetric5.yaml new file mode 100644 index 0000000000..1e2f92bb73 --- /dev/null +++ b/test/integration/metrics/goodmetric5.yaml @@ -0,0 +1,12 @@ +apiVersion: metrics.keptn.sh/v1alpha3 +kind: KeptnMetric +metadata: + name: podtato-head5 +spec: + provider: + name: "my-provider2" + query: "sum(kube_pod_container_resource_limits{resource='cpu'})" + fetchIntervalSeconds: 5 + range: + interval: "5m" + step: "1m" \ No newline at end of file