mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-25 18:53:44 +00:00
Merge pull request #11651 from microsoft/danmihai1/debug-kubectl-logs
tests: k8s-sandbox-vcpus-allocation debug info
This commit is contained in:
@@ -26,6 +26,9 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "Check the number vcpus are correctly allocated to the sandbox" {
|
@test "Check the number vcpus are correctly allocated to the sandbox" {
|
||||||
|
local pod
|
||||||
|
local log
|
||||||
|
|
||||||
# Create the pods
|
# Create the pods
|
||||||
kubectl create -f "${yaml_file}"
|
kubectl create -f "${yaml_file}"
|
||||||
|
|
||||||
@@ -34,7 +37,13 @@ setup() {
|
|||||||
|
|
||||||
# Check the pods
|
# Check the pods
|
||||||
for i in {0..2}; do
|
for i in {0..2}; do
|
||||||
[ `kubectl logs ${pods[$i]}` -eq ${expected_vcpus[$i]} ]
|
pod="${pods[$i]}"
|
||||||
|
bats_unbuffered_info "Getting log for pod: ${pod}"
|
||||||
|
|
||||||
|
log=$(kubectl logs "${pod}")
|
||||||
|
bats_unbuffered_info "Log: ${log}"
|
||||||
|
|
||||||
|
[ "${log}" -eq "${expected_vcpus[$i]}" ]
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user