From 1164fc23f1699b1635a89c94713586d68e947b95 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 7 Sep 2007 14:54:07 +0000 Subject: [PATCH] First cut multi-client test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5494 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/do_sed | 2 +- ...onf.in => multi-client-bacula-dir.conf.in} | 6 +- regress/tests/multi-client-test | 84 +++++++++++++++++++ 3 files changed, 88 insertions(+), 4 deletions(-) rename regress/scripts/{multihost-bacula-dir.conf.in => multi-client-bacula-dir.conf.in} (99%) create mode 100644 regress/tests/multi-client-test diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 17f39a448a..2f46089e98 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -32,7 +32,7 @@ echo "s%@hostname3_password@%${hostname3_password}%g" >>${out} # process .in files with sed script sed -f ${out} ${cwd}/scripts/bacula-dir.conf.errors.in >${cwd}/scripts/bacula-dir.conf.errors sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf -sed -f ${out} ${cwd}/scripts/multihost-bacula-dir.conf.in >${cwd}/scripts/multihost-bacula-dir.conf +sed -f ${out} ${cwd}/scripts/multi-client-bacula-dir.conf.in >${cwd}/scripts/multi-client-bacula-dir.conf sed -f ${out} ${cwd}/scripts/bacula-dir.conf.regexwhere.in >${cwd}/scripts/bacula-dir.conf.regexwhere sed -f ${out} ${cwd}/scripts/bacula-dir.conf.maxtime.in >${cwd}/scripts/bacula-dir.conf.maxtime sed -f ${out} ${cwd}/scripts/new-test-bacula-dir.conf.in >${cwd}/scripts/new-test-bacula-dir.conf diff --git a/regress/scripts/multihost-bacula-dir.conf.in b/regress/scripts/multi-client-bacula-dir.conf.in similarity index 99% rename from regress/scripts/multihost-bacula-dir.conf.in rename to regress/scripts/multi-client-bacula-dir.conf.in index 479387b4dc..3ee7eba306 100644 --- a/regress/scripts/multihost-bacula-dir.conf.in +++ b/regress/scripts/multi-client-bacula-dir.conf.in @@ -279,7 +279,7 @@ Client { Client { Name = @hostname1@-fd Address = @hostname1@ - FDPort = 8102 + FDPort = 9102 Catalog = MyCatalog Password = "@hostname1_password@" # password for FileDaemon File Retention = 30d # 30 days @@ -291,7 +291,7 @@ Client { Client { Name = @hostname2@-fd Address = @hostname2@ - FDPort = 8102 + FDPort = 9102 Catalog = MyCatalog Password = "@hostname2_password@" # password for FileDaemon Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon @@ -304,7 +304,7 @@ Client { Client { Name = @hostname3@-fd Address = @hostname3@ - FDPort = 8102 + FDPort = 9102 Catalog = MyCatalog Password = "@hostname3_password@" # password for FileDaemon File Retention = 30d # 30 days diff --git a/regress/tests/multi-client-test b/regress/tests/multi-client-test new file mode 100644 index 0000000000..fa426143d6 --- /dev/null +++ b/regress/tests/multi-client-test @@ -0,0 +1,84 @@ +#!/bin/sh +# +# Run four jobs at the same time, with two Volumes. +# Set max Vol bytes of first volume +# to less than total backup to force Bacula to use the second +# Volume. +# +TestName="multi-client-test" +JobName=Multi-client +. scripts/functions + +scripts/cleanup +scripts/copy-test-confs +/bin/cp -f scripts/multi-client-bacula-dir.conf bin/bacula-dir.conf + +change_jobname NightlySave $JobName +start_test + +cat <tmp/bconcmds +@output /dev/null +messages +@$out tmp/log1.out +label storage=File1 +TestVolume001 +label storage=File1 +TestVolume002 +update Volume=TestVolume001 MaxVolBytes=200000000 +@#50000000 +@#12 +@#setdebug level=51 Storage=File1 +status storage=File1 +llist volume=TestVolume001 +llist volume=TestVolume002 +run job=${hostname1} level=Full Storage=File1 +yes +llist volume=TestVolume001 +llist volume=TestVolume002 +run job=${hostname2} level=Full Storage=File1 +yes +reload +llist volume=TestVolume001 +llist volume=TestVolume002 +run job=${hostname3} level=Full Storage=File1 +yes +llist volume=TestVolume001 +llist volume=TestVolume002 +status storage=File1 +run job=$JobName level=Full Storage=File1 +yes +status storage=File1 +@sleep 2 +status dir +status storage=File1 +llist volume=TestVolume001 +llist volume=TestVolume002 +@sleep 5 +messages +wait +status storage=File1 +messages +@# +@# now do a restore +@# +@$out tmp/log2.out +restore where=${cwd}/tmp/bacula-restores client=${hostname} select storage=File1 +unmark * +mark * +done +yes +wait +reload +reload +messages +@output +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File1 +stop_bacula + +check_two_logs +check_restore_diff +end_test -- 2.39.5