Skip to content

Commit e634dca

Browse files
authored
test: add global priorityClassName test case (#108)
* test: add global priorityClassName test case * chore: bump chart version
1 parent c41d254 commit e634dca

File tree

3 files changed

+96
-1
lines changed

3 files changed

+96
-1
lines changed

charts/steadybit-extension-dynatrace/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: steadybit-extension-dynatrace
33
description: Steadybit Dynatrace extension Helm chart for Kubernetes.
4-
version: 1.1.21
4+
version: 1.1.22
55
appVersion: v1.0.16
66
home: https://www.steadybit.com/
77
icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png

charts/steadybit-extension-dynatrace/tests/__snapshot__/deployment_test.yaml.snap

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,93 @@ manifest should match snapshot with extra labels:
364364
type: RuntimeDefault
365365
serviceAccountName: steadybit-extension-dynatrace
366366
volumes: null
367+
manifest should match snapshot with global priority class:
368+
1: |
369+
apiVersion: apps/v1
370+
kind: Deployment
371+
metadata:
372+
labels:
373+
steadybit.com/discovery-disabled: "true"
374+
steadybit.com/extension: "true"
375+
name: RELEASE-NAME-steadybit-extension-dynatrace
376+
namespace: NAMESPACE
377+
spec:
378+
replicas: 1
379+
selector:
380+
matchLabels:
381+
app.kubernetes.io/instance: RELEASE-NAME
382+
app.kubernetes.io/name: steadybit-extension-dynatrace
383+
template:
384+
metadata:
385+
annotations:
386+
oneagent.dynatrace.com/injection: "false"
387+
labels:
388+
app.kubernetes.io/instance: RELEASE-NAME
389+
app.kubernetes.io/name: steadybit-extension-dynatrace
390+
steadybit.com/discovery-disabled: "true"
391+
steadybit.com/extension: "true"
392+
spec:
393+
containers:
394+
- env:
395+
- name: STEADYBIT_LOG_LEVEL
396+
value: INFO
397+
- name: STEADYBIT_LOG_FORMAT
398+
value: text
399+
- name: STEADYBIT_EXTENSION_API_TOKEN
400+
valueFrom:
401+
secretKeyRef:
402+
key: api-token
403+
name: steadybit-extension-dynatrace
404+
- name: STEADYBIT_EXTENSION_API_BASE_URL
405+
value: null
406+
- name: STEADYBIT_EXTENSION_UI_BASE_URL
407+
value: null
408+
- name: STEADYBIT_EXTENSION_UI_PROBLEMS_PATH
409+
value: /apps/dynatrace.classic.problems/#problems/problemdetails
410+
image: ghcr.io/steadybit/extension-dynatrace:v0.0.0
411+
imagePullPolicy: IfNotPresent
412+
livenessProbe:
413+
failureThreshold: 5
414+
httpGet:
415+
path: /health/liveness
416+
port: 8091
417+
initialDelaySeconds: 10
418+
periodSeconds: 10
419+
successThreshold: 1
420+
timeoutSeconds: 5
421+
name: extension
422+
ports:
423+
- containerPort: 8090
424+
readinessProbe:
425+
failureThreshold: 3
426+
httpGet:
427+
path: /health/readiness
428+
port: 8091
429+
initialDelaySeconds: 10
430+
periodSeconds: 10
431+
successThreshold: 1
432+
timeoutSeconds: 1
433+
resources:
434+
limits:
435+
cpu: 200m
436+
memory: 128Mi
437+
requests:
438+
cpu: 50m
439+
memory: 32Mi
440+
securityContext:
441+
allowPrivilegeEscalation: false
442+
capabilities:
443+
drop:
444+
- ALL
445+
readOnlyRootFilesystem: true
446+
volumeMounts: null
447+
priorityClassName: my-global-priority-class
448+
securityContext:
449+
runAsNonRoot: true
450+
seccompProfile:
451+
type: RuntimeDefault
452+
serviceAccountName: steadybit-extension-dynatrace
453+
volumes: null
367454
manifest should match snapshot with mutual TLS:
368455
1: |
369456
apiVersion: apps/v1

charts/steadybit-extension-dynatrace/tests/deployment_test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,11 @@ tests:
8080
priorityClassName: my-priority-class
8181
asserts:
8282
- matchSnapshot: {}
83+
84+
- it: manifest should match snapshot with global priority class
85+
set:
86+
global:
87+
priorityClassName: my-global-priority-class
88+
asserts:
89+
- matchSnapshot: {}
90+

0 commit comments

Comments
 (0)