Skip to content

Commit

Permalink
adjust metrics integration test to check if 2 providers of the same t…
Browse files Browse the repository at this point in the history
…ype work

Signed-off-by: Moritz Wiesinger <[email protected]>
  • Loading branch information
mowies committed Apr 18, 2023
1 parent 177390c commit 36ecbb6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/integration/metrics/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ spec:
type: prometheus
targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
---
apiVersion: metrics.keptn.sh/v1alpha3
kind: KeptnMetricsProvider
metadata:
name: my-provider2
spec:
type: prometheus
targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090"
---
apiVersion: metrics.keptn.sh/v1alpha2
kind: KeptnMetricsProvider
metadata:
Expand Down
1 change: 1 addition & 0 deletions test/integration/metrics/01-teststep-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ kind: TestStep
apply:
- goodmetric1.yaml
- goodmetric2.yaml
- goodmetric3.yaml
2 changes: 2 additions & 0 deletions test/integration/metrics/02-teststep-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep
assert: # this checks that kubectl get resource succeeds
- goodmetric1.yaml
- goodmetric2.yaml
- goodmetric3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ kind: TestStep
commands:
- script: ./retrieve-metrics.sh "podtato-head1"
- script: ./retrieve-metrics.sh "podtato-head2"
- script: ./retrieve-metrics.sh "podtato-head3"
9 changes: 9 additions & 0 deletions test/integration/metrics/goodmetric3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: metrics.keptn.sh/v1alpha3
kind: KeptnMetric
metadata:
name: podtato-head3
spec:
provider:
name: "my-provider2"
query: "sum(kube_pod_container_resource_limits{resource='cpu'})"
fetchIntervalSeconds: 5

0 comments on commit 36ecbb6

Please sign in to comment.