From: John Ferlan Date: Tue, 4 Dec 2018 15:20:59 +0000 (-0500) Subject: tests: Add storagepool xml test for netfs-auto X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=515aa0c1847180f8da4287270f872c161993a047;p=libvirt.git tests: Add storagepool xml test for netfs-auto Cover the case where @netauto would be used to create the command line in virStorageBackendFileSystemMountCmd. Essentially when the pool type is "netfs", but the "source.format" is empty, create the command line properly. Signed-off-by: John Ferlan ACKed-by: Michal Privoznik --- diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto.argv new file mode 100644 index 0000000000..888a0161b8 --- /dev/null +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto.argv @@ -0,0 +1 @@ +mount localhost:/var/lib/libvirt/images /mnt diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c index 128fab2de6..bb9e880554 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -146,6 +146,7 @@ mymain(void) DO_TEST_FAIL("pool-iscsi"); DO_TEST_FAIL("pool-iscsi-auth"); DO_TEST("pool-netfs"); + DO_TEST("pool-netfs-auto"); DO_TEST("pool-netfs-gluster"); DO_TEST("pool-netfs-cifs"); DO_TEST_FAIL("pool-scsi"); diff --git a/tests/storagepoolxml2xmlin/pool-netfs-auto.xml b/tests/storagepoolxml2xmlin/pool-netfs-auto.xml new file mode 100644 index 0000000000..d7f7ce8168 --- /dev/null +++ b/tests/storagepoolxml2xmlin/pool-netfs-auto.xml @@ -0,0 +1,19 @@ + + nfsimages + 7641d5a8-af11-f730-a34e-0a7dfcede71f + 0 + 0 + 0 + + + + + + /mnt + + 0700 + 0 + 0 + + + diff --git a/tests/storagepoolxml2xmlout/pool-netfs-auto.xml b/tests/storagepoolxml2xmlout/pool-netfs-auto.xml new file mode 100644 index 0000000000..a180ca521c --- /dev/null +++ b/tests/storagepoolxml2xmlout/pool-netfs-auto.xml @@ -0,0 +1,20 @@ + + nfsimages + 7641d5a8-af11-f730-a34e-0a7dfcede71f + 0 + 0 + 0 + + + + + + + /mnt + + 0700 + 0 + 0 + + + diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index 8230dc8ddc..707d09f5c2 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -82,6 +82,7 @@ mymain(void) DO_TEST("pool-iscsi"); DO_TEST("pool-iscsi-auth"); DO_TEST("pool-netfs"); + DO_TEST("pool-netfs-auto"); DO_TEST("pool-netfs-gluster"); DO_TEST("pool-netfs-cifs"); DO_TEST("pool-scsi");