mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-05 11:36:56 +00:00
tests: k8s-sandbox-vcpus-allocation.bats policy
Use the "allow all" policy for k8s-sandbox-vcpus-allocation.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
4211d93b87
commit
f800bd86f6
@ -15,11 +15,14 @@ setup() {
|
||||
get_pod_config_dir
|
||||
pods=( "vcpus-less-than-one-with-no-limits" "vcpus-less-than-one-with-limits" "vcpus-more-than-one-with-limits" )
|
||||
expected_vcpus=( 1 1 2 )
|
||||
|
||||
yaml_file="${pod_config_dir}/pod-sandbox-vcpus-allocation.yaml"
|
||||
add_allow_all_policy_to_yaml "${yaml_file}"
|
||||
}
|
||||
|
||||
@test "Check the number vcpus are correctly allocated to the sandbox" {
|
||||
# Create the pods
|
||||
kubectl create -f "${pod_config_dir}/pod-sandbox-vcpus-allocation.yaml"
|
||||
kubectl create -f "${yaml_file}"
|
||||
|
||||
# Wait for completion
|
||||
kubectl wait --for=jsonpath='{.status.phase}'=Succeeded --timeout=$timeout pod --all
|
||||
@ -38,5 +41,5 @@ teardown() {
|
||||
kubectl logs ${pod}
|
||||
done
|
||||
|
||||
kubectl delete -f "${pod_config_dir}/pod-sandbox-vcpus-allocation.yaml"
|
||||
kubectl delete -f "${yaml_file}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user