From: Peter Krempa Date: Mon, 3 Feb 2020 15:40:16 +0000 (+0100) Subject: tests: virstorage: Add test cases for "json:" pseudo-URI without 'file' wrapper X-Git-Tag: v6.1.0-rc1~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d0d60ddc5e58359cff5be8dfd6dd27e98da0282;p=thirdparty%2Flibvirt.git tests: virstorage: Add test cases for "json:" pseudo-URI without 'file' wrapper Add few cases that prove the second format of "json:" pseudo-URIs. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 4341c04b1e..6d62aab654 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1315,6 +1315,10 @@ mymain(void) "}" "}", "\n"); + TEST_BACKING_PARSE("json:{\"driver\":\"file\"," + "\"filename\":\"/path/to/file\"" + "}", + "\n"); TEST_BACKING_PARSE("json:{\"file.driver\":\"host_device\", " "\"file.filename\":\"/path/to/dev\"}", "\n"); @@ -1389,6 +1393,12 @@ mymain(void) "\n" " \n" "\n"); + TEST_BACKING_PARSE("json:{\"driver\":\"nbd\"," + "\"path\":\"/path/to/socket\"" + "}", + "\n" + " \n" + "\n"); TEST_BACKING_PARSE("json:{\"file.driver\":\"nbd\"," "\"file.path\":\"/path/to/socket\"" "}",