Skip to content

Commit 4758622

Browse files
authored
test: add global priorityClassName test case (#115)
* test: add global priorityClassName test case * chore: bump chart version
1 parent 4e4bf74 commit 4758622

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

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

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,100 @@ manifest should match snapshot with extra labels:
392392
name: tmp-dir
393393
- emptyDir: {}
394394
name: gatling-target-dir
395+
manifest should match snapshot with global priority class:
396+
1: |
397+
apiVersion: apps/v1
398+
kind: Deployment
399+
metadata:
400+
labels:
401+
steadybit.com/discovery-disabled: "true"
402+
steadybit.com/extension: "true"
403+
name: RELEASE-NAME-steadybit-extension-gatling
404+
namespace: NAMESPACE
405+
spec:
406+
replicas: 1
407+
selector:
408+
matchLabels:
409+
app.kubernetes.io/instance: RELEASE-NAME
410+
app.kubernetes.io/name: steadybit-extension-gatling
411+
template:
412+
metadata:
413+
annotations:
414+
oneagent.dynatrace.com/injection: "false"
415+
labels:
416+
app.kubernetes.io/instance: RELEASE-NAME
417+
app.kubernetes.io/name: steadybit-extension-gatling
418+
steadybit.com/discovery-disabled: "true"
419+
steadybit.com/extension: "true"
420+
spec:
421+
containers:
422+
- env:
423+
- name: STEADYBIT_EXTENSION_KUBERNETES_NODE_NAME
424+
valueFrom:
425+
fieldRef:
426+
fieldPath: spec.nodeName
427+
- name: STEADYBIT_EXTENSION_KUBERNETES_POD_NAME
428+
valueFrom:
429+
fieldRef:
430+
fieldPath: metadata.name
431+
- name: STEADYBIT_EXTENSION_KUBERNETES_NAMESPACE
432+
valueFrom:
433+
fieldRef:
434+
fieldPath: metadata.namespace
435+
- name: STEADYBIT_LOG_LEVEL
436+
value: INFO
437+
- name: STEADYBIT_LOG_FORMAT
438+
value: text
439+
image: ghcr.io/steadybit/extension-gatling:v0.0.0
440+
imagePullPolicy: IfNotPresent
441+
livenessProbe:
442+
failureThreshold: 5
443+
httpGet:
444+
path: /health/liveness
445+
port: 8088
446+
initialDelaySeconds: 10
447+
periodSeconds: 10
448+
successThreshold: 1
449+
timeoutSeconds: 5
450+
name: extension
451+
readinessProbe:
452+
failureThreshold: 3
453+
httpGet:
454+
path: /health/readiness
455+
port: 8088
456+
initialDelaySeconds: 10
457+
periodSeconds: 10
458+
successThreshold: 1
459+
timeoutSeconds: 1
460+
resources:
461+
limits:
462+
cpu: 2000m
463+
memory: 1Gi
464+
requests:
465+
cpu: 50m
466+
memory: 32Mi
467+
securityContext:
468+
allowPrivilegeEscalation: false
469+
capabilities:
470+
drop:
471+
- ALL
472+
readOnlyRootFilesystem: true
473+
volumeMounts:
474+
- mountPath: /tmp
475+
name: tmp-dir
476+
- mountPath: /opt/gatling/target
477+
name: gatling-target-dir
478+
priorityClassName: my-global-priority-class
479+
securityContext:
480+
runAsNonRoot: true
481+
seccompProfile:
482+
type: RuntimeDefault
483+
serviceAccountName: steadybit-extension-gatling
484+
volumes:
485+
- emptyDir: {}
486+
name: tmp-dir
487+
- emptyDir: {}
488+
name: gatling-target-dir
395489
manifest should match snapshot with insecureSkipVerify and custom certificates:
396490
1: |
397491
apiVersion: apps/v1

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,11 @@ tests:
127127
value: /etc/ssl/extra-certs:/etc/ssl/certs
128128
asserts:
129129
- matchSnapshot: { }
130+
131+
- it: manifest should match snapshot with global priority class
132+
set:
133+
global:
134+
priorityClassName: my-global-priority-class
135+
asserts:
136+
- matchSnapshot: {}
137+

0 commit comments

Comments
 (0)