unittests cannot be run without installation

Bug #1196275 reported by Monty Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Monty Taylor

Bug Description

Due to the move of glance-manage to entrypoints, it's now not possible to run glance's unittests in a non-installed location, which makes things awkward for packagers.

Eventually, glance manage should be able to be importable so that we could just use it - but this is prevented by the global oslo.config object. Until that gets fixed, a workaround is to make glance.cmd.manage able to be run via python -m and then execute that via sys.executable so that we ensure it picks up the current running python (in case of virtualenvs)

Monty Taylor (mordred)
Changed in glance:
milestone: none → havana-2
assignee: nobody → Monty Taylor (mordred)
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/35044
Committed: http://github.com/openstack/glance/commit/bc8e71acfc7b7794cc4c078c2717e226b05b9525
Submitter: Jenkins
Branch: master

commit bc8e71acfc7b7794cc4c078c2717e226b05b9525
Author: Monty Taylor <email address hidden>
Date: Sun Jun 30 16:51:18 2013 +0000

    Use python module loading to run glance-manage

    Executing glance-manage in a unittest context means that we need
    to install glance first, which breaks packaging workflow.

    Fixes bug 1196275.

    Change-Id: Idf0a332c2f2ffd3eb96d3623c32cf5383a0d9887

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-2 → 2013.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.