[libvirt] [libvirt-glib 7/7] Add testcase for gvir_config_domain_[gs]et_custom_xml

Daniel P. Berrange berrange at redhat.com
Mon Feb 6 12:05:06 UTC 2012


On Mon, Feb 06, 2012 at 12:56:17PM +0100, Christophe Fergeau wrote:
> ---
>  libvirt-gconfig/tests/test-domain-create.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c
> index 14636e5..1610587 100644
> --- a/libvirt-gconfig/tests/test-domain-create.c
> +++ b/libvirt-gconfig/tests/test-domain-create.c
> @@ -172,6 +172,13 @@ int main(int argc, char **argv)
>      g_list_free(devices);
>      devices = NULL;
>  
> +    gvir_config_domain_set_custom_xml(domain, "<foo/>", "ns", "http://foo", NULL);
> +    gvir_config_domain_set_custom_xml(domain, "<foo/>", "nsbar", "http://bar", NULL);
> +    gvir_config_domain_set_custom_xml(domain, "<foo/>", "ns", "http://bar", NULL);
> +    gvir_config_domain_set_custom_xml(domain, "<bar/>", "ns", "http://foo", NULL);
> +
> +    g_assert(g_strcmp0(gvir_config_domain_get_custom_xml(domain, "http://foo"), "<ns:bar xmlns:ns=\"http://foo\"/>") == 0);
> +    g_assert(g_strcmp0(gvir_config_domain_get_custom_xml(domain, "http://bar"), "<ns:foo xmlns:ns=\"http://bar\"/>") == 0);

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list