From: Eric Bollengier Date: Tue, 8 Aug 2023 15:45:01 +0000 (+0200) Subject: regress: Add check for new custom label format X-Git-Tag: Beta-15.0.0~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8208ff6b21997b423563a60d9cd5bf5778014427;p=thirdparty%2Fbacula.git regress: Add check for new custom label format --- diff --git a/regress/tests/migration-job-test b/regress/tests/migration-job-test index 728847fa1..3e81094d0 100755 --- a/regress/tests/migration-job-test +++ b/regress/tests/migration-job-test @@ -20,6 +20,10 @@ scripts/copy-migration-confs scripts/prepare-disk-changer echo "${cwd}/build" >${cwd}/tmp/file-list +$bperl -e 'add_attribute("$conf/bacula-sd.conf", "LabelMedia", "yes", "Device")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "LabelFormat", "\"Vol\${JobId}_\${PriorJobId}_\${PriorJobName}\"", "Pool")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "MaximumVolumeJobs", "1", "Pool")' + change_jobname NightlySave $JobName start_test @@ -37,9 +41,9 @@ cat <${cwd}/tmp/bconcmds messages @$out ${cwd}/tmp/log1.out setdebug level=000 storage=File -label storage=File volume=FileVolume001 Pool=Default -label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0 -label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0 +@#label storage=File volume=FileVolume001 Pool=Default +@#label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0 +@#label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0 @# run two jobs (both will be migrated) run job=$JobName yes run job=$JobName yes @@ -88,6 +92,12 @@ run_bacula check_for_zombie_jobs storage=File stop_bacula +grep "Vol5_1_MigrationJobSave" $tmp/log1.out > /dev/null +if [ $? -ne 0 ]; then + print_debug "ERROR: Should find custom volume name" + estat=1 +fi + check_two_logs check_restore_diff end_test