From 6fcc2608b17d84cf3699bb4a5bae692404393ca1 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 21 Aug 2019 12:20:41 -0500 Subject: 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 --- .../tests/functional/common/test_args.py | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'openstackclient/tests/functional') 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( -- cgit v1.2.1