From c3d60d36469219a66ad5269bf82bbc80cb610bbd Mon Sep 17 00:00:00 2001 From: Michal Rakowski Date: Tue, 27 Oct 2020 13:24:35 +0100 Subject: [PATCH] regress: Add check for logging of copy jobs upgraded to backup --- regress/tests/copy-upgrade-test | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/regress/tests/copy-upgrade-test b/regress/tests/copy-upgrade-test index d6998273b..f44bbe5ac 100755 --- a/regress/tests/copy-upgrade-test +++ b/regress/tests/copy-upgrade-test @@ -132,6 +132,12 @@ delete jobid=1 EOF run_bconsole +cat ${cwd}/tmp/log2.out | grep "Following Copy jobs have been upgraded to Backup jobs: 5" +if [ $? -ne 0 ]; then + estat=1 + print_debug "Log about upgrading copy job to backup hasn't been found!" +fi + rm -rf ${cwd}/tmp/bacula-restores run_bconsole ${cwd}/tmp/bconcmds.resto check_two_logs @@ -145,6 +151,12 @@ delete jobid=5 EOF run_bconsole +cat ${cwd}/tmp/log2.out | grep "Following Copy jobs have been upgraded to Backup jobs: 11" +if [ $? -ne 0 ]; then + estat=1 + print_debug "Log about upgrading copy job to backup hasn't been found!" +fi + rm -rf ${cwd}/tmp/bacula-restores run_bconsole ${cwd}/tmp/bconcmds.resto check_two_logs @@ -158,6 +170,18 @@ delete jobid=11,17 EOF run_bconsole +cat ${cwd}/tmp/log2.out | grep "Following Copy jobs have been upgraded to Backup jobs: 17" +if [ $? -ne 0 ]; then + estat=1 + print_debug "Log about upgrading copy job to backup hasn't been found!" +fi + +cat ${cwd}/tmp/log2.out | grep "Following Copy jobs have been upgraded to Backup jobs: 19" +if [ $? -ne 0 ]; then + estat=1 + print_debug "Log about upgrading copy job to backup hasn't been found!" +fi + rm -rf ${cwd}/tmp/bacula-restores run_bconsole ${cwd}/tmp/bconcmds.resto check_two_logs @@ -171,6 +195,18 @@ delete jobid=3,9,15 EOF run_bconsole +cat ${cwd}/tmp/log2.out | grep "Following Copy jobs have been upgraded to Backup jobs: 9" +if [ $? -ne 0 ]; then + estat=1 + print_debug "Log about upgrading copy job to backup hasn't been found!" +fi + +cat ${cwd}/tmp/log2.out | grep "Following Copy jobs have been upgraded to Backup jobs: 15" +if [ $? -ne 0 ]; then + estat=1 + print_debug "Log about upgrading copy job to backup hasn't been found!" +fi + rm -f ${cwd}/build/po/test1 rm -rf ${cwd}/tmp/bacula-restores run_bconsole ${cwd}/tmp/bconcmds.resto -- 2.47.3