From: Michal Rakowski Date: Fri, 2 Jul 2021 10:16:28 +0000 (+0200) Subject: regress: tweaks and fixes for some tests X-Git-Tag: Release-11.3.2~458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=158497122208522b7d5aaa3250e98b46ed094ee9;p=thirdparty%2Fbacula.git regress: tweaks and fixes for some tests --- diff --git a/regress/tests/bscan-plugin-objects-test b/regress/tests/bscan-plugin-objects-test index 02a6de6b0..247ece713 100755 --- a/regress/tests/bscan-plugin-objects-test +++ b/regress/tests/bscan-plugin-objects-test @@ -40,7 +40,7 @@ messages list objects sql @$out $tmp/objs_count -select count(*) from restoreobject; +select count(*) from Object; quit END_OF_DATA @@ -135,7 +135,7 @@ fi cat <${cwd}/tmp/bconcmds sql @$out $tmp/objs_count_double_bscan -select count(*) from restoreobject; +select count(*) from Object; quit quit @@ -145,7 +145,7 @@ run_bconsole # Check if there are no duplicates objs_after_bscan=`cat tmp/objs_count_double_bscan | grep '|' | cut -d'|' -f2 | tail -1` -if [ $objs_after_bscan -ne ${objs_orig} ]; then +if [ ${objs_after_bscan} -ne ${objs_orig} ]; then print_debug "ERROR: Running bscan twice produced some duplicates of plugin objects. \ Original count: ${objs_orig}, after second bscan: ${objs_after_bscan}" bstat=1 diff --git a/regress/tests/bscan-restore-objects-test b/regress/tests/bscan-restore-objects-test index 0b941203a..b9b1c765b 100755 --- a/regress/tests/bscan-restore-objects-test +++ b/regress/tests/bscan-restore-objects-test @@ -43,7 +43,7 @@ list jobs llist pluginrestoreconf jobid=1 sql @$out $tmp/robjs_count -select count(*) from restoreobject; +select count(*) from RestoreObject; quit END_OF_DATA @@ -166,9 +166,8 @@ fi cat <${cwd}/tmp/bconcmds sql @$out $tmp/robjs_count_double_bscan -select count(*) from restoreobject; +select count(*) from RestoreObject; -quit quit END_OF_DATA @@ -176,7 +175,7 @@ run_bconsole # Check if there are no duplicates robjs_after_bscan=`cat tmp/robjs_count_double_bscan | grep '|' | cut -d'|' -f2 | tail -1` -if [ $robjs_after_bscan -ne ${robjs_orig} ]; then +if [ ${robjs_after_bscan} -ne ${robjs_orig} ]; then print_debug "ERROR: Running bscan twice produced some duplicates of restore objects. \ Original count: ${robjs_orig}, after second bscan: ${robjs_after_bscan}" bstat=1 diff --git a/regress/tests/migration-job-error-test b/regress/tests/migration-job-error-test index 5d02dabee..a4e65a1f8 100755 --- a/regress/tests/migration-job-error-test +++ b/regress/tests/migration-job-error-test @@ -57,6 +57,7 @@ if [ $? -ne 0 ]; then print_debug "ERROR: should find Migration Error in $tmp/log2.out" estat=1 fi -#stop_bacula + +stop_bacula end_test diff --git a/regress/tests/plugin-objects-test b/regress/tests/plugin-objects-test index 421014e61..41b06b72b 100755 --- a/regress/tests/plugin-objects-test +++ b/regress/tests/plugin-objects-test @@ -69,13 +69,13 @@ if [ "$id_postgres_obj" = "" ]; then fi n_OK=`cat ${cwd}/tmp/log3.out | grep "status: T" | wc -l` -if [ $n_OK -ne 2 ]; then +if [ ${n_OK} -ne 2 ]; then estat=1 print_debug "Wrong count of \'T\' status for objects, expected 2, got: ${n_OK}" fi n_UNSET=`cat ${cwd}/tmp/log3.out | grep "status: U" | wc -l` -if [ $n_UNSET -ne 4 ]; then +if [ ${n_UNSET} -ne 4 ]; then estat=1 print_debug "Wrong count of \'U\' status for objects, expected 4, got: ${n_UNSET}" fi diff --git a/regress/tests/store-mngr-invalid-dev-test b/regress/tests/store-mngr-invalid-dev-test index ad8ec8f4c..b0a6d158e 100755 --- a/regress/tests/store-mngr-invalid-dev-test +++ b/regress/tests/store-mngr-invalid-dev-test @@ -30,7 +30,7 @@ Job { Name = "StoreGroupJob" Type = Backup Messages = Standard - Client = VBox-fd + JobDefs = DefaultJob FileSet = "Full Set" Pool = StorePool Maximum Concurrent Jobs = 10