diff options
| author | 白子玉 <baiziyu@inspur.com> | 2019-12-05 11:04:48 +0800 |
|---|---|---|
| committer | 白子玉 <baiziyu@inspur.com> | 2019-12-06 18:41:38 +0800 |
| commit | 3f7fc6808590d0a223124df4e63d4f05b75f831c (patch) | |
| tree | 2a1a53bf72392a031025d2309ad676a183b3f1c0 /openstack_auth/tests | |
| parent | 06d4f2d08890411d89aaf86578acc3a3280b0c56 (diff) | |
| download | horizon-3f7fc6808590d0a223124df4e63d4f05b75f831c.tar.gz | |
Changed default identity url to horizon
The keystone doesn't use 5000 port anymore from Newton version. And all
the references should be changed together.
Change-Id: I3f02686ab5b3abf48f129fde92e90427ca148317
Diffstat (limited to 'openstack_auth/tests')
| -rw-r--r-- | openstack_auth/tests/data_v3.py | 8 | ||||
| -rw-r--r-- | openstack_auth/tests/unit/test_auth.py | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/openstack_auth/tests/data_v3.py b/openstack_auth/tests/data_v3.py index 81429efbf..ae1251429 100644 --- a/openstack_auth/tests/data_v3.py +++ b/openstack_auth/tests/data_v3.py @@ -63,19 +63,19 @@ def generate_test_data(service_providers=False, endpoint='localhost'): 'id': uuid.uuid4().hex, 'endpoints': [ { - 'url': 'http://admin.%s:5000/v3' % endpoint, + 'url': 'http://admin.%s/identity/v3' % endpoint, 'region': 'RegionOne', 'interface': 'admin', 'id': uuid.uuid4().hex, }, { - 'url': 'http://internal.%s:5000/v3' % endpoint, + 'url': 'http://internal.%s/identity/v3' % endpoint, 'region': 'RegionOne', 'interface': 'internal', 'id': uuid.uuid4().hex }, { - 'url': 'http://public.%s:5000/v3' % endpoint, + 'url': 'http://public.%s/identity/v3' % endpoint, 'region': 'RegionOne', 'interface': 'public', 'id': uuid.uuid4().hex @@ -214,7 +214,7 @@ def generate_test_data(service_providers=False, endpoint='localhost'): sp_list = None if service_providers: - test_data.sp_auth_url = 'http://service_provider_endp:5000/v3' + test_data.sp_auth_url = 'http://service_provider_endp/identity/v3' test_data.service_provider_id = 'k2kserviceprovider' # The access info for the identity provider # should return a list of service providers diff --git a/openstack_auth/tests/unit/test_auth.py b/openstack_auth/tests/unit/test_auth.py index a668f2a7f..a125d6924 100644 --- a/openstack_auth/tests/unit/test_auth.py +++ b/openstack_auth/tests/unit/test_auth.py @@ -244,7 +244,7 @@ class OpenStackAuthTestsV3(OpenStackAuthTestsMixin, self.data = data_v3.generate_test_data() self.ks_client_module = client_v3 settings.OPENSTACK_API_VERSIONS['identity'] = 3 - settings.OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v3" + settings.OPENSTACK_KEYSTONE_URL = "http://localhost/identity/v3" self.mox.StubOutClassWithMocks(token_endpoint, 'Token') self.mox.StubOutClassWithMocks(v3_auth, 'Token') @@ -594,7 +594,7 @@ class OpenStackAuthTestsV3(OpenStackAuthTestsMixin, service_provider=target_provider) plugin.get_access(mox.IsA(session.Session)). \ AndReturn(self.sp_data.unscoped_access_info) - plugin.auth_url = 'http://service_provider_endp:5000/v3' + plugin.auth_url = 'http://service_provider_endp/identity/v3' # mock authenticate for service provider sp_projects = [self.sp_data.project_one, self.sp_data.project_two] @@ -833,7 +833,7 @@ class OpenStackAuthTestsWebSSO(OpenStackAuthTestsMixin, self.idp_saml2_id = uuid.uuid4().hex settings.OPENSTACK_API_VERSIONS['identity'] = 3 - settings.OPENSTACK_KEYSTONE_URL = 'http://localhost:5000/v3' + settings.OPENSTACK_KEYSTONE_URL = 'http://localhost/identity/v3' settings.WEBSSO_ENABLED = True settings.WEBSSO_CHOICES = ( ('credentials', 'Keystone Credentials'), @@ -895,7 +895,7 @@ class OpenStackAuthTestsWebSSO(OpenStackAuthTestsMixin, self.assertRedirects(response, redirect_url, status_code=302, target_status_code=404) - @override_settings(WEBSSO_KEYSTONE_URL='http://keystone-public:5000/v3') + @override_settings(WEBSSO_KEYSTONE_URL='http://keystone-public/identity/v3') def test_websso_redirect_using_websso_keystone_url(self): origin = 'http://testserver/auth/websso/' protocol = 'oidc' @@ -935,7 +935,8 @@ class OpenStackAuthTestsWebSSO(OpenStackAuthTestsMixin, self.assertRedirects(response, settings.LOGIN_REDIRECT_URL) def test_websso_login_with_auth_in_url(self): - settings.OPENSTACK_KEYSTONE_URL = 'http://auth.openstack.org:5000/v3' + settings.OPENSTACK_KEYSTONE_URL =\ + 'http://auth.openstack.org/identity/v3' projects = [self.data.project_one, self.data.project_two] domains = [] |
