Skip to content

Commit f113df8

Browse files
committed
testsuite: cover --skip-gc
Problem: no tests show that flux shutdown --skip-gc prevent a scheduled dump from happening. Add a test.
1 parent fe5e897 commit f113df8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

t/t2808-shutdown-cmd.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,5 +315,20 @@ test_expect_success 'clean up dump files from previous tests' '
315315
rm -f dump.tgz &&
316316
rm -f dump/RESTORE
317317
'
318+
test_expect_success 'submit batch with dump=auto and wait for it to start (8)' '
319+
cat >batch.sh <<-EOT &&
320+
#!/bin/sh
321+
touch job8-has-started
322+
flux run sleep 300
323+
EOT
324+
chmod +x batch.sh &&
325+
flux batch -t30m -n1 \
326+
--broker-opts=-Scontent.dump=auto batch.sh >jobid8 &&
327+
$waitfile job8-has-started
328+
'
329+
test_expect_success 'shutdown --skip-gc does not produce dump' '
330+
FLUX_URI=$(flux uri --local $(cat jobid8)) flux shutdown --skip-gc &&
331+
test_must_fail tar tvf dump/RESTORE
332+
'
318333

319334
test_done

0 commit comments

Comments
 (0)