|
|
d759b5 |
From d2b1f0101b75663b8ae31adfb008bdf0b111e873 Mon Sep 17 00:00:00 2001
|
|
|
d759b5 |
Message-Id: <d2b1f0101b75663b8ae31adfb008bdf0b111e873@dist-git>
|
|
|
d759b5 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d759b5 |
Date: Thu, 20 Jun 2019 17:45:03 +0200
|
|
|
d759b5 |
Subject: [PATCH] tests: domainsnapshotxml2xml: make 'disk-seclabel' test
|
|
|
d759b5 |
operational
|
|
|
d759b5 |
|
|
|
d759b5 |
Now that we added the seclabels to the schema we can test that they are
|
|
|
d759b5 |
parsed and formatted correctly.
|
|
|
d759b5 |
|
|
|
d759b5 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d759b5 |
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
d759b5 |
(cherry picked from commit 3203681e5e8513425acdf3f25d0981f5157f0ddf)
|
|
|
d759b5 |
|
|
|
d759b5 |
Conflicts:
|
|
|
d759b5 |
tests/domainsnapshotxml2xmltest.c:
|
|
|
d759b5 |
- refactors to the testsuite (a10c6b300e9, 0ea43b55a40, ...) were not
|
|
|
d759b5 |
backported. Test invocation needed to be changed.
|
|
|
d759b5 |
|
|
|
d759b5 |
https: //bugzilla.redhat.com/show_bug.cgi?id=1584682
|
|
|
d759b5 |
Message-Id: <9e8368c18a7b3746dcc750953170771f49453afc.1561045343.git.pkrempa@redhat.com>
|
|
|
d759b5 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
d759b5 |
---
|
|
|
d759b5 |
tests/domainsnapshotxml2xmlout/disk-seclabel.xml | 15 +++++++++++++++
|
|
|
d759b5 |
tests/domainsnapshotxml2xmltest.c | 1 +
|
|
|
d759b5 |
2 files changed, 16 insertions(+)
|
|
|
d759b5 |
create mode 100644 tests/domainsnapshotxml2xmlout/disk-seclabel.xml
|
|
|
d759b5 |
|
|
|
d759b5 |
diff --git a/tests/domainsnapshotxml2xmlout/disk-seclabel.xml b/tests/domainsnapshotxml2xmlout/disk-seclabel.xml
|
|
|
d759b5 |
new file mode 100644
|
|
|
d759b5 |
index 0000000000..989cfc4964
|
|
|
d759b5 |
--- /dev/null
|
|
|
d759b5 |
+++ b/tests/domainsnapshotxml2xmlout/disk-seclabel.xml
|
|
|
d759b5 |
@@ -0,0 +1,15 @@
|
|
|
d759b5 |
+<domainsnapshot>
|
|
|
d759b5 |
+ <name>my snap name</name>
|
|
|
d759b5 |
+ <description>!@#$%^</description>
|
|
|
d759b5 |
+ <creationTime>581484660</creationTime>
|
|
|
d759b5 |
+ <disks>
|
|
|
d759b5 |
+ <disk name='hde' snapshot='external' type='file'>
|
|
|
d759b5 |
+ <source file='/path/to/new2'>
|
|
|
d759b5 |
+ <seclabel model='dac' relabel='no'/>
|
|
|
d759b5 |
+ </source>
|
|
|
d759b5 |
+ </disk>
|
|
|
d759b5 |
+ </disks>
|
|
|
d759b5 |
+ <domain>
|
|
|
d759b5 |
+ <uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
|
|
|
d759b5 |
+ </domain>
|
|
|
d759b5 |
+</domainsnapshot>
|
|
|
d759b5 |
diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c
|
|
|
d759b5 |
index 5ea0f325de..2b594e626c 100644
|
|
|
d759b5 |
--- a/tests/domainsnapshotxml2xmltest.c
|
|
|
d759b5 |
+++ b/tests/domainsnapshotxml2xmltest.c
|
|
|
d759b5 |
@@ -214,6 +214,7 @@ mymain(void)
|
|
|
d759b5 |
DO_TEST_INOUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
|
|
|
d759b5 |
DO_TEST_INOUT("disk_snapshot", NULL, false, false);
|
|
|
d759b5 |
DO_TEST_INOUT("disk_driver_name_null", NULL, false, false);
|
|
|
d759b5 |
+ DO_TEST_INOUT("disk-seclabel", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false);
|
|
|
d759b5 |
|
|
|
d759b5 |
DO_TEST_IN("name_and_description", NULL);
|
|
|
d759b5 |
DO_TEST_IN("description_only", NULL);
|
|
|
d759b5 |
--
|
|
|
d759b5 |
2.22.1
|
|
|
d759b5 |
|