diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2019-08-21 12:20:41 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2019-08-27 11:08:50 -0500 |
| commit | 6fcc2608b17d84cf3699bb4a5bae692404393ca1 (patch) | |
| tree | 89b8d4bcfb2d61cb9523ecddaa1bd110242af2f2 /openstackclient/tests/functional/common | |
| parent | 6c818c492569bc9304c166a79bf812603cbb6358 (diff) | |
| download | python-openstackclient-6fcc2608b17d84cf3699bb4a5bae692404393ca1.tar.gz | |
Remove token_endpoint auth type
The token_endpoint was a compatibility auth type to maintain support
for the --url global option that dated back to the beginning of
OpenStack CLI auth. The common keystoneauth library implements
'admin_token' which provides the same functionality using
--endpoint rather than --url.
Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Diffstat (limited to 'openstackclient/tests/functional/common')
| -rw-r--r-- | openstackclient/tests/functional/common/test_args.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/openstackclient/tests/functional/common/test_args.py b/openstackclient/tests/functional/common/test_args.py index dd1fd0fb..02cad6c1 100644 --- a/openstackclient/tests/functional/common/test_args.py +++ b/openstackclient/tests/functional/common/test_args.py @@ -12,6 +12,8 @@ import json +from tempest.lib import exceptions as tempest_exc + from openstackclient.tests.functional import base @@ -49,19 +51,17 @@ class ArgumentTests(base.TestCase): ) def test_auth_type_token_endpoint_opt(self): - cmd_output = json.loads(self.openstack( - 'configuration show -f json --os-auth-type token_endpoint', - cloud=None, - )) - self.assertIsNotNone(cmd_output) - self.assertIn( - 'auth_type', - cmd_output.keys(), - ) - self.assertEqual( - 'token_endpoint', - cmd_output['auth_type'], - ) + # Make sure token_endpoint is really gone + try: + self.openstack( + 'configuration show -f json --os-auth-type token_endpoint', + cloud=None, + ) + except tempest_exc.CommandFailed as e: + self.assertIn('--os-auth-type: invalid choice:', str(e)) + self.assertIn('token_endpoint', str(e)) + else: + self.fail('CommandFailed should be raised') def test_auth_type_password_opt(self): cmd_output = json.loads(self.openstack( |
