Consoles tests API (xml) is incorrectly named

Bug #1083642 reported by Yolanda Robla
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Yolanda Robla

Bug Description

There is a bug in the Consoles test API for XML, it's incorrectly named so that test class needs to be renamed.

Changed in nova:
assignee: nobody → Yolanda Robla (yolanda.robla)
status: New → In Progress
Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

There is a problem with the XML validation:

19:59:49 ======================================================================
19:59:49 ERROR: nova.tests.integrated.test_api_samples.ConsolesSampleXmlTests.test_get_vnc_console
19:59:49 ----------------------------------------------------------------------
19:59:49 _StringException: Traceback (most recent call last):
19:59:49 File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 1632, in test_get_vnc_console
19:59:49 subs, response)
19:59:49 File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 238, in _verify_response
19:59:49 self._verify_something(subs, expected, sample_data)
19:59:49 File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 205, in _verify_something
19:59:49 result = self._pretty_data(data)
19:59:49 File "/home/jenkins/workspace/gate-nova-python26/nova/tests/integrated/test_api_samples.py", line 74, in _pretty_data
19:59:49 xml = etree.XML(data)
19:59:49 File "lxml.etree.pyx", line 2736, in lxml.etree.XML (src/lxml/lxml.etree.c:54506)
19:59:49 File "parser.pxi", line 1578, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:82843)
19:59:49 File "parser.pxi", line 1457, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:81641)
19:59:49 File "parser.pxi", line 965, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:78311)
19:59:49 File "parser.pxi", line 569, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:74567)
19:59:49 File "parser.pxi", line 650, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:75458)
19:59:49 File "parser.pxi", line 590, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:74791)
19:59:49 XMLSyntaxError: EntityRef: expecting ';', line 4, column 93

The problem is caused because there is an & that comes in that URL container and it's making etree crash. I tried to use the atom:link mapping but then i'm having a problem, the validation complains because no nsmap is coming in the response. The response that fails is something like that:

<?xml version='1.0' encoding='UTF-8'?>
<console>
 <type>novnc</type>
 <url>http://example.com:6080/vnc_auto.html?token=f9906a48-b71e-4f18-baca-c987da3ebdb3&title=dafa(75ecef58-3b8e-4659-ab3b-5501454188e9)</url>
</console>

The & is making that crash. What can we do to allow the test to be passed?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/16841
Committed: http://github.com/openstack/nova/commit/324ae560c33610f8fc741ada8fff8de9e09a68e5
Submitter: Jenkins
Branch: master

commit 324ae560c33610f8fc741ada8fff8de9e09a68e5
Author: Yolanda Robla <email address hidden>
Date: Sun Nov 25 09:25:48 2012 +0000

    Renaming xml test class in sample tests of consoles API.

    Partially implements blueprint nova-api-samples
    Fixes bug 1083642

    Change-Id: I9ed16780e9a75a1fa34afac5c7861a0595180596

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.