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

Bug #1635043 reported by Brant Knudson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Invalid
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)
Changed in tempest:
assignee: nobody → Brant Knudson (blk-u)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
status: New → In Progress
Brant Knudson (blk-u)
Changed in tempest:
assignee: Brant Knudson (blk-u) → nobody
Revision history for this message
Martin Kopec (mkopec) wrote :

Based on this [1] identity.v2 tests are deprecated and tempest.api.identity.v3.test_tokens.TokensV3Test.test_create_token passed with such an accounts.yaml as mentioned here. Moving to Invalid.

[1] https://review.opendev.org/#/c/506751/

Changed in tempest:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.