tests: virstoragetest: validate that array deflattening works for gluster

Validate that we are able to parse back the dotted syntax arrays we were
generating in the pre-blockdev era.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2017-12-14 18:01:05 +01:00
parent cdf82b60fd
commit 096e94cef6

View File

@ -1387,6 +1387,24 @@ mymain(void)
" <host transport='unix' socket='/path/socket'/>\n"
" <host name='example.com' port='24007'/>\n"
"</source>\n");
TEST_BACKING_PARSE("json:{\"driver\": \"raw\","
"\"file\": {\"server.0.host\": \"A.A.A.A\","
"\"server.1.host\": \"B.B.B.B\","
"\"server.2.host\": \"C.C.C.C\","
"\"driver\": \"gluster\","
"\"path\": \"raw\","
"\"server.0.type\": \"tcp\","
"\"server.1.type\": \"tcp\","
"\"server.2.type\": \"tcp\","
"\"server.0.port\": \"24007\","
"\"server.1.port\": \"24007\","
"\"server.2.port\": \"24007\","
"\"volume\": \"vol1\"}}",
"<source protocol='gluster' name='vol1/raw'>\n"
" <host name='A.A.A.A' port='24007'/>\n"
" <host name='B.B.B.B' port='24007'/>\n"
" <host name='C.C.C.C' port='24007'/>\n"
"</source>\n");
TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"nbd\","
"\"path\":\"/path/to/socket\""
"}"