From 2553d1905ea8a76cd9d9a6a0a8c6e48c8d8c0dab Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 25 May 2003 13:27:08 +0000 Subject: [PATCH] Add six-vol-test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@537 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/README | 12 ++ regress/all-non-root-tests | 1 + regress/scripts/.cvsignore | 1 + regress/scripts/copy-testa-confs | 5 + regress/scripts/do_sed | 1 + regress/scripts/testa-bacula-dir.conf.in | 150 +++++++++++++++++++++++ regress/tests/six-vol-test | 54 ++++++++ regress/tests/test0 | 1 + 8 files changed, 225 insertions(+) create mode 100755 regress/scripts/copy-testa-confs create mode 100644 regress/scripts/testa-bacula-dir.conf.in create mode 100755 regress/tests/six-vol-test diff --git a/regress/README b/regress/README index fb6547d156..ad5056c4e2 100644 --- a/regress/README +++ b/regress/README @@ -71,3 +71,15 @@ to do: this cleans up any files that may be created with root permissions. +If you want to add more tests, do so by putting the shell script +in the tests subdirectory. Be careful when adding (or better not) +new clients, pools, and such to the test-bacula-dir.conf.in file +as it may invalidate a good number of tests, which respond to +questions by answering with a number (i.e. the order of the selection +list is known). It might be better to add your own testb-bacula... +configuration file. + +To avoid re-doing a make setup if you have made a change to the +conf files, and you do not need a new copy of the source, you can simply do: + + scripts/do-sed diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index 21b32098c4..4a5ae26998 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -11,6 +11,7 @@ tests/sparse-compressed-test tests/wierd-files-test tests/two-jobs-test tests/two-vol-test +tests/six-vol-test echo " " echo " " echo "Test results" diff --git a/regress/scripts/.cvsignore b/regress/scripts/.cvsignore index 8e10c79323..61a0e7ea65 100644 --- a/regress/scripts/.cvsignore +++ b/regress/scripts/.cvsignore @@ -6,3 +6,4 @@ test-bacula-dir.conf test-bacula-fd.conf test-bacula-sd.conf test-console.conf +testa-bacula-dir.conf diff --git a/regress/scripts/copy-testa-confs b/regress/scripts/copy-testa-confs new file mode 100755 index 0000000000..0574b9a638 --- /dev/null +++ b/regress/scripts/copy-testa-confs @@ -0,0 +1,5 @@ +#!/bin/sh +/bin/cp -f scripts/testa-bacula-dir.conf bin/bacula-dir.conf +/bin/cp -f scripts/test-bacula-sd.conf bin/bacula-sd.conf +/bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf +/bin/cp -f scripts/test-console.conf bin/console.conf diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 2fba967bef..69bd330c09 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -12,6 +12,7 @@ echo "s%@tmpdir@%${cwd}/tmp%g" >>${out} # process .in files with sed script sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf +sed -f ${out} ${cwd}/scripts/testa-bacula-dir.conf.in >${cwd}/scripts/testa-bacula-dir.conf sed -f ${out} ${cwd}/scripts/test-bacula-fd.conf.in >${cwd}/scripts/test-bacula-fd.conf sed -f ${out} ${cwd}/scripts/test-bacula-sd.conf.in >${cwd}/scripts/test-bacula-sd.conf sed -f ${out} ${cwd}/scripts/test-console.conf.in >${cwd}/scripts/test-console.conf diff --git a/regress/scripts/testa-bacula-dir.conf.in b/regress/scripts/testa-bacula-dir.conf.in new file mode 100644 index 0000000000..554f71bc48 --- /dev/null +++ b/regress/scripts/testa-bacula-dir.conf.in @@ -0,0 +1,150 @@ +# +# TestA Bacula Director Configuration file +# +# For Bacula release 1.30 (12 April 2003) -- redhat 7.3 +# + +Director { # define myself + Name = rufus-dir + DIRport = 8101 # where we listen for UA connections + QueryFile = "@scriptdir@/query.sql" + WorkingDirectory = "@working_dir@" + PidDirectory = "@piddir@" + SubSysDirectory = "@subsysdir@" + Maximum Concurrent Jobs = 1 + Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password + Messages = Standard +} + + +Job { + Name = "MultiVol" + Type = Backup + Client=rufus-fd + Level = Full + FileSet="Full Set" + Storage = File + Messages = Standard + Write Bootstrap = "@working_dir@/SmallVols.bsr" + Pool = SmallVols +} + + +Job { + Name = "VerifyVolume" + Type = Verify + Level = VolumeToCatalog + Client=rufus-fd + FileSet="Full Set" + Storage = File + Messages = Standard + Pool = Default + Write Bootstrap = "@working_dir@/NightlySave.bsr" +} + + + +# Standard Restore template, to be changed by Console program +Job { + Name = "RestoreFiles" + Type = Restore + Client=rufus-fd + FileSet="Full Set" + Storage = File + Messages = Standard + Pool = Default + Where = /tmp/bacula-restores +} + + +# List of files to be backed up +FileSet { + Name = "Full Set" + Include = signature=SHA1 { + /tmp/file-list +# Create 56MB file with random data +echo "Creating a 56MB file with random data ..." +dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000 +echo "largefile created" +bin/bacula stop 2>&1 >/dev/null +bin/drop_sqlite_tables +bin/make_sqlite_tables + +echo " " +echo " " +echo " === Starting two-vol-test ===" +echo " " + +bin/bacula start +bin/console -c bin/console.conf <>test.out + echo " " +else + echo " ===== six-vol-test Bacula source OK ===== " + echo " ===== six-vol-test OK ===== " >>test.out + rm -rf tmp/bacula-restores tmp/SmallVols* tmp/largefile +fi diff --git a/regress/tests/test0 b/regress/tests/test0 index 8a6da1bf99..0d0edd0b85 100755 --- a/regress/tests/test0 +++ b/regress/tests/test0 @@ -1,2 +1,3 @@ #!/bin/sh echo " " >test.out +rm -f bin/working/* -- 2.39.5