Switch using token_client to the latest for gate
On tempest-lib 0.8.0, TokenClientJSON is marked as deprecated and a new TokenClient became standard instead. In Tempest unit tests, we are stubbing TokenClientJSON but it doesn't work at all now. This patch makes these unit tests switch to TokenClient for passing the gate job. Change-Id: I6404fd8215a619a90eaeea22afa479639d150872
This commit is contained in:
parent
75655938ed
commit
96e727983c
@ -41,7 +41,7 @@ class TestAccount(base.TestCase):
|
||||
self.useFixture(fake_config.ConfigFixture())
|
||||
self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
|
||||
self.fake_http = fake_http.fake_httplib2(return_type=200)
|
||||
self.stubs.Set(token_client.TokenClientJSON, 'raw_request',
|
||||
self.stubs.Set(token_client.TokenClient, 'raw_request',
|
||||
fake_identity._fake_v2_response)
|
||||
self.useFixture(lockutils_fixtures.ExternalLockFixture())
|
||||
self.test_accounts = [
|
||||
@ -86,7 +86,7 @@ class TestAccount(base.TestCase):
|
||||
return hash_list
|
||||
|
||||
def test_get_hash(self):
|
||||
self.stubs.Set(token_client.TokenClientJSON, 'raw_request',
|
||||
self.stubs.Set(token_client.TokenClient, 'raw_request',
|
||||
fake_identity._fake_v2_response)
|
||||
test_account_class = accounts.Accounts('v2', 'test_name')
|
||||
hash_list = self._get_hash_list(self.test_accounts)
|
||||
|
@ -36,7 +36,7 @@ class ConfiguredV2CredentialsTests(base.TestCase):
|
||||
|
||||
identity_response = fake_identity._fake_v2_response
|
||||
credentials_class = auth.KeystoneV2Credentials
|
||||
tokenclient_class = v2_client.TokenClientJSON
|
||||
tokenclient_class = v2_client.TokenClient
|
||||
identity_version = 'v2'
|
||||
|
||||
def setUp(self):
|
||||
@ -114,7 +114,7 @@ class ConfiguredV3CredentialsTests(ConfiguredV2CredentialsTests):
|
||||
|
||||
credentials_class = auth.KeystoneV3Credentials
|
||||
identity_response = fake_identity._fake_v3_response
|
||||
tokenclient_class = v3_client.V3TokenClientJSON
|
||||
tokenclient_class = v3_client.V3TokenClient
|
||||
identity_version = 'v3'
|
||||
|
||||
def setUp(self):
|
||||
|
@ -37,7 +37,7 @@ class TestTenantIsolation(base.TestCase):
|
||||
self.useFixture(fake_config.ConfigFixture())
|
||||
self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
|
||||
self.fake_http = fake_http.fake_httplib2(return_type=200)
|
||||
self.stubs.Set(json_token_client.TokenClientJSON, 'raw_request',
|
||||
self.stubs.Set(json_token_client.TokenClient, 'raw_request',
|
||||
fake_identity._fake_v2_response)
|
||||
cfg.CONF.set_default('operator_role', 'FakeRole',
|
||||
group='object-storage')
|
||||
|
Loading…
Reference in New Issue
Block a user