barbican/barbican/tests
Stefan Nica 27cf2f37f6 Fix duplicate paths in secret hrefs
Reconstructing the base URL from a request when
host_href is not set must take into account that
an URL path may consist of and endpoint part followed
by a resource path, e.g.:

'http://localhost/key-manager/v1/secrets/25a24d6b-605e-4226-ab39-7e2d8e10f559'

where the endpoint URL is `http://localhost/key-manager/v1`

The pecan.request.application_url is used instead of
pecan.request.url to retrieve the base URL part
(`http://localhost/key-manager/v1`) excluding the resource
path. However, the /v1 version particle is included into the
application_url value because it is implemented by a wsgi
application rather than a pecan controller, so the /v1 bit
also needs to be removed from the base URL when present.

Change-Id: I3c05f3d2f9a970213ca8347d7bbe1aac203af0a1
Closes-Bug: #1749217
(cherry picked from commit ff55d17034)
2019-08-22 13:59:49 +00:00
..
api Fix response status for invalid routes 2018-07-24 11:59:13 -05:00
cmd Refactor PKCS#11 to allow configurable mechanisms 2018-08-10 22:24:34 -05:00
common Fix the bug of pep8 and building api-guide 2019-08-07 22:39:02 +00:00
model Merge "Removed unnecessary setUp() calls in tests" 2017-09-13 02:56:35 +00:00
objects Initial the unit-tests of OVO for Barbican 2018-07-15 10:39:12 +07:00
plugin Fix the bug of pep8 and building api-guide 2019-08-07 22:39:02 +00:00
queue Remove Certificate Orders and CAs from API 2017-12-13 10:40:28 +07:00
tasks Removed unnecessary setUp() calls in tests 2017-08-02 11:25:52 +02:00
__init__.py Make a whole host of modules hacking 0.9.2 compliant 2014-09-01 23:59:44 -05:00
certificate_utils.py Fixes for Running Functional Tests with Python 3.5 2017-04-27 13:06:14 -04:00
database_utils.py Remove usage of parameter enforce_type 2017-05-29 09:55:15 +05:30
fixture.py Use oslo.db create_engine instead of SQLAlchemy 2017-04-28 03:13:28 +00:00
keys.py Merge "Replace pycrypto with cryptography in translations" 2017-05-05 19:26:58 +00:00
test_hacking.py Remove log translation related check 2017-03-30 09:25:20 +08:00
test_middleware_auth.py update some documents about the keystone "API v2.0" 2018-05-12 23:32:12 +08:00
utils.py Fix duplicate paths in secret hrefs 2019-08-22 13:59:49 +00:00