Fix swift pollsters that use get_account

this is a followup to I38f9ff2bec0a2a3cb9dfc5c362284e33c12f3127

in swiftclient, head_account and get_account have somewhat different
signatures, specifically order of kwargs. While passing http_conn as
third arg works for head_account, it does not work for get_account.
In order for it to work for both, it must be passed as kwarg.

Change-Id: I5433dc248e3f02c67107466408ed8c9ea8dd16a7
(cherry picked from commit 05ac6c5d52)
This commit is contained in:
Pavlo Shchelokovskyy 2022-06-02 19:05:42 +03:00 committed by Yadnesh Kulkarni
parent 3f775ea457
commit 51b0c368a9
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class _Base(plugin_base.PollsterBase):
yield (t.id, swift_api_method(
None,
keystone_client.get_auth_token(ksclient),
http_conn))
http_conn=http_conn))
except ClientException as e:
if e.http_status == 404:
LOG.warning("Swift tenant id %s not found.", t.id)

View File

@ -207,7 +207,7 @@ class TestSwiftPollster(testscenarios.testcase.WithScenarios,
self.assertEqual(expected, mock_connection.call_args_list)
expected = [mock.call(None, self.manager._auth_token,
mock_connection.return_value)
http_conn=mock_connection.return_value)
for t in ASSIGNED_TENANTS]
self.assertEqual(expected, mock_method.call_args_list)