avoid requirement on tarball for unit tests

Bug #1285388 reported by gordon chung
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Chris Dent

Bug Description

we have a test-requirement on swift to test the middleware. it'd be better if we didn't have this to avoid random breakage.

we should look at a way where it's not necessary whether by enabling the test in tempest, rejigging tests to avoid dependency, or if necessary finding an alternative way to gather data rather than through middleware

Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Chris Dent (cdent) wrote :

a) gathering the data via middleware is pretty inefficient, especially as currently written: https://bugs.launchpad.net/ceilometer/+bug/1337761 but my understanding was that there was some resistance from somewhere to drop notifications of this data out of swift itself.

b) If the middleware is going to carry on being the way it is, there's no particular reason to use the webob from swift itself. It's there to provide a fake request environment, which is easy enough to do other ways.

Presumably with _this_ test want to test the middleware itself not swift.

Tempests tests could be created which properly test the use of the middleware against real swift data, if that's desirable. The current tests would not be able to do that.

I'll have this bug if nobody else is chafing to have it.

Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-3
assignee: nobody → Chris Dent (chdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
status: Triaged → In Progress
Revision history for this message
Chris Dent (cdent) wrote :

There's discussion related to this bug on the mailing list: http://lists.openstack.org/pipermail/openstack-dev/2014-July/041522.html which eventually leads to one potential solution: rewrite using oslo middleware.

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

Reviewed: https://review.openstack.org/110302
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=b9f8ef307924b50c1f397fbfc976faccc1fe250a
Submitter: Jenkins
Branch: master

commit b9f8ef307924b50c1f397fbfc976faccc1fe250a
Author: Chris Dent <email address hidden>
Date: Tue Jul 29 15:24:19 2014 +0100

    Use a FakeRequest object to test middleware

    swift was being imported to provide a blank Request
    object but very little of the functionality in that
    object was being used. FakeRequest provides the
    bare minimum funcionality required:

    * REQUEST_METHOD
    * PATH_INFO
    * wsgi.input based on cStringIO
    * custom header manipulation

    Other functionality from swift has either been
    duplicated or replaced:

    * InputProxy (which counts bytes of request bodies)
      has been duplicated.
    * logging uses common log functionality
    * path_split does straight string splits for the desired results

    Note that these changes do nothing to change functionality nor
    anything to address the performance concerns being evaluated
    and discussed elsewhere.

    Closes bug: 1285388

    Change-Id: If0fbb8f00765ac915e5b426a3661492f4b4df9f4

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-3 → 2014.2
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.