keystone/keystone/tests/unit
Julien Danjou 40c3942c12 wsgi: fix base_url finding
The current wsgi.Application.base_url() function does not work correctly
if Keystone runs on something like "http://1.2.3.4/identity" which is now
a default in devstack.

This patch fixes that by using wsgiref.util to parse environment
variable set in WSGI mode to find the real base url and returns the
correct URL. The following environment variables will be used to
produce the effective base url:

  HTTP_HOST
  SERVER_NAME
  SERVER_PORT
  SCRIPT_NAME

Closes-Bug: #1381961
Change-Id: I111c206a8a751ed117c6869f55f8236b29ab88a2
2016-02-16 22:48:08 +00:00
..
auth Use stevedore for auth drivers 2015-06-18 21:04:14 -05:00
backend Merge "Manager support for project cascade delete" 2016-02-12 21:53:02 +00:00
catalog Allow project_id in catalog substitutions 2016-02-15 10:55:23 -06:00
common Avoid "non-Pythonic" method names 2016-02-15 13:15:11 -03:00
config_files Remove additional references to ldap role attribs 2016-01-22 01:41:42 +00:00
contrib Merge "Raise more precise exception on keyword mapping errors" 2016-02-01 17:03:49 +00:00
external Adds interface tests for timeutils 2015-09-23 12:43:37 +00:00
identity Test: make enforce_type=True in CONF.set_override 2016-01-03 20:35:00 +08:00
ksfixtures Moves policy setup into a fixture. 2016-02-10 21:00:29 +00:00
saml2 Add openstack_user_domain to assertion 2015-05-04 14:33:48 -03:00
tests Change LOG.warn to LOG.warning 2016-01-06 19:30:37 +00:00
token Enables token_data_helper tests for Python3 2016-02-11 06:40:35 +00:00
__init__.py Stop using nose as a Python3 test runner 2016-02-11 06:40:24 +00:00
core.py Avoid `None` as a redundant argument to dict.get() 2016-02-15 13:40:50 -03:00
default_catalog.templates Move existing tests to unit 2015-02-13 15:54:29 -06:00
default_fixtures.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
fakeldap.py Avoid `None` as a redundant argument to dict.get() 2016-02-15 13:40:50 -03:00
federation_fixtures.py Move existing tests to unit 2015-02-13 15:54:29 -06:00
filtering.py Fix D202: No blank lines after function docstring (PEP257) 2015-10-28 07:25:04 +00:00
identity_mapping.py Fix D202: No blank lines after function docstring (PEP257) 2015-10-28 07:25:04 +00:00
mapping_fixtures.py Fix some word spellings 2016-02-03 13:33:24 +05:30
rest.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
test_associate_project_endpoint_extension.py Merge "Missing 'region' in service and 'name' in endpoint for EndpointFilterCatalog" 2016-02-12 20:36:12 +00:00
test_auth.py wsgi: fix base_url finding 2016-02-16 22:48:08 +00:00
test_auth_plugin.py Fix order of arguments in assertEqual 2015-09-25 02:06:55 -07:00
test_backend.py Merge "Fixes parameter in duplicate project name creation" 2016-02-16 06:50:57 +00:00
test_backend_endpoint_policy.py Use new_policy_ref consistently 2015-12-09 10:18:36 -08:00
test_backend_endpoint_policy_sql.py Fixes the SQL model tests 2015-03-08 05:34:48 +00:00
test_backend_federation_sql.py Add relay_state_prefix to Service Provider 2015-03-28 06:29:00 +00:00
test_backend_id_mapping_sql.py Use unit.new_domain_ref consistently 2015-11-12 10:14:50 +00:00
test_backend_kvs.py Removed deprecated revoke KVS backend 2016-01-25 01:08:15 -08:00
test_backend_ldap.py Enhance manager list_role_assignments to support group listing 2016-01-26 17:15:32 +00:00
test_backend_ldap_pool.py Remove duplicate LDAP test class 2016-01-22 01:00:14 +00:00
test_backend_rules.py Refactor: change 404 status codes in test names 2015-10-09 15:08:23 +00:00
test_backend_sql.py Merge "refactor: Remove unused test method" 2016-02-12 05:51:27 +00:00
test_backend_templated.py Removes KVS catalog backend 2016-01-19 21:26:30 -05:00
test_catalog.py Remove unfixable FIXME 2015-12-09 15:21:09 -03:00
test_cert_setup.py Use subprocess.check_output instead of Popen 2015-11-25 01:38:54 +00:00
test_cli.py Merge "Adds better logging to the domain config finder" 2016-02-12 09:55:21 +00:00
test_config.py Merge keystone.config into keystone.common.config 2015-11-19 08:24:51 -06:00
test_contrib_s3_core.py Fix string conversion in s3 handler for python 2 2015-11-18 13:25:27 +03:00
test_contrib_simple_cert.py Deprecate simple_cert extension 2016-02-02 15:43:02 -08:00
test_credential.py Consolidate `test_contrib_ec2.py` into `test_credential.py` 2016-02-05 10:22:41 +08:00
test_driver_hints.py Use assertTrue/False instead of assertEqual(T/F) 2015-11-02 09:10:38 +00:00
test_entry_points.py Added CORS support to Keystone 2016-02-10 06:00:00 -08:00
test_exception.py Config option for insecure responses 2015-11-19 08:16:07 -06:00
test_hacking_checks.py Fixes hacking logger test cases to use same base 2016-01-06 19:57:04 +00:00
test_ipv6.py Change tests to use common name for keystone.tests.unit 2015-09-04 18:21:42 +00:00
test_kvs.py Fixes kvs cache key mangling issue for Py3 2015-12-22 09:12:41 -06:00
test_ldap_livetest.py Remove more ldap project references 2016-01-21 22:20:16 +00:00
test_ldap_pool_livetest.py Use unit.new_user_ref consistently 2015-11-17 19:20:33 +00:00
test_ldap_tls_livetest.py Use unit.new_user_ref consistently 2015-11-17 19:20:33 +00:00
test_middleware.py Remove PostParams middleware 2016-02-10 23:58:45 -05:00
test_no_admin_token_auth.py Merge "Refactor: Don't hard code the error code" 2015-09-14 01:58:49 +00:00
test_policy.py Moves policy setup into a fixture. 2016-02-10 21:00:29 +00:00
test_revoke.py Removed deprecated revoke KVS backend 2016-01-25 01:08:15 -08:00
test_sql_livetest.py Move revoke sql migrations to common 2015-11-18 15:14:15 +00:00
test_sql_migrate_extensions.py Remove example extension 2015-11-24 15:07:00 +00:00
test_sql_upgrade.py Add CRUD support for domain specific roles 2016-02-10 17:12:23 +00:00
test_ssl.py Change tests to use common name for keystone.tests.unit 2015-09-04 18:21:42 +00:00
test_token_bind.py Change tests to use common name for keystone.tests.unit 2015-09-04 18:21:42 +00:00
test_token_provider.py Revert "skip test_get_token_id_error_handling to get gate passing" 2016-01-24 23:03:09 +00:00
test_url_middleware.py Fix D204: blank line required after class docstring (PEP257) 2015-10-28 07:25:24 +00:00
test_v2.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
test_v2_controller.py Fixes style issues in a v2 controller tests 2016-01-23 02:05:59 +00:00
test_v3.py AuthContextMiddleware admin token handling 2016-02-11 16:22:31 -06:00
test_v3_assignment.py Expand implied roles in trust tokens 2016-02-12 20:47:42 -05:00
test_v3_auth.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
test_v3_catalog.py Allow project_id in catalog substitutions 2016-02-15 10:55:23 -06:00
test_v3_credential.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
test_v3_domain_config.py Support the reading of default values of domain configuration options 2016-01-15 06:20:38 +00:00
test_v3_endpoint_policy.py Use new_policy_ref consistently 2015-12-09 10:18:36 -08:00
test_v3_federation.py Merge "Expose method list inconsistency in federation api" 2016-02-03 23:04:28 +00:00
test_v3_filters.py Moves policy setup into a fixture. 2016-02-10 21:00:29 +00:00
test_v3_identity.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
test_v3_oauth1.py Make fernet work with oauth1 authentication 2016-02-10 19:10:05 +00:00
test_v3_os_revoke.py Move revoke extension into core 2015-11-18 15:14:07 +00:00
test_v3_policy.py Use new_policy_ref consistently 2015-12-09 10:18:36 -08:00
test_v3_protection.py Merge "Change get_project permission" 2016-02-11 16:58:16 +00:00
test_v3_resource.py Correct docstrings 2016-02-01 21:35:15 -05:00
test_v3_trust.py Deprecate admin_token_auth 2016-02-11 17:07:00 -03:00
test_validation.py Adds validation negative unit tests 2016-02-06 03:29:47 +00:00
test_versions.py Implied Roles API 2016-01-29 16:47:21 +00:00
test_wsgi.py wsgi: fix base_url finding 2016-02-16 22:48:08 +00:00
utils.py Trival: Remove unused logging import 2015-12-26 15:14:25 +08:00