Skip to content

Commit

Permalink
Fixed and added reload-test
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jan 27, 2016
1 parent f054658 commit 5dee4e3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
1 change: 1 addition & 0 deletions DartTestfile.txt.in
@@ -1,3 +1,4 @@
ADD_TEST(disk:reload-test "@regressdir@/tests/reload-test")
ADD_TEST(disk:secure-erase-test "@regressdir@/tests/secure-erase-test")
ADD_TEST(disk:migrate-sd-sd-test "@regressdir@/tests/migration-volume-sd-sd-test")
ADD_TEST(disk:acl-xattr-test "@regressdir@/tests/acl-xattr-test")
Expand Down
43 changes: 26 additions & 17 deletions tests/reload-test
Expand Up @@ -54,7 +54,7 @@ fi

$bin/bareos-ctl-dir start >/dev/null
pid=`cat $working/bareos-dir.$BASEPORT.pid`
read a

sleep 2

ls -l /proc/$pid/fd | grep bareos-dir.conf
Expand All @@ -68,22 +68,45 @@ do_reload

# backup the configuration
cp $conf/bareos-dir.conf $tmp/1


print_debug "Adding uncommented string to bareos-dir.conf"
cat >> $conf/bareos-dir.conf<<EOF
This is an error
EOF

detect_error
do_reload


print_debug "Adding empty job res bareos-dir.conf"
cp $tmp/1 $conf/bareos-dir.conf
cat >> $conf/bareos-dir.conf<<EOF
Job {
}
EOF
detect_error
do_reload


print_debug "Adding two identical Jobs to bareos-dir.conf"
cp $tmp/1 $conf/bareos-dir.conf
cat >> $conf/bareos-dir.conf<<EOF
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
Write Bootstrap = "/tmp/regress/working/Client1.bsr"
}
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
Write Bootstrap = "/tmp/regress/working/Client1.bsr"
}
EOF
detect_error
do_reload


print_debug "Adding second director to bareos-dir.conf"
cp $tmp/1 $conf/bareos-dir.conf
cat >> $conf/bareos-dir.conf<<EOF
Director {
Expand All @@ -101,22 +124,8 @@ EOF
detect_error
do_reload

cp $tmp/1 $conf/bareos-dir.conf
cat >> $conf/bareos-dir.conf<<EOF
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
Write Bootstrap = "/tmp/regress/working/Client1.bsr"
}
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
Write Bootstrap = "/tmp/regress/working/Client1.bsr"
}
EOF

detect_error
do_reload


$bin/bareos-ctl-dir stop >/dev/null

Expand Down

0 comments on commit 5dee4e3

Please sign in to comment.