Skip to content

Commit

Permalink
testsuite: cover --skip-gc
Browse files Browse the repository at this point in the history
Problem: no tests show that flux shutdown --skip-gc prevent
a scheduled dump from happening.

Add a test.
  • Loading branch information
garlick committed Mar 28, 2024
1 parent fe5e897 commit f113df8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions t/t2808-shutdown-cmd.t
Original file line number Diff line number Diff line change
Expand Up @@ -315,5 +315,20 @@ test_expect_success 'clean up dump files from previous tests' '
rm -f dump.tgz &&
rm -f dump/RESTORE
'
test_expect_success 'submit batch with dump=auto and wait for it to start (8)' '
cat >batch.sh <<-EOT &&
#!/bin/sh
touch job8-has-started
flux run sleep 300
EOT
chmod +x batch.sh &&
flux batch -t30m -n1 \
--broker-opts=-Scontent.dump=auto batch.sh >jobid8 &&
$waitfile job8-has-started
'
test_expect_success 'shutdown --skip-gc does not produce dump' '
FLUX_URI=$(flux uri --local $(cat jobid8)) flux shutdown --skip-gc &&
test_must_fail tar tvf dump/RESTORE
'

test_done

0 comments on commit f113df8

Please sign in to comment.