mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-11-01 10:01:33 +00:00
Let's keep both checks for now, but in the future we'll be able to remove the check for "firecracker", as the hypervisor name used as part of the GitHub Actions has to match what's used as part of the kata-deploy stuff, which is `fc` (as in `kata-fc for the runtime class) instead of `firecracker`. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
49 lines
1.5 KiB
Bash
49 lines
1.5 KiB
Bash
#!/usr/bin/env bats
|
|
#
|
|
# Copyright (c) 2021 Apple Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
load "${BATS_TEST_DIRNAME}/../../common.bash"
|
|
load "${BATS_TEST_DIRNAME}/tests_common.sh"
|
|
|
|
setup() {
|
|
[ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}"
|
|
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
|
|
get_pod_config_dir
|
|
}
|
|
|
|
@test "configmap update works, and preserves symlinks" {
|
|
pod_name="inotify-configmap-testing"
|
|
|
|
# Create configmap for my deployment
|
|
kubectl apply -f "${pod_config_dir}"/inotify-configmap.yaml
|
|
|
|
# Create deployment that expects identity-certs
|
|
kubectl apply -f "${pod_config_dir}"/inotify-configmap-pod.yaml
|
|
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"
|
|
|
|
# Update configmap
|
|
kubectl apply -f "${pod_config_dir}"/inotify-updated-configmap.yaml
|
|
|
|
# Ideally we'd wait for the pod to complete...
|
|
sleep 120
|
|
|
|
# Verify we saw the update
|
|
result=$(kubectl get pod "$pod_name" --output="jsonpath={.status.containerStatuses[]}")
|
|
echo $result | grep -vq Error
|
|
|
|
kubectl delete configmap cm
|
|
}
|
|
|
|
|
|
|
|
teardown() {
|
|
[ "${KATA_HYPERVISOR}" == "firecracker" ] && skip "test not working see: ${fc_limitations}"
|
|
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
|
|
# Debugging information
|
|
kubectl describe "pod/$pod_name"
|
|
kubectl delete pod "$pod_name"
|
|
}
|