]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: tweaks and fixes for some tests
authorMichal Rakowski <michal.rakowski@baculasystems.com>
Fri, 2 Jul 2021 10:16:28 +0000 (12:16 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:02 +0000 (09:03 +0100)
regress/tests/bscan-plugin-objects-test
regress/tests/bscan-restore-objects-test
regress/tests/migration-job-error-test
regress/tests/plugin-objects-test
regress/tests/store-mngr-invalid-dev-test

index 02a6de6b0fe10ff288a96211043c1cf52a211b3d..247ece71321e73458702b8f339aac7d8b055cda7 100755 (executable)
@@ -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 <<END_OF_DATA >${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
index 0b941203a3534645bbd1dc0af99877b40bef20b1..b9b1c765bcc3a2bb83ebaf465f29d390529e9615 100755 (executable)
@@ -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 <<END_OF_DATA >${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
index 5d02dabee745eaae6feeea01cd4cc3efd88230b2..a4e65a1f81c8124067b3351b3bf92a1d8265ed60 100755 (executable)
@@ -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
index 421014e6140248d4a0ff3d686fb496d19fa1f126..41b06b72bc4740fc41a6d3afbcfe3118ead81a97 100755 (executable)
@@ -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
index ad8ec8f4c449e52d67563548fe249742108c2e6f..b0a6d158ea3d74983f7bc0fd8823089ec96a5f26 100755 (executable)
@@ -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