diff options
| author | Manuel Desbonnet <manuel.desbonnet@hp.com> | 2014-06-19 11:54:03 +0100 |
|---|---|---|
| committer | Manuel Desbonnet <manuel.desbonnet@hp.com> | 2014-06-23 15:22:57 +0100 |
| commit | a945b3d448a9eba1851e99c3961516cbb1dd4f86 (patch) | |
| tree | f08cf26315be55dd760003e985e7a31e83112e49 /tests | |
| parent | 938031ad526866e72a27d3c566c9cbc2c0d7dd68 (diff) | |
| download | python-glanceclient-a945b3d448a9eba1851e99c3961516cbb1dd4f86.tar.gz | |
Prepend '/' to the delete url for the v2 client
... and update tests to match.
The missing slash results in a non-absolute DELETE request
being sent to the API.
E.g.
DELETE v2/images/62fac489-23b4-4929-87af-2e7236e8542b HTTP/1.1
This is not strictly valid http/1.1 - rfc2616 specifies that the path must
be absolute.
This doesn't cause a problem for the API server, but this can cause
problems if the API server is fronted by something else (see #133161).
It also means that the curl command logged in debug mode has a
bad url.
E.g.
curl -i -X DELETE ... http://10.0.0.13:9292v2/images/...
Change-Id: Ib0c749dedbfcf07303fcddae4512db61b0f3fd78
Closes-bug: #1327101
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/v2/test_images.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/v2/test_images.py b/tests/v2/test_images.py index 149e096..eeabb88 100644 --- a/tests/v2/test_images.py +++ b/tests/v2/test_images.py @@ -118,7 +118,7 @@ fixtures = { }, ), }, - 'v2/images/87b634c1-f893-33c9-28a9-e5673c99239a': { + '/v2/images/87b634c1-f893-33c9-28a9-e5673c99239a': { 'DELETE': ( {}, { @@ -496,7 +496,7 @@ class TestController(testtools.TestCase): self.controller.delete('87b634c1-f893-33c9-28a9-e5673c99239a') expect = [ ('DELETE', - 'v2/images/87b634c1-f893-33c9-28a9-e5673c99239a', + '/v2/images/87b634c1-f893-33c9-28a9-e5673c99239a', {}, None)] self.assertEqual(expect, self.api.calls) |
