Skip to content

Commit

Permalink
adapt integration test
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Sep 18, 2023
1 parent a617e31 commit 0661a5c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
envsubst < mock-server.yaml | kubectl apply -f -
# substitutes current time and namespace, making sure they are changed to env var first
# to prevent bad files in case of a test interrupt
kubectl apply -f mock-server.yaml
- script: |
envsubst < install.yaml | kubectl apply -f -
7 changes: 0 additions & 7 deletions test/integration/analysis-controller/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ apiVersion: metrics.keptn.sh/v1alpha3
kind: AnalysisValueTemplate
metadata:
name: ready
namespace: $NAMESPACE
spec:
provider:
name: my-mocked-provider
namespace: $NAMESPACE
query: 'sum(kube_pod_container_status_ready{namespace="{{.ns}}"})'
---
apiVersion: metrics.keptn.sh/v1alpha3
kind: AnalysisDefinition
metadata:
name: ed-my-proj-dev-svc1
namespace: $NAMESPACE
spec:
objectives:
- analysisValueTemplateRef:
name: ready
namespace: $NAMESPACE
target:
failure:
lessThan:
Expand All @@ -36,7 +32,6 @@ apiVersion: metrics.keptn.sh/v1alpha3
kind: Analysis
metadata:
name: analysis-sample
namespace: $NAMESPACE
spec:
timeframe:
from: 2023-09-14T07:33:19Z
Expand All @@ -45,13 +40,11 @@ spec:
"ns": "keptn-lifecycle-toolkit-system"
analysisDefinition:
name: ed-my-proj-dev-svc1
namespace: $NAMESPACE
---
apiVersion: metrics.keptn.sh/v1alpha3
kind: KeptnMetricsProvider
metadata:
name: my-mocked-provider
namespace: $NAMESPACE
spec:
type: prometheus
targetServer: "http://mockserver.$NAMESPACE.svc.cluster.local:1080"
3 changes: 0 additions & 3 deletions test/integration/analysis-controller/mock-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: mockserver
namespace: $NAMESPACE
spec:
ports:
- name: serviceport
Expand All @@ -20,7 +19,6 @@ metadata:
labels:
app: mockserver
name: mockserver
namespace: $NAMESPACE
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -83,7 +81,6 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: mockserver-config
namespace: $NAMESPACE
data:
initializerJson.json: |-
[
Expand Down

0 comments on commit 0661a5c

Please sign in to comment.