]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix copy-sqlquery-duplicate-test
authorEric Bollengier <eric@baculasystems.com>
Mon, 2 Nov 2020 09:17:08 +0000 (10:17 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:58 +0000 (09:02 +0100)
The SQL query used in the test is not compatible with SQLite or MySQL

regress/tests/copy-sqlquery-duplicate-test

index ae49539ade3acd3e235afd7b1ef5390230f5e9ee..f1ab4ac4c823d483d96d3bde09cbc8daa69d8157 100755 (executable)
@@ -19,6 +19,12 @@ echo "${cwd}/build" >${cwd}/tmp/file-list
 sed 's/migrate/copy/g' ${cwd}/bin/bacula-dir.conf > ${cwd}/tmp/1
 sed 's/Migrate/Copy/g' ${cwd}/tmp/1 > ${cwd}/bin/bacula-dir.conf
 
+$bin/dbcheck -B -c $conf/bacula-dir.conf | grep PostgreSQL > /dev/null
+if [ $? -ne 0 ]; then
+    print_debug "Test designed to run on PostgreSQL database"
+    exit 0
+fi
+
 change_jobname NightlySave $JobName
 
 $bperl -e "add_attribute('$conf/bacula-dir.conf', 'AllowDuplicateJobs', 'no', 'Job', 'copy-sqlquery')"