Error in rest_client when checking for response body

Bug #1089544 reported by Armando Migliaccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Armando Migliaccio

Bug Description

When executing Tempest with resize tests enabled I get two stack-traces (both for json and xml):

======================================================================
ERROR: The server's RAM and disk space should be modified to that of
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tempest/tempest/tests/compute/servers/test_server_actions.py", line 153, in test_resize_server_confirm
    self.client.confirm_resize(self.server_id)
  File "/home/tempest/tempest/services/compute/xml/servers_client.py", line 300, in confirm_resize
    str(Document(conf)), self.headers)
  File "/home/tempest/tempest/common/rest_client.py", line 171, in post
    return self.request('POST', url, headers, body)
  File "/home/tempest/tempest/common/rest_client.py", line 217, in request
    raise exceptions.ResponseWithNonEmptyBody(status=resp.status)
ResponseWithNonEmptyBody: RFC Violation! Response with 204 HTTP Status Code MUST NOT have a body

And the culprits are these bodies are:

JSON:
{"confirmResize": null}

XML:
<?xml version="1.0" encoding="UTF-8"?>
<confirmResize />

By looking closely, it looks like rest_client.py line 217 is checking for the wrong body.

I am starting to think that we need unit tests to check for the sanity of the functional tests ;)

Changed in tempest:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/17960

Changed in tempest:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/17960
Committed: http://github.com/openstack/tempest/commit/4949439ce306770d6a469f32e9e760d3ac6eb0a2
Submitter: Jenkins
Branch: master

commit 4949439ce306770d6a469f32e9e760d3ac6eb0a2
Author: Armando Migliaccio <email address hidden>
Date: Wed Dec 12 18:53:30 2012 +0000

    Ensure we check for the right body

    Fixes bug #1089544

    Change-Id: I8c32d93b7826440f41ae3128f17f41d596d3396e

Changed in tempest:
status: In Progress → Fix Released
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.