Skip to contentSkip to conversation

master - tests: more vgcfgrestore testing

PATCH Zdenek Kabelac 1 participant 1 message May 21, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=79f466524377f08ff4a736f159eac44f9923f4f1
Commit:        79f466524377f08ff4a736f159eac44f9923f4f1
Parent:        a4ac21aded0eec0e93ce0026cb77cd377d8713ef
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed May 21 23:12:00 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed May 21 23:14:41 2014 +0200

tests: more vgcfgrestore testing

Check '-l' and archiving.

---
 test/shell/vgcfgbackup-usage.sh |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
test/shell/vgcfgbackup-usage.sh +11 -1
index 193bb9d..bc09b5b 100644
@@ -31,12 +31,22 @@ vgcfgbackup
 test -e etc/backup/$vg1
 test -e etc/backup/$vg2
 
+aux lvmconf "backup/archive = 1"
+
 vgcfgbackup -f "bak-%s" >out
 grep "Volume group \"$vg1\" successfully backed up." out
 grep "Volume group \"$vg2\" successfully backed up." out
 # increase seqno
 lvcreate -an -Zn -l1 $vg1
-vgcfgrestore -f "bak-$vg1" $vg1
+
+invalid vgcfgrestore -f "bak-$vg1" $vg1-inv at lid
+invalid vgcfgrestore -f "bak-$vg1" $vg1 $vg2
+
+vgcfgrestore -l $vg1 | tee out
+test $(grep Description out | wc -l) -eq 2
+
+vgcfgrestore -l -f "bak-$vg1" $vg1
+
 vgremove -ff $vg1 $vg2
 
 # vgcfgbackup correctly stores metadata with missing PVs