Running individual tests in the test suite is failing

Bug #1233224 reported by David Stanek on 2013-09-30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
David Stanek

Bug Description

Change I0fd0be98: sync oslo policy" ( was merged over the weekend and broke test functionality for me. Our base TestCase tries to set the policy_file option before it is declared.

Really there are two reasons for this:

  1. Not all of the necessary state is setup before the test run
  2. Some of the tests depend on things that are unrelated to the functionality under test (e.g. why would XML serialization test be broken by changes to the keystone command-line options?)

When I run:

  $ ./

I get lots of these:

  _StringException: Traceback (most recent call last):
    File "/opt/stack/keystone/keystone/tests/", line 259, in setUp
    File "/opt/stack/keystone/keystone/tests/", line 296, in opt
      CONF.set_override(k, v)
    File "/opt/stack/keystone/.venv/local/lib/python2.7/site-packages/oslo/config/", line 1579, in __inner
      result = f(self, *args, **kwargs)
    File "/opt/stack/keystone/.venv/local/lib/python2.7/site-packages/oslo/config/", line 1825, in set_override
      opt_info = self._get_opt_info(name, group)
    File "/opt/stack/keystone/.venv/local/lib/python2.7/site-packages/oslo/config/", line 2095, in _get_opt_info
      raise NoSuchOptError(opt_name, group)
  NoSuchOptError: no such option: policy_file

Fix proposed to branch: master

Changed in keystone:
assignee: nobody → David Stanek (dstanek)
status: New → In Progress
Dolph Mathews (dolph) on 2013-09-30
tags: added: havana-backport-potential
Changed in keystone:
importance: Undecided → Medium

Submitter: Jenkins
Branch: master

commit ca3a073922ef86128337314cacf14d235acbaa31
Author: David Stanek <email address hidden>
Date: Mon Sep 30 15:10:30 2013 +0000

    Imports oslo policy to fix test issues

    Tests inheriting from keystone.tests.TestCase depend on having the
    policy_file command-line option declared before setUp runs. Importing
    the oslo policy module automatically declares the option.

    Fixes-Bug: 1233224
    Change-Id: I939bbdcb7df1c4a59108dced92d4d5c2e96defe2

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-10-02
Changed in keystone:
milestone: none → havana-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers