]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Add checks in two-client-test
authorEric Bollengier <eric@baculasystems.com>
Tue, 5 Jul 2022 13:24:53 +0000 (15:24 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:58 +0000 (13:56 +0200)
regress/tests/two-client-test

index a26cbce596f0efdc010fd0f04fa103ebc2b2895f..596207fbf68e3843d8d13a74c823173528353c45 100755 (executable)
@@ -39,6 +39,22 @@ messages
 @$out $tmp/log1.out
 setdebug level=4 storage=File1
 label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
+run job=$JobName
+mod
+5
+2
+mod
+5
+1
+no
+run job=$JobName client=2-fd
+mod
+5
+2
+mod
+5
+1
+no
 run job=$JobName client=1-fd yes
 wait
 messages
@@ -70,6 +86,40 @@ run_bacula
 check_for_zombie_jobs storage=File1
 stop_bacula
 
+grep ^Client: $tmp/log1.out > $tmp/1
+cat <<EOF > $tmp/2
+Client:   1-fd
+Client:   2-fd
+Client:   1-fd
+Client:   2-fd
+Client:   2-fd
+Client:   1-fd
+EOF
+
+if ! diff $tmp/1 $tmp/2
+then
+    print_debug "ERROR: Incorrect client detected in $tmp/log1.out"
+    estat=1
+fi
+
+grep -E  "^(Backup|Restore) Client:" tmp/log2.out > $tmp/3
+cat <<EOF > $tmp/4
+Backup Client:   1-fd
+Restore Client:  1-fd
+Backup Client:   1-fd
+Restore Client:  2-fd
+Backup Client:   1-fd
+Restore Client:  1-fd
+Backup Client:   1-fd
+Restore Client:  2-fd
+EOF
+
+if ! diff $tmp/3 $tmp/4
+then
+    print_debug "ERROR: Incorrect client detected in $tmp/log2.out"
+    estat=1
+fi
+
 check_two_logs
 #check_restore_diff
 end_test