cfg.CONF.state_path set to wrong value in tests

Bug #1363058 reported by Assaf Muller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Assaf Muller

Bug Description

cfg.CONF.state_path is set to a random temporary directory in neutron.tests.base:BaseTestCase.setUp. This value was then over written in neutron.tests.unit.__init__. Tests that need to read or otherwise use cfg.CONF.state_path were getting the directory from which the tests were running and not the temporary directory specially created for the current test run.

Note that the usage of state_path to set lock_path, dhcp state path and the likes was working as expected, and was not affected by this bug.

Tags: unittest
Assaf Muller (amuller)
Changed in neutron:
assignee: nobody → Assaf Muller (amuller)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → juno-3
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/117759
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=dcd3fb9da5ba64b5ae56a97c147f125bb7e33c4c
Submitter: Jenkins
Branch: master

commit dcd3fb9da5ba64b5ae56a97c147f125bb7e33c4c
Author: Assaf Muller <email address hidden>
Date: Fri Aug 29 14:44:10 2014 +0300

    Fix state_path in tests

    cfg.CONF.state_path is set to a random temporary directory
    in neutron.tests.base:BaseTestCase.setUp. This value was then
    over written in neutron.tests.unit.__init__. Tests that need
    to read or pass cfg.CONF.state_path were getting the directory
    from which the tests were running and not the temporary directory
    specially created for the current test run. Note that the usage
    of state_path to set lock_path, dhcp state path and the likes
    was working as expected, and was not affected by this bug.

    Closes-Bug: #1363058
    Change-Id: Ib45f663fadaf0f3b4a79a0db4128822187b61ecc

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