mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-20 08:54:03 +00:00
tests: k8s-nginx-connectivity.bats policy
Use the "allow all" policy for k8s-nginx-connectivity.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
5dcf64ef34
commit
4211d93b87
@ -15,15 +15,19 @@ setup() {
|
||||
deployment="nginx-deployment"
|
||||
|
||||
get_pod_config_dir
|
||||
|
||||
# Create test .yaml
|
||||
yaml_file="${pod_config_dir}/test-${deployment}.yaml"
|
||||
|
||||
sed -e "s/\${nginx_version}/${nginx_image}/" \
|
||||
"${pod_config_dir}/${deployment}.yaml" > "${yaml_file}"
|
||||
|
||||
add_allow_all_policy_to_yaml "${yaml_file}"
|
||||
}
|
||||
|
||||
@test "Verify nginx connectivity between pods" {
|
||||
|
||||
# Create test .yaml
|
||||
sed -e "s/\${nginx_version}/${nginx_image}/" \
|
||||
"${pod_config_dir}/${deployment}.yaml" > "${pod_config_dir}/test-${deployment}.yaml"
|
||||
|
||||
kubectl create -f "${pod_config_dir}/test-${deployment}.yaml"
|
||||
kubectl create -f "${yaml_file}"
|
||||
kubectl wait --for=condition=Available --timeout=$timeout deployment/${deployment}
|
||||
kubectl expose deployment/${deployment}
|
||||
|
||||
@ -46,7 +50,7 @@ teardown() {
|
||||
kubectl get service/${deployment} -o yaml
|
||||
kubectl get endpoints/${deployment} -o yaml
|
||||
|
||||
rm -f "${pod_config_dir}/test-${deployment}.yaml"
|
||||
rm -f "${yaml_file}"
|
||||
kubectl delete deployment "$deployment"
|
||||
kubectl delete service "$deployment"
|
||||
kubectl delete pod "$busybox_pod"
|
||||
|
Loading…
Reference in New Issue
Block a user