← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1178532] Re: Keystone Client tests find old contrib.ec2

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => havana-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1178532

Title:
  Keystone Client tests find old contrib.ec2

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  When running older keystone client tests one of the first things to
  happen is we remove the keystoneclient module from the loaded modules
  and replace it with the older module that we want to test.

  At some point (obviously post Essex) an ec2 utils file was moved into the keystone client:
      keystone/contrib/ec2/core.py:39 
      from keystoneclient.contrib.ec2 import utils as ec2_utils.

  From what i can make out our tests will only pass if the Essex and
  0.1.1 client tests are run some time after that file has been loaded
  from a fresh version first.

  For example: 
  ./run_tests.sh test_keystoneclient  test_keystoneclient:KcEssex3TestCase
  will fail every test with 
      from keystoneclient.contrib.ec2 import utils as ec2_utils
      ImportError: No module named contrib.ec2

  because it successfully loaded the keystoneclient module that was
  checked out into vendor/python-keystoneclient-essex-3 which does not
  have the contrib/ec2/utils file.

  when we run ./run_tests.sh directly keystone/contrib/ec2/core is
  loaded at least once in the sequence of tests before the client tests
  reset it. This means that ec2_utils is imported from the
  keystoneclient in our library path and the tests succeed.

  As nose resolves tests alphabetically another way of seeing this is to
  rename test_keystoneclient.py -> test_aaakeystoneclient.py and
  ./run_tests.sh so that these tests runs first.

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