[PATCH 6/6] tests: virstoragetest: validate that array deflattening works for gluster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tests/virstoragetest.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index c59511114d..547118951e 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -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\""
                                       "}"
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux