← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1574493] Re: keystone tox -epy27 fail in devstack environment

 

Reviewed:  https://review.openstack.org/309882
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=2183b47af24adc224a45e5ddfdbca1166a39a059
Submitter: Jenkins
Branch:    master

commit 2183b47af24adc224a45e5ddfdbca1166a39a059
Author: ZhiQiang Fan <aji.zqfan@xxxxxxxxx>
Date:   Tue Apr 26 00:15:09 2016 +0800

    do not search file on real environment
    
    Keystone cannot pass tox -epy27 on an environment which has
    installed keystone service because we do not prevent oslo.config
    searching all possible directories for configuration file, the
    failed test is:
    
    keystone.tests.unit.test_cli.CliNoConfigTestCase.test_cli
    
    Unit test code should not rely on or be affected by real
    environment, this patch mocks the oslo.config find_config_files to
    empty as we expected, so it can succeed in every environment.
    
    Change-Id: I0e8ade7414dbc92ca9334242c1369e0f51d2eba5
    Closes-Bug: #1574493


** Changed in: keystone
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1574493

Title:
  keystone tox -epy27 fail in devstack environment

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  reproduce steps:

  1. clone devstack, enable keystone
  2. cd /opt/stack/keystone && tox -epy27

  ==============================
  Failed 1 tests - output below:
  ==============================

  keystone.tests.unit.test_cli.CliNoConfigTestCase.test_cli
  ---------------------------------------------------------

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "keystone/tests/unit/test_cli.py", line 71, in test_cli
          self.assertThat(self.logging.output, matchers.Contains(expected_msg))
        File "/tmp/keystone/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 493, in assertThat
          raise mismatch_error
      testtools.matchers._impl.MismatchError: 'Config file not found, using default configs.' not in u''

  If I remove /etc/keystone/keystone.conf then it will succeed

  As a developer, I always run devstack on my workstation, and as unit
  test code shouldn't rely on or affected by real environment, I think
  this is a bug which should be fixed

  already have a solution, I will fix it by myself

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1574493/+subscriptions


References