]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: tweak snapshot-lvm-test for sqlite
authorAlain Spineux <alain@baculasystems.com>
Fri, 2 Sep 2022 09:35:37 +0000 (11:35 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
- the auto numbering is not the same between pgsql and sqlite
  - the counter are shared by all "serial" in pgsql
  - while each "auto increment" have there own counter

regress/tests/snapshot-lvm-test

index 3339d9794a364f5f6b122e60ba7de7b638addc35..4fac7da16d84da34386f107bab6c1e26c96f2337 100755 (executable)
@@ -10,6 +10,13 @@ TestName="snapshot-lvm-test"
 JobName=Incremental
 . scripts/functions
 
+SNAP1=1
+SNAP3=3
+if [ x$WHICHDB != x"--with-sqlite3" ]; then
+   # the numbering is different when using sqlite
+   SNAP3=2
+fi
+
 ${rscripts}/cleanup
 ${rscripts}/copy-test-confs
 
@@ -113,12 +120,12 @@ list files jobid=1
 @$out ${tmp}/list1.snap_listclient
 snapshot listclient
 @$out ${tmp}/list1.snap_update
-snapshot update client snapshotid=1 comment="test1"
-snapshot update client snapshotid=1 retention=3
+snapshot update client snapshotid=$SNAP1 comment="test1"
+snapshot update client snapshotid=$SNAP1 retention=3
 @$out ${tmp}/list1.snap_list2
-.jlist snapshot snapshotid=1
+.jlist snapshot snapshotid=$SNAP1
 @$out ${tmp}/list1.snap_list22
-.jlist snapshot snapshotid=3
+.jlist snapshot snapshotid=$SNAP3
 @$out ${tmp}/list1.snap_prune
 @sleep 4
 snapshot prune client yes