[libgovirt] test-govirt: Add 'display' node to vm XMLs



commit e0ae1dce1e0530b3dfbbcbdb1252408e51f1fee0
Author: Eduardo Lima (Etrunko) <etrunko redhat com>
Date:   Fri Jun 22 18:18:53 2018 -0300

    test-govirt: Add 'display' node to vm XMLs
    
    Makes 'make distcheck' pass again. Test-govirt was failing since commit
    736b0e8, because the 'display' node is mandatory, but the return value
    of the function vm_set_display_from_xml() had been ignored.
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko redhat com>

 tests/test-govirt.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/tests/test-govirt.c b/tests/test-govirt.c
index f090d2b..5b137ae 100644
--- a/tests/test-govirt.c
+++ b/tests/test-govirt.c
@@ -241,6 +241,10 @@ static void govirt_mock_httpd_add_vms(GovirtMockHttpd *httpd, MockOvirtVm vms[],
 
         g_string_append_printf(vms_xml, "<vm href=\"/ovirt-engine/api/vms/%s\" id=\"%s\">", vm->uuid, 
vm->uuid);
         g_string_append_printf(vms_xml, "<name>%s</name>", vm->name);
+        g_string_append_printf(vms_xml, "<display> \
+                                           <type>spice</type> \
+                                           <monitors>1</monitors> \
+                                         </display>");
         g_string_append_printf(vms_xml, "</vm>");
     }
     g_string_append(vms_xml, "</vms>");
@@ -347,9 +351,17 @@ static void test_govirt_list_duplicate_vms(void)
     const char *vms_body = "<vms> \
                               <vm href=\"/ovirt-engine/api/vms/uuid0\" id=\"uuid0\"> \
                                 <name>vm0</name> \
+                                <display> \
+                                  <type>spice</type> \
+                                  <monitors>1</monitors> \
+                                </display> \
                               </vm> \
                               <vm href=\"/ovirt-engine/api/vms/uuid1\" id=\"uuid1\"> \
                                 <name>vm0</name> \
+                                <display> \
+                                  <type>spice</type> \
+                                  <monitors>1</monitors> \
+                                </display> \
                               </vm> \
                             </vms>";
 
@@ -394,6 +406,10 @@ static void test_govirt_http_404(void)
     const char *vms_body = "<vms> \
                               <vm href=\"/ovirt-engine/api/vms/uuid0\" id=\"uuid0\"> \
                                 <name>vm0</name> \
+                                <display> \
+                                  <type>spice</type> \
+                                  <monitors>1</monitors> \
+                                </display> \
                               </vm> \
                             </vms>";
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]