Skip to content

Commit 7d8a04a

Browse files
committed
Use BATS_TEST_TMPDIR and failfast on errors during cleanup
Signed-off-by: Shiva Krishna, Merla <[email protected]>
1 parent 4369dd0 commit 7d8a04a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/bats/test_gpu_stress.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _generate_pods_manifest() {
4444
kubectl apply -f tests/bats/specs/rc-shared-gpu.yaml
4545

4646
# Generate and apply pods spec
47-
manifest="${TMPDIR:-/tmp}/pods-shared-${loop}.yaml"
47+
manifest="${BATS_TEST_TMPDIR:-/tmp}/pods-shared-${loop}.yaml"
4848
_generate_pods_manifest "$manifest"
4949
kubectl apply -f "$manifest"
5050

@@ -66,7 +66,7 @@ _generate_pods_manifest() {
6666
# Cleanup
6767
kubectl delete pods -l 'env=batssuite,test=stress-shared' --timeout=90s
6868
kubectl delete -f tests/bats/specs/rc-shared-gpu.yaml --timeout=90s
69-
kubectl wait --for=delete pods -l 'env=batssuite,test=stress-shared' --timeout=60s || true
69+
kubectl wait --for=delete pods -l 'env=batssuite,test=stress-shared' --timeout=60s
7070

7171
if [[ "$loop" -lt "$STRESS_LOOPS" ]]; then
7272
echo "Sleeping ${STRESS_DELAY}s before next loop..."

0 commit comments

Comments
 (0)