File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/integration-tests/bash Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 16
16
# PV_ROOT The root directory on the kubernetes cluster
17
17
# used for persistent volumes.
18
18
#
19
+ # LEASE_ID Set this if you want cleanup to release the
20
+ # given lease on a failure.
21
+ #
19
22
# See 'run.sh' for a detailed description of RESULT_ROOT and PV_ROOT.
20
23
#
21
24
# --------------------
40
43
#
41
44
# Phase 4: Delete the local test output directory.
42
45
#
46
+ # Phase 5: If we own a lease, then release it on a failure
47
+ # see LEASE_ID above.
48
+ #
43
49
44
50
DOMAINS=(domain1 domain2 domain3 domain4 domain5)
45
51
DOMAIN_NAMESPACES=(default default test1 test2 default)
@@ -334,6 +340,18 @@ rm -f /tmp/test_suite.*
334
340
335
341
# Bye
336
342
343
+ if [ ! " $LEASE_ID " = " " ] && [ ! " $SUCCESS " = " 0" ]; then
344
+ # release the lease if we own it
345
+ ${SCRIPTPATH} /lease.sh -d " $LEASE_ID " > /tmp/release_lease.out 2>&1
346
+ if [ " $? " = " 0" ]; then
347
+ echo @@ Lease released.
348
+ else
349
+ echo @@ Lease could not be released:
350
+ cat /tmp/release_lease.out
351
+ fi
352
+ rm -f /tmp/release_lease.out
353
+ fi
354
+
337
355
echo @@ Exiting with status $SUCCESS
338
356
exit $SUCCESS
339
357
You can’t perform that action at this time.
0 commit comments