Unit tests are not using the Oslo config test fixture correctly

Bug #1630060 reported by Michael Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
High
Michael Johnson

Bug Description

An example:

https://github.com/openstack/octavia/blame/master/octavia/tests/unit/amphorae/drivers/keepalived/jinja/test_jinja_cfg.py#L92

and here:
https://github.com/openstack/octavia/blob/master/octavia/tests/unit/amphorae/drivers/haproxy/test_rest_api_driver.py#L234

These should look like:

from oslo_config import cfg
from oslo_config import fixture as oslo_fixture
conf = self.useFixture(oslo_fixture.Config(cfg.CONF))
conf.config(group="haproxy_amphora", connection_max_retries=2)

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

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

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

Reviewed: https://review.openstack.org/381344
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=81846df1ddd48398eca923ad0bcfb48b233d4c97
Submitter: Jenkins
Branch: master

commit 81846df1ddd48398eca923ad0bcfb48b233d4c97
Author: Michael Johnson <email address hidden>
Date: Mon Oct 3 23:49:04 2016 +0000

    Fixes unit test config override

    Some of the tests were failing due to improper configuration overrides
    in the test cases. This patch fixes those tests to use the current
    recommended method with oslo test fixtures that will cleanup after the
    test.

    Change-Id: I5f1ea16bbc16056aa756415a618a8f4192436dfd
    Closes-Bug: #1630060

Changed in octavia:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/octavia 0.10.0

This issue was fixed in the openstack/octavia 0.10.0 release.

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.