Tests error out when running tests with --debug after oslo.log graduation

Bug #1433785 reported by Ian Cordasco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Ian Cordasco

Bug Description

If you want to debug into the tests, you might do "./run_tests.sh --debug -V glance.tests.unit.v1.test_api.TestGlanceAPI"

This translated to "python -m testtools.run glance.tests.unit.v1.test_api.TestGlanceAPI" which errors out because we attempt to set CONF.debug but the debug option hasn't been registered. This is registered by oslo.log and when using testtools.run, it seems to not be registered (probably because of how testtools imports tests). This prevents tests from running properly and from debugging into them.

Revision history for this message
Ian Cordasco (icordasc) wrote :
Erno Kuvaja (jokke)
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/165812
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=7c419a60b197e1dde9548bbd78b2754323e45eac
Submitter: Jenkins
Branch: master

commit 7c419a60b197e1dde9548bbd78b2754323e45eac
Author: Ian Cordasco <email address hidden>
Date: Wed Mar 18 15:54:38 2015 -0500

    Register oslo.log's config options in tests

    When running tests with testr oslo.log's config options are always
    registered even if you're only running one test. When you wish to debug
    into your tests and use python -m testtools.run these options will not
    be registered.

    Closes-bug: 1433785
    Change-Id: Ie3426cee8cd3f6f1222529160d39b281af5ce317

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-1 → 11.0.0
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.