From 54971d9170005b4cf86a904455794392feca4514 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 3 May 2010 17:15:18 -0400 Subject: [PATCH] Domain snapshot RNG and tests. Signed-off-by: Chris Lalancette --- docs/schemas/domainsnapshot.rng | 53 +++++++++++++++++++ tests/Makefile.am | 6 ++- tests/domainsnapshotschematest | 10 ++++ .../description_only.xml | 3 ++ tests/domainsnapshotxml2xmlin/empty.xml | 1 + .../name_and_description.xml | 4 ++ tests/domainsnapshotxml2xmlin/name_only.xml | 3 ++ .../all_parameters.xml | 13 +++++ tests/domainsnapshotxml2xmlout/noparent.xml | 9 ++++ .../noparent_nodescription.xml | 7 +++ .../noparent_nodescription_noactive.xml | 6 +++ 11 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 docs/schemas/domainsnapshot.rng create mode 100755 tests/domainsnapshotschematest create mode 100644 tests/domainsnapshotxml2xmlin/description_only.xml create mode 100644 tests/domainsnapshotxml2xmlin/empty.xml create mode 100644 tests/domainsnapshotxml2xmlin/name_and_description.xml create mode 100644 tests/domainsnapshotxml2xmlin/name_only.xml create mode 100644 tests/domainsnapshotxml2xmlout/all_parameters.xml create mode 100644 tests/domainsnapshotxml2xmlout/noparent.xml create mode 100644 tests/domainsnapshotxml2xmlout/noparent_nodescription.xml create mode 100644 tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.rng new file mode 100644 index 0000000000..86bab0b969 --- /dev/null +++ b/docs/schemas/domainsnapshot.rng @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/Makefile.am b/tests/Makefile.am index c5e52e3d87..caf8cd07fc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -76,6 +76,9 @@ EXTRA_DIST = \ nwfilterxml2xmlout \ nwfilterxml2xmlin \ nwfilterschematest \ + domainsnapshotschematest \ + domainsnapshotxml2xmlout \ + domainsnapshotxml2xmlin \ $(patsubst %,qemuhelpdata/%,$(qemuhelpdata)) noinst_PROGRAMS = virshtest conftest \ @@ -123,7 +126,8 @@ test_scripts = \ storagevolschematest \ domainschematest \ nodedevschematest \ - nwfilterschematest + nwfilterschematest \ + domainsnapshotschematest if WITH_LIBVIRTD test_scripts += \ diff --git a/tests/domainsnapshotschematest b/tests/domainsnapshotschematest new file mode 100755 index 0000000000..1bdc5393cd --- /dev/null +++ b/tests/domainsnapshotschematest @@ -0,0 +1,10 @@ +#!/bin/sh + +: ${srcdir=.} +. $srcdir/test-lib.sh +. $abs_srcdir/schematestutils.sh + +DIRS="domainsnapshotxml2xmlin domainsnapshotxml2xmlout" +SCHEMA="domainsnapshot.rng" + +check_schema "$DIRS" "$SCHEMA" diff --git a/tests/domainsnapshotxml2xmlin/description_only.xml b/tests/domainsnapshotxml2xmlin/description_only.xml new file mode 100644 index 0000000000..b76fca2f93 --- /dev/null +++ b/tests/domainsnapshotxml2xmlin/description_only.xml @@ -0,0 +1,3 @@ + + My description + diff --git a/tests/domainsnapshotxml2xmlin/empty.xml b/tests/domainsnapshotxml2xmlin/empty.xml new file mode 100644 index 0000000000..f2bcfbe4bf --- /dev/null +++ b/tests/domainsnapshotxml2xmlin/empty.xml @@ -0,0 +1 @@ + diff --git a/tests/domainsnapshotxml2xmlin/name_and_description.xml b/tests/domainsnapshotxml2xmlin/name_and_description.xml new file mode 100644 index 0000000000..90ce774741 --- /dev/null +++ b/tests/domainsnapshotxml2xmlin/name_and_description.xml @@ -0,0 +1,4 @@ + + snap1 + A longer description! + diff --git a/tests/domainsnapshotxml2xmlin/name_only.xml b/tests/domainsnapshotxml2xmlin/name_only.xml new file mode 100644 index 0000000000..8123a02d27 --- /dev/null +++ b/tests/domainsnapshotxml2xmlin/name_only.xml @@ -0,0 +1,3 @@ + + snapshot1 + diff --git a/tests/domainsnapshotxml2xmlout/all_parameters.xml b/tests/domainsnapshotxml2xmlout/all_parameters.xml new file mode 100644 index 0000000000..ed4a60006c --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/all_parameters.xml @@ -0,0 +1,13 @@ + + my snap name + !@#$%^ + + earlier_snap + + running + 1272917631 + + 9d37b878-a7cc-9f9a-b78f-49b3abad25a8 + + 1 + diff --git a/tests/domainsnapshotxml2xmlout/noparent.xml b/tests/domainsnapshotxml2xmlout/noparent.xml new file mode 100644 index 0000000000..cbac0d8585 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/noparent.xml @@ -0,0 +1,9 @@ + + my snap name + !@#$%^ + running + 1272917631 + + 9d37b878-a7cc-9f9a-b78f-49b3abad25a8 + + diff --git a/tests/domainsnapshotxml2xmlout/noparent_nodescription.xml b/tests/domainsnapshotxml2xmlout/noparent_nodescription.xml new file mode 100644 index 0000000000..0de202d058 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/noparent_nodescription.xml @@ -0,0 +1,7 @@ + + my snap name + !@#$%^ + running + 1272917631 + 1 + diff --git a/tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml b/tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml new file mode 100644 index 0000000000..25b60f3a09 --- /dev/null +++ b/tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml @@ -0,0 +1,6 @@ + + my snap name + !@#$%^ + running + 1272917631 +