]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Add test for uname update
authorEric Bollengier <eric@baculasystems.com>
Thu, 28 Mar 2024 09:23:13 +0000 (10:23 +0100)
committerEric Bollengier <eric@baculasystems.com>
Wed, 4 Dec 2024 08:10:17 +0000 (09:10 +0100)
regress/tests/status-test

index 046e5442ccfde442ce719164186d9ba9893d3db2..20e357deebd475cae051fe048cc5e9dfc1e9ee25 100755 (executable)
@@ -34,6 +34,11 @@ cat <<END_OF_DATA >$tmp/bconcmds
 messages
 @$out $tmp/log1.out
 status client
+@$out $tmp/log111.out
+sql
+select 'ERROR', Name, Uname, Plugins from Client WHERE Uname = '';
+
+
 @$out $tmp/log2.out
 status storage
 @$out $tmp/log3.out
@@ -189,12 +194,6 @@ if [ $? -ne 0 ]; then
     estat=1
 fi
 
-grep "No Jobs running" $tmp/log10.out > /dev/null
-if [ $? -ne 0 ]; then
-    print_debug "ERROR: should find 'No Jobs running' in $tmp/log10.out"
-    estat=1
-fi
-
 grep "SDPort=" $tmp/log11.out > /dev/null
 if [ $? -ne 0 ]; then
     print_debug "ERROR: should find 'SDPort' in $tmp/log11.out"
@@ -207,4 +206,10 @@ if [ $? -ne 0 ]; then
     estat=1
 fi
 
+nb=`grep "ERROR" $tmp/log111.out | wc -l`
+if [ $nb -gt 1 ]; then
+    print_debug "ERROR: Should find Uname updated after status client in $tmp/log111.out"
+    estat=1
+fi
+
 end_test