Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Rewrite regression tests to use bperl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Jul 5, 2013
1 parent e00906f commit 680ba7f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 33 deletions.
16 changes: 4 additions & 12 deletions tests/backup-bareos-passive-test
Expand Up @@ -19,19 +19,11 @@ echo "s% Schedule =%# Schedule =%g" >${outf}
cp $scripts/bareos-dir.conf $tmp/1
sed -f ${outf} $tmp/1 >$scripts/bareos-dir.conf

dircfg=$conf/bareos-dir.conf
$bperl -e "add_attribute('$dircfg', 'passive', 'Yes', 'Client')"

# set passive to yes:
cp $scripts/bareos-dir.conf $tmp/1
echo 's#^Client {#Client { \n passive = yes \n#g' >${outf}
sed -f ${outf} $tmp/1 >$scripts/bareos-dir.conf

# set compatible to no in fd.conf
cp $scripts/bareos-fd.conf $tmp/1
echo 's#^FileDaemon {#FileDaemon { \n compatible = no \n#g' >${outf}
sed -f ${outf} $tmp/1 >$scripts/bareos-fd.conf



fdcfg=$conf/bareos-fd.conf
$bperl -e "add_attribute('$fdcfg', 'Compatible', 'No', 'FileDaemon')"

change_jobname BackupClient1 $JobName
start_test
Expand Down
10 changes: 3 additions & 7 deletions tests/data-encrypt-aes256-test
Expand Up @@ -8,17 +8,13 @@ TestName="data-encrypt-aes256-test"
JobName=Crypto-AES256
. scripts/functions


scripts/cleanup
scripts/copy-crypto-confs
echo "${cwd}/build" >${cwd}/tmp/file-list

outf="$tmp/sed_tmp"
# set compatible to no in fd.conf
cp $scripts/bareos-fd.conf $tmp/1
echo 's#^FileDaemon {#FileDaemon { \n compatible = no \n PKI Cipher = aes256 #g' >${outf}
sed -f ${outf} $tmp/1 >$scripts/bareos-fd.conf

fdcfg=$conf/bareos-fd.conf
$bperl -e "add_attribute('$fdcfg', 'Compatible', 'No', 'FileDaemon')"
$bperl -e "add_attribute('$fdcfg', 'PKI Cipher', 'aes256', 'FileDaemon')"

change_jobname NightlySave $JobName
start_test
Expand Down
10 changes: 3 additions & 7 deletions tests/data-encrypt-blowfish-test
Expand Up @@ -8,17 +8,13 @@ TestName="data-encrypt-blowfish-test"
JobName=Crypto-blowfish
. scripts/functions


scripts/cleanup
scripts/copy-crypto-confs
echo "${cwd}/build" >${cwd}/tmp/file-list

outf="$tmp/sed_tmp"
# set compatible to no in fd.conf
cp $scripts/bareos-fd.conf $tmp/1
echo 's#^FileDaemon {#FileDaemon { \n compatible = no \n PKI Cipher = blowfish #g' >${outf}
sed -f ${outf} $tmp/1 >$scripts/bareos-fd.conf

fdcfg=$conf/bareos-fd.conf
$bperl -e "add_attribute('$fdcfg', 'Compatible', 'No', 'FileDaemon')"
$bperl -e "add_attribute('$fdcfg', 'PKI Cipher', 'blowfish', 'FileDaemon')"

change_jobname NightlySave $JobName
start_test
Expand Down
10 changes: 3 additions & 7 deletions tests/data-encrypt-camellia256-test
Expand Up @@ -8,17 +8,13 @@ TestName="data-encrypt-camellia256-test"
JobName=Crypto-camellia256
. scripts/functions


scripts/cleanup
scripts/copy-crypto-confs
echo "${cwd}/build" >${cwd}/tmp/file-list

outf="$tmp/sed_tmp"
# set compatible to no in fd.conf
cp $scripts/bareos-fd.conf $tmp/1
echo 's#^FileDaemon {#FileDaemon { \n compatible = no \n PKI Cipher = camellia256 #g' >${outf}
sed -f ${outf} $tmp/1 >$scripts/bareos-fd.conf

fdcfg=$conf/bareos-fd.conf
$bperl -e "add_attribute('$fdcfg', 'Compatible', 'No', 'FileDaemon')"
$bperl -e "add_attribute('$fdcfg', 'PKI Cipher', 'camellia256', 'FileDaemon')"

change_jobname NightlySave $JobName
start_test
Expand Down

0 comments on commit 680ba7f

Please sign in to comment.