The two removed files have exactly the same config as other LUKS volume
data files, simply with different file names. Consolidate down to just
two LUKS volume data files as that's all that we need for the test
coverage.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.../luks-convert-encrypt.argv | 18 ++++++++--------
.../luks-convert-encrypt2fileqcow2.argv | 6 +++---
.../luks-convert-encrypt2fileraw.argv | 6 +++---
tests/storagevolxml2argvtest.c | 8 +++----
tests/storagevolxml2xmlin/vol-encrypt1.xml | 21 -------------------
tests/storagevolxml2xmlin/vol-encrypt2.xml | 21 -------------------
6 files changed, 19 insertions(+), 61 deletions(-)
delete mode 100644 tests/storagevolxml2xmlin/vol-encrypt1.xml
delete mode 100644 tests/storagevolxml2xmlin/vol-encrypt2.xml
diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt.argv
b/tests/storagevolxml2argvdata/luks-convert-encrypt.argv
index b2ad16b7cb..78bce96aaa 100644
--- a/tests/storagevolxml2argvdata/luks-convert-encrypt.argv
+++ b/tests/storagevolxml2argvdata/luks-convert-encrypt.argv
@@ -1,11 +1,11 @@
qemu-img create -f luks \
---object secret,id=encrypt2.img_encrypt0,file=/path/to/secretFile \
--o key-secret=encrypt2.img_encrypt0 \
-/var/lib/libvirt/images/encrypt2.img 5242880K
+--object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \
+-o key-secret=LuksDemo.img_encrypt0 \
+/var/lib/libvirt/images/LuksDemo.img 5242880K
qemu-img convert --image-opts -n --target-image-opts \
---object secret,id=encrypt2.img_encrypt0,file=/path/to/secretFile \
---object secret,id=encrypt1.img_encrypt0,file=/path/to/inputSecretFile \
-driver=luks,file.filename=/var/lib/libvirt/images/encrypt1.img,\
-key-secret=encrypt1.img_encrypt0 \
-driver=luks,file.filename=/var/lib/libvirt/images/encrypt2.img,\
-key-secret=encrypt2.img_encrypt0
+--object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \
+--object secret,id=OtherDemo.img_encrypt0,file=/path/to/inputSecretFile \
+driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,\
+key-secret=OtherDemo.img_encrypt0 \
+driver=luks,file.filename=/var/lib/libvirt/images/LuksDemo.img,\
+key-secret=LuksDemo.img_encrypt0
diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
index 82cb364b61..fd974f863e 100644
--- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
+++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
@@ -1,7 +1,7 @@
qemu-img create -f qcow2 \
-o compat=0.10 /var/lib/libvirt/images/sparse-qcow2.img 1073741824K
qemu-img convert --image-opts -n --target-image-opts \
---object secret,id=encrypt2.img_encrypt0,file=/path/to/inputSecretFile \
-driver=luks,file.filename=/var/lib/libvirt/images/encrypt2.img,\
-key-secret=encrypt2.img_encrypt0 \
+--object secret,id=OtherDemo.img_encrypt0,file=/path/to/inputSecretFile \
+driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,\
+key-secret=OtherDemo.img_encrypt0 \
driver=qcow2,file.filename=/var/lib/libvirt/images/sparse-qcow2.img
diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv
b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv
index 2661c345a8..82473db57b 100644
--- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv
+++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileraw.argv
@@ -1,7 +1,7 @@
qemu-img create -f raw \
/var/lib/libvirt/images/sparse.img 1073741824K
qemu-img convert --image-opts -n --target-image-opts \
---object secret,id=encrypt2.img_encrypt0,file=/path/to/inputSecretFile \
-driver=luks,file.filename=/var/lib/libvirt/images/encrypt2.img,\
-key-secret=encrypt2.img_encrypt0 \
+--object secret,id=OtherDemo.img_encrypt0,file=/path/to/inputSecretFile \
+driver=luks,file.filename=/var/lib/libvirt/images/OtherDemo.img,\
+key-secret=OtherDemo.img_encrypt0 \
driver=raw,file.filename=/var/lib/libvirt/images/sparse.img
diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c
index 1832690e29..618f481039 100644
--- a/tests/storagevolxml2argvtest.c
+++ b/tests/storagevolxml2argvtest.c
@@ -264,16 +264,16 @@ mymain(void)
"pool-dir", "vol-file-qcow2",
"luks-convert-qcow2", 0);
- DO_TEST("pool-dir", "vol-encrypt2",
- "pool-dir", "vol-encrypt1",
+ DO_TEST("pool-dir", "vol-luks",
+ "pool-dir", "vol-luks-convert",
"luks-convert-encrypt", 0);
DO_TEST("pool-dir", "vol-file",
- "pool-dir", "vol-encrypt2",
+ "pool-dir", "vol-luks-convert",
"luks-convert-encrypt2fileraw", 0);
DO_TEST("pool-dir", "vol-file-qcow2",
- "pool-dir", "vol-encrypt2",
+ "pool-dir", "vol-luks-convert",
"luks-convert-encrypt2fileqcow2", 0);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/storagevolxml2xmlin/vol-encrypt1.xml
b/tests/storagevolxml2xmlin/vol-encrypt1.xml
deleted file mode 100644
index 681734dc7b..0000000000
--- a/tests/storagevolxml2xmlin/vol-encrypt1.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<volume>
- <name>encrypt1.img</name>
- <key>/var/lib/libvirt/images/encrypt1.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</allocation>
- <target>
- <path>/var/lib/libvirt/images/encrypt1.img</path>
- <format type='raw'/>
- <permissions>
- <mode>0644</mode>
- <owner>0</owner>
- <group>0</group>
- <label>unconfined_u:object_r:virt_image_t:s0</label>
- </permissions>
- <encryption format='luks'>
- <secret type='passphrase'
uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
- </encryption>
- </target>
-</volume>
diff --git a/tests/storagevolxml2xmlin/vol-encrypt2.xml
b/tests/storagevolxml2xmlin/vol-encrypt2.xml
deleted file mode 100644
index 0507d3b9e6..0000000000
--- a/tests/storagevolxml2xmlin/vol-encrypt2.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<volume>
- <name>encrypt2.img</name>
- <key>/var/lib/libvirt/images/encrypt2.img</key>
- <source>
- </source>
- <capacity unit="G">5</capacity>
- <allocation>294912</allocation>
- <target>
- <path>/var/lib/libvirt/images/encrypt2.img</path>
- <format type='raw'/>
- <permissions>
- <mode>0644</mode>
- <owner>0</owner>
- <group>0</group>
- <label>unconfined_u:object_r:virt_image_t:s0</label>
- </permissions>
- <encryption format='luks'>
- <secret type='passphrase'
uuid='e78d4b51-a2af-485f-b0f5-afca709af480'/>
- </encryption>
- </target>
-</volume>
--
2.26.2