Invalid keyword argument in tempest test.py

asked 2019-07-19 09:28:56 -0500

jh629g gravatar image

updated 2019-07-19 10:06:48 -0500

I recently established a standalone tempest plugin and am working on making the tests run as expected. I ran into this issue:

setUpClass (ranger_tempest_plugin.tests.api.test_regions.TestTempestRegion) Captured traceback:

Traceback (most recent call last):
  File "/opt/stack/tempest/tempest/test.py", line 173, in setUpClass
    six.reraise(etype, value, trace)

  File "/opt/stack/tempest/tempest/test.py", line 158, in setUpClass
    cls.setup_credentials()

  File "/opt/stack/tempest/tempest/test.py", line 377, in setup_credentials
    credential_type=credentials_type)

  File "/opt/stack/tempest/tempest/test.py", line 686, in get_client_manager
    manager = cls.client_manager(credentials=creds.credentials)

TypeError: __init__() got an unexpected keyword argument 'credentials'

A keyword argument in test.py within tempest is preventing tests from running, claiming unexpected argument sent to init.

If I change line 686 of test.py in tempest to: manager = cls.client_manager(creds.credentials)

This change causes the tests to run perfectly fine. The init statements for both Manager (which the variable client_manager represents) and the class it inherits from, ServiceClients in tempest library, take the argument credentials as keywords.

edit retag flag offensive close merge delete