mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-02 00:02:01 +00:00
tests: k8s-footloose.bats allow all policy
Use the "allow all" policy for k8s-footloose.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:
parent
18f5e55667
commit
be3797ef7c
@ -23,6 +23,10 @@ setup() {
|
|||||||
sed -e "/\${ssh_key}/r ${public_key_path}" -e "/\${ssh_key}/d" \
|
sed -e "/\${ssh_key}/r ${public_key_path}" -e "/\${ssh_key}/d" \
|
||||||
"${pod_config_dir}/footloose-configmap.yaml" > "$configmap_yaml"
|
"${pod_config_dir}/footloose-configmap.yaml" > "$configmap_yaml"
|
||||||
sed -i 's/ssh-rsa/ ssh-rsa/' "$configmap_yaml"
|
sed -i 's/ssh-rsa/ ssh-rsa/' "$configmap_yaml"
|
||||||
|
|
||||||
|
# Add an "allow all" policy to the pod yaml file.
|
||||||
|
pod_yaml="${pod_config_dir}/pod-footloose.yaml"
|
||||||
|
add_allow_all_policy_to_yaml "${pod_yaml}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "Footloose pod" {
|
@test "Footloose pod" {
|
||||||
@ -33,7 +37,7 @@ setup() {
|
|||||||
kubectl create -f "$configmap_yaml"
|
kubectl create -f "$configmap_yaml"
|
||||||
|
|
||||||
# Create pod
|
# Create pod
|
||||||
kubectl create -f "${pod_config_dir}/pod-footloose.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"
|
||||||
|
Loading…
Reference in New Issue
Block a user