Update parameters for authtoken middleware

... to avoid warnings from the middleware about deprecated parameters.
Currently parameters of each auth plugin are not loaded in unit tests
so user credentials are not updated but just removed.

Change-Id: I6e420dac51ac8cf92eadb1c3a3d4716a96c22001
This commit is contained in:
Takashi Kajinami 2021-08-21 02:32:27 +09:00
parent 00c2e99b5a
commit 6e72471a41
1 changed files with 1 additions and 10 deletions

View File

@ -33,11 +33,7 @@ class TestCheckAuth(base.BaseTest):
@mock.patch.object(auth_token, 'AuthProtocol', autospec=True)
def test_middleware(self, mock_auth):
self.cfg.config(group='keystone_authtoken',
admin_user='admin',
admin_tenant_name='admin',
admin_password='password',
www_authenticate_uri='http://127.0.0.1:5000',
identity_uri='http://127.0.0.1:35357')
www_authenticate_uri='http://127.0.0.1:5000')
app = mock.Mock(wsgi_app=mock.sentinel.app)
utils.add_auth_middleware(app)
@ -47,13 +43,8 @@ class TestCheckAuth(base.BaseTest):
self.assertEqual(mock.sentinel.app, args[0])
args1 = args[1]
self.assertEqual('admin', args1['admin_user'])
self.assertEqual('admin', args1['admin_tenant_name'])
self.assertEqual('password', args1['admin_password'])
self.assertTrue(args1['delay_auth_decision'])
self.assertEqual('http://127.0.0.1:5000',
args1['www_authenticate_uri'])
self.assertEqual('http://127.0.0.1:35357', args1['identity_uri'])
def test_admin(self):
request = mock.Mock(headers={'X-Identity-Status': 'Confirmed'})