Unexpected failure when accounts.yaml doesn't have user ID

Bug #1635043 reported by Brant Knudson on 2016-10-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Undecided
Unassigned

Bug Description

I have a simple accounts.yaml where I only specify the usernames and tenant ID:

- username: 'user1'
  tenant_id: 'user1_tenant_id'
  password: 'user1_password'

- username: 'user2'
  tenant_id: 'user2_tenant_id'
  password: 'user2_password'

A lot of tests pass with just this info because tempest is able to get a token just fine using the username, password, and project ID.

But the tempest.api.identity.v2.test_tokens.TokensTest.test_create_token test is failing with the following traceback:

    Traceback (most recent call last):
      File "/opt/openstack/tempest/local/lib/python2.7/site-packages/tempest/api/identity/v2/test_tokens.py", line 48, in test_create_token
        tenant_name)
      File "/opt/openstack/tempest/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/opt/openstack/tempest/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: u'720429' != None

Since the creds doesn't have the user ID, it's trying to match the token's userID with the nonexistant userID in accounts.yaml and failing.

This test should have passed. Tempest doesn't know what the user ID is supposed to be since it's not specified in accounts.yaml so it should just verify that a user ID is present in the token.

Alternatively, tempest could look up the user and check that the ID in the token matches the user's ID.

Brant Knudson (blk-u) on 2016-10-19
Changed in tempest:
assignee: nobody → Brant Knudson (blk-u)

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

Changed in tempest:
status: New → In Progress
Brant Knudson (blk-u) on 2018-02-04
Changed in tempest:
assignee: Brant Knudson (blk-u) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers