Skip to content

Commit d3a5db7

Browse files
committed
e2e test that the PodConfig volume makes it into the backup pod
1 parent 6c3314d commit d3a5db7

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

e2e/definitions/backup/podconfig.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ spec:
1313
command: # Should not be in the final container
1414
- more
1515
- foo
16+
volumeMounts:
17+
- mountPath: /.cache
18+
name: cache
1619
env:
1720
- name: FOO
1821
value: bar
1922
securityContext:
2023
allowPrivilegeEscalation: true
24+
volumes:
25+
- name: cache
26+
emptyDir:
27+
sizeLimit: 100Mi

e2e/test-03-backup.bats

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@ DEBUG_DETIK="true"
5959

6060
secCont="$(kubectl -n "${DETIK_CLIENT_NAMESPACE}" get podConfig podconfig -ojson | jq -r '.spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation')"
6161
verify_job_pod_values 'k8up.io/owned-by=backup_k8up-backup' .spec.containers[0].securityContext.allowPrivilegeEscalation "${secCont}"
62+
63+
secCont="$(kubectl -n "${DETIK_CLIENT_NAMESPACE}" get podConfig podconfig -ojson | jq -r '.spec.template.spec.containers[0].volumeMounts[0].mountPath')"
64+
verify_job_pod_values 'k8up.io/owned-by=backup_k8up-backup' .spec.containers[0].volumeMounts[0].mountPath "${secCont}"
65+
66+
secCont="$(kubectl -n "${DETIK_CLIENT_NAMESPACE}" get podConfig podconfig -ojson | jq -r '.spec.template.spec.volumes[0].name')"
67+
verify_job_pod_values 'k8up.io/owned-by=backup_k8up-backup' .spec.volumes[0].name "${secCont}"
6268
}

0 commit comments

Comments
 (0)