From eb467df66896ae6e9cc99034d5c951fde01ff931 Mon Sep 17 00:00:00 2001 Message-Id: From: Peter Krempa Date: Wed, 26 Feb 2014 14:55:07 +0100 Subject: [PATCH] domainsnapshotxml2xmltest: Add existing files as new tests https://bugzilla.redhat.com/show_bug.cgi?id=1032370 There were plenty snapshot XMLs in the tests/domainsnapshotxml2xmlin directory that actually weren't used in XML testing. The upgraded domainsnapshotxml2xml test now allows us to use them. (cherry picked from commit a686115cba0f9ed3a686fb28d6faa4bcea618f8e) Signed-off-by: Jiri Denemark --- tests/domainsnapshotxml2xmlin/external_vm.xml | 1 - tests/domainsnapshotxml2xmlin/noparent.xml | 1 + tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 15 +++++++++++++++ tests/domainsnapshotxml2xmlout/empty.xml | 8 ++++++++ tests/domainsnapshotxml2xmlout/external_vm.xml | 5 +++++ tests/domainsnapshotxml2xmlout/name_and_description.xml | 5 +++++ tests/domainsnapshotxml2xmlout/noparent.xml | 2 +- tests/domainsnapshotxml2xmltest.c | 10 ++++++++++ 8 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 tests/domainsnapshotxml2xmlout/disk_snapshot.xml create mode 100644 tests/domainsnapshotxml2xmlout/empty.xml create mode 100644 tests/domainsnapshotxml2xmlout/external_vm.xml create mode 100644 tests/domainsnapshotxml2xmlout/name_and_description.xml diff --git a/tests/domainsnapshotxml2xmlin/external_vm.xml b/tests/domainsnapshotxml2xmlin/external_vm.xml index 3bcd150..6be626c 100644 --- a/tests/domainsnapshotxml2xmlin/external_vm.xml +++ b/tests/domainsnapshotxml2xmlin/external_vm.xml @@ -6,5 +6,4 @@ earlier_snap - 1272917631 diff --git a/tests/domainsnapshotxml2xmlin/noparent.xml b/tests/domainsnapshotxml2xmlin/noparent.xml index cbac0d8..672a0af 100644 --- a/tests/domainsnapshotxml2xmlin/noparent.xml +++ b/tests/domainsnapshotxml2xmlin/noparent.xml @@ -2,6 +2,7 @@ my snap name !@#$%^ running + 1272917631 9d37b878-a7cc-9f9a-b78f-49b3abad25a8 diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml new file mode 100644 index 0000000..1a1fc02 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml @@ -0,0 +1,15 @@ + + my snap name + !@#$%^ + + + + + + + + + + + + diff --git a/tests/domainsnapshotxml2xmlout/empty.xml b/tests/domainsnapshotxml2xmlout/empty.xml new file mode 100644 index 0000000..41538f7 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/empty.xml @@ -0,0 +1,8 @@ + + 1386166249 + nostate + 1386166249 + + 9d37b878-a7cc-9f9a-b78f-49b3abad25a8 + + diff --git a/tests/domainsnapshotxml2xmlout/external_vm.xml b/tests/domainsnapshotxml2xmlout/external_vm.xml new file mode 100644 index 0000000..9da369b --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/external_vm.xml @@ -0,0 +1,5 @@ + + my snap name + !@#$%^ + + diff --git a/tests/domainsnapshotxml2xmlout/name_and_description.xml b/tests/domainsnapshotxml2xmlout/name_and_description.xml new file mode 100644 index 0000000..435ab79 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/name_and_description.xml @@ -0,0 +1,5 @@ + + snap1 + A longer description! + nostate + diff --git a/tests/domainsnapshotxml2xmlout/noparent.xml b/tests/domainsnapshotxml2xmlout/noparent.xml index 0cbbb65..d4360f0 100644 --- a/tests/domainsnapshotxml2xmlout/noparent.xml +++ b/tests/domainsnapshotxml2xmlout/noparent.xml @@ -1,7 +1,7 @@ my snap name !@#$%^ - running + nostate 1272917631 diff --git a/tests/domainsnapshotxml2xmltest.c b/tests/domainsnapshotxml2xmltest.c index 4a1fcce..7870601 100644 --- a/tests/domainsnapshotxml2xmltest.c +++ b/tests/domainsnapshotxml2xmltest.c @@ -215,6 +215,16 @@ mymain(void) DO_TEST_OUT("metadata", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false); DO_TEST_OUT("external_vm_redefine", "c7a5fdbd-edaf-9455-926a-d65c16db1809", false); + DO_TEST_INOUT("empty", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false); + DO_TEST_INOUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false); + DO_TEST_INOUT("external_vm", NULL, false, false); + DO_TEST_INOUT("noparent", "9d37b878-a7cc-9f9a-b78f-49b3abad25a8", false, false); + DO_TEST_INOUT("disk_snapshot", NULL, false, false); + + DO_TEST_IN("name_and_description", NULL); + DO_TEST_IN("description_only", NULL); + DO_TEST_IN("name_only", NULL); + cleanup: if (testSnapshotXMLVariableLineRegex) regfree(testSnapshotXMLVariableLineRegex); -- 1.9.0