Skip to content

Commit

Permalink
testsuite: add system recovery test
Browse files Browse the repository at this point in the history
Problem: there are no tests for system instance recovery.

Add system/0004-recovery.t.
  • Loading branch information
garlick committed Nov 29, 2022
1 parent 0ff8b8e commit debbab8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ dist_check_SCRIPTS = \
system/0001-basic.t \
system/0002-job-exec-sdexec-basic.t \
system/0003-instance-restart.t \
system/0004-recovery.t \
issues/t0441-kvs-put-get.sh \
issues/t0505-msg-handler-reg.lua \
issues/t0821-kvs-segfault.sh \
Expand Down
22 changes: 22 additions & 0 deletions t/system/0004-recovery.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Ensure flux start --recover works on the system instance
#

test_expect_success 'dump the last checkpoint' '
sudo -u flux flux dump --checkpoint /tmp/dump.tar
'
test_expect_success 'flux start --recover fails when instance is running' '
test_must_fail sudo -u flux flux start --recover /bin/true
'
test_expect_success 'stop the system instance' '
sudo flux shutdown
'
test_expect_success 'flux start --recover works' '
sudo -u flux flux start --recover /bin/true
'
test_expect_success 'flux start --recover works from dump file' '
sudo -u flux flux start --recover=/tmp/dump.tar --sysconfig /bin/true
'
test_expect_success 'restart flux' '
sudo systemctl start flux
'

0 comments on commit debbab8

Please sign in to comment.