@@ -42,16 +42,23 @@ setup_file() {
4242 helm repo add nvidia https://helm.ngc.nvidia.com/nvidia && helm repo update
4343}
4444
45+ bats::on_failure () {
46+ echo -e " \n\nFAILURE HOOK START"
47+ log_objects
48+ show_kubelet_plugin_error_logs
49+ get_all_cd_daemon_logs_for_cd_name " imex-channel-injection" || true
50+ echo -e " FAILURE HOOK END\n\n"
51+ }
52+
4553apply_check_delete_workload_imex_chan_inject () {
4654 kubectl apply -f demo/specs/imex/channel-injection.yaml
4755 kubectl wait --for=condition=READY pods imex-channel-injection --timeout=100s
4856 run kubectl logs imex-channel-injection
49- kubectl delete -f demo/specs/imex/channel-injection.yaml
50- # Check output after attempted deletion.
5157 assert_output --partial " channel0"
5258
5359 # Wait for deletion to complete; this is critical before moving on to the next
5460 # test (as long as we don't wipe state entirely between tests).
61+ kubectl delete -f demo/specs/imex/channel-injection.yaml
5562 kubectl wait --for=delete pods imex-channel-injection --timeout=10s
5663}
5764
@@ -101,12 +108,9 @@ log_objects() {
101108 kubectl get crd computedomains.resource.nvidia.com
102109}
103110
104- @test " wait for kubelet plugin pods READY" {
111+ @test " wait for plugin & controller pods READY" {
105112 kubectl wait --for=condition=READY pods -A \
106113 -l nvidia-dra-driver-gpu-component=kubelet-plugin --timeout=10s
107- }
108-
109- @test " wait for controller pod READY" {
110114 kubectl wait --for=condition=READY pods -A \
111115 -l nvidia-dra-driver-gpu-component=controller --timeout=10s
112116}
0 commit comments