← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1413459] Re: test_ec2_list_credentials does a wrong test

 

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

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

Title:
  test_ec2_list_credentials does a wrong test

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  https://github.com/openstack/keystone/blob/master/keystone/tests/test_v3_credential.py#L370
      def test_ec2_list_credentials(self):
          """Test ec2 credential listing."""
          self._get_ec2_cred_uri()
          uri = self._get_ec2_cred_uri()
          r = self.get(uri)
          cred_list = r.result
          self.assertEqual(1, len(cred_list))
  According to current code, I think the test steps is:
  1. create a ec2 credential
  2. list all credentials
  3. assert that list method can get the ec2 credential created before
  But, the author used a wrong method to create ec2 credential and asserted the wrong data:
  1. The method which creates a ec2 credential is self._get_ec2_cred()
  2. cred_list should be r.result['credentials']

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


References