From: Eric Bollengier Date: Sun, 27 Feb 2011 14:45:52 +0000 (+0100) Subject: regress: Add remote fd test X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62f5d4b211fa226975af87030962dc0d8c120c14;p=bacula%2Fbacula regress: Add remote fd test --- diff --git a/regress/tests/remote-fd-test b/regress/tests/remote-fd-test new file mode 100755 index 0000000000..2d66dbb9e6 --- /dev/null +++ b/regress/tests/remote-fd-test @@ -0,0 +1,100 @@ +#!/bin/sh +# +# What to test +# ------------ +# - Normal backup +# - Weird backup +# - Restore +# - Accurate backup +# - Compression +# - Checksum +# - TLS/Encryption +# - compare files +# - runscript +# +# How to use this test +# -------------------- +# +# +TestName="remote-fd-test" +JobName=backup +. scripts/functions + +scripts/cleanup +scripts/copy-test-confs + +change_jobname NightlySave $JobName +change_jobname MonsterSave AccurateTest + +start_test + +echo $REMOTE_FILE/save > $tmp/file-list + +$bperl -e remote_stop +$bperl -e remote_init +$bperl -e remote_config + +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'clientrunbeforejob', '$REMOTE_FILE/save/test.sh', 'Job', 'CompressedTest')" +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'accurate', 'yes', 'Job', 'AccurateTest')" +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'address', '$REMOTE_ADDR', 'Client')" +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'password', '$REMOTE_PASSWORD', 'Client')" +$bperl -e "add_attribute('$conf/bacula-dir.conf', 'address', '$REMOTE_STORE_ADDR', 'Storage')" + +cat <${cwd}/tmp/bconcmds +@output +messages +@$out ${cwd}/tmp/log1.out +status client +label storage=File volume=TestVolume001 +run job=$JobName storage=File yes +wait +messages +@# +@# now do a restore +@# +@$out ${cwd}/tmp/log2.out +restore where=$REMOTE_FILE/restore select all done storage=File +yes +wait +messages +@$out ${cwd}/tmp/log3.out +@# +@# make some runscript tests +@# +run job=CompressedTest storage=File yes +wait +messages +@$out ${cwd}/tmp/log1.out +@# +@# make some accurate tests +@# +run job=AccurateTest storage=File yes +wait +messages +run job=AccurateTest storage=File yes +wait +messages +@output +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs + +grep 'this is a script' $tmp/log3.out > /dev/null +if [ $? != 0 ]; then + print_debug "ERROR: Can't find runscript output" + bstat=1 +fi + +$bperl -e remote_diff +if [ $? != 0 ]; then + dstat=1 +fi + +$bperl -e remote_stop + +end_test