From 3875459235d52201327fa67058e20909c5877cae Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 30 May 2018 15:28:24 +0200 Subject: [PATCH] tests: qemublock: Test NBD with TLS in the JSON generator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/qemublocktest.c | 1 + .../xml2json/network-nbd-tls.json | 19 +++++++++++++++++++ .../xml2json/network-nbd-tls.xml | 18 ++++++++++++++++++ 3 files changed, 38 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 d0cd834b05..0c335abc5b 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"); TEST_DISK_TO_JSON("block-raw-reservations"); diff --git a/tests/qemublocktestdata/xml2json/network-nbd-tls.json b/tests/qemublocktestdata/xml2json/network-nbd-tls.json new file mode 100644 index 0000000000..a1529a6c44 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-nbd-tls.json @@ -0,0 +1,19 @@ +{ + "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" + }, + "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..1330a5acc7 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/network-nbd-tls.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +