mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 03:48:45 +00:00
tests: k8s-optional-empty-secret.bats policy
Use the "allow all" policy for k8s-optional-empty-secret.bats, instead of relying on the Kata Guest image to use the same policy as its default. Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
@@ -10,6 +10,9 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh"
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
get_pod_config_dir
|
get_pod_config_dir
|
||||||
|
|
||||||
|
pod_yaml="${pod_config_dir}/pod-optional-empty-secret.yaml"
|
||||||
|
add_allow_all_policy_to_yaml "${pod_yaml}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "Optional and Empty Secret Volume for a pod" {
|
@test "Optional and Empty Secret Volume for a pod" {
|
||||||
@@ -20,7 +23,7 @@ setup() {
|
|||||||
kubectl create secret generic "$secret_name"
|
kubectl create secret generic "$secret_name"
|
||||||
|
|
||||||
# Create a pod that consumes the "empty-secret" and "optional-missing-secret" Secrets as volumes
|
# Create a pod that consumes the "empty-secret" and "optional-missing-secret" Secrets as volumes
|
||||||
kubectl create -f "${pod_config_dir}/pod-optional-empty-secret.yaml"
|
kubectl create -f "${pod_yaml}"
|
||||||
|
|
||||||
# Check pod creation
|
# Check pod creation
|
||||||
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"
|
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"
|
||||||
|
Reference in New Issue
Block a user