mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-31 11:26:47 +00:00
tests: k8s-inotify.bats: don't leak configmap
Delete the configmap if the test failed, not just on the successful path. Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
parent
f13d13c8fa
commit
ccfb7faa1b
@ -40,8 +40,6 @@ setup() {
|
|||||||
# Verify we saw the update
|
# Verify we saw the update
|
||||||
result=$(kubectl get pod "$pod_name" --output="jsonpath={.status.containerStatuses[]}")
|
result=$(kubectl get pod "$pod_name" --output="jsonpath={.status.containerStatuses[]}")
|
||||||
echo $result | grep -vq Error
|
echo $result | grep -vq Error
|
||||||
|
|
||||||
kubectl delete configmap cm
|
|
||||||
}
|
}
|
||||||
|
|
||||||
teardown() {
|
teardown() {
|
||||||
@ -49,7 +47,10 @@ teardown() {
|
|||||||
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
|
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
|
||||||
issue_url="https://github.com/kata-containers/kata-containers/issues/8906"
|
issue_url="https://github.com/kata-containers/kata-containers/issues/8906"
|
||||||
[ "${KATA_HYPERVISOR}" == "qemu-se" ] && skip "test not working for IBM Z LPAR (see ${issue_url})"
|
[ "${KATA_HYPERVISOR}" == "qemu-se" ] && skip "test not working for IBM Z LPAR (see ${issue_url})"
|
||||||
|
|
||||||
# Debugging information
|
# Debugging information
|
||||||
kubectl describe "pod/$pod_name"
|
kubectl describe "pod/$pod_name"
|
||||||
|
|
||||||
kubectl delete pod "$pod_name"
|
kubectl delete pod "$pod_name"
|
||||||
|
kubectl delete configmap cm
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user