Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/qemublocktest.c | 1 +
.../qemublocktestdata/xml2json/network-nbd-tls.json | 20 ++++++++++++++++++++
tests/qemublocktestdata/xml2json/network-nbd-tls.xml | 18 ++++++++++++++++++
3 files changed, 39 insertions(+)
create mode 100644 tests/qemublocktestdata/xml2json/network-nbd-tls.json
create mode 100644 tests/qemublocktestdata/xml2json/network-nbd-tls.xml
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index ec882b43e1..8494c9e48a 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -486,6 +486,7 @@ mymain(void)
TEST_DISK_TO_JSON("file-backing_basic-cache-unsafe");
TEST_DISK_TO_JSON("network-qcow2-backing-chain-cache-unsafe");
TEST_DISK_TO_JSON("dir-fat-cache");
+ TEST_DISK_TO_JSON("network-nbd-tls");
TEST_DISK_TO_JSON("block-raw-noopts");
diff --git a/tests/qemublocktestdata/xml2json/network-nbd-tls.json
b/tests/qemublocktestdata/xml2json/network-nbd-tls.json
new file mode 100644
index 0000000000..e68f421874
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/network-nbd-tls.json
@@ -0,0 +1,20 @@
+{
+ "node-name": "node-b-f",
+ "read-only": false,
+ "driver": "qcow2",
+ "file": "node-a-s",
+ "backing": null
+}
+{
+ "driver": "nbd",
+ "server": {
+ "type": "inet",
+ "host": "host1.example.com",
+ "port": "10809"
+ },
+ "export": "rbdpool/rbdimg",
+ "tls-creds": "node-a-s-tls0",
+ "node-name": "node-a-s",
+ "read-only": false,
+ "discard": "unmap"
+}
diff --git a/tests/qemublocktestdata/xml2json/network-nbd-tls.xml
b/tests/qemublocktestdata/xml2json/network-nbd-tls.xml
new file mode 100644
index 0000000000..40102327e2
--- /dev/null
+++ b/tests/qemublocktestdata/xml2json/network-nbd-tls.xml
@@ -0,0 +1,18 @@
+<disk type='network' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source protocol='nbd' name='rbdpool/rbdimg' tls='yes'>
+ <host name='host1.example.com'/>
+ <privateData>
+ <nodenames>
+ <nodename type='storage' name='node-a-s'/>
+ <nodename type='format' name='node-b-f'/>
+ </nodenames>
+ <objects>
+ <tlsX509 alias='node-a-s-tls0'/>
+ </objects>
+ </privateData>
+ </source>
+ <backingStore/>
+ <target dev='vda' bus='virtio'/>
+ <alias name='virtio-disk0'/>
+</disk>
--
2.16.2