Commit Graph

13 Commits

Author SHA1 Message Date
Ding Jin e85c6b6193 Move load_auth_fixtures()
Move load_auth_fixtures() to the BaseTest class.

Change-Id: I838848114acd8a2e24f89b0cf748eeb19738050f
2018-07-05 09:10:17 -04:00
Kristi Nikolla 61a8444c27 Don't put project_id in path if it wasn't there
This fixes the case that when a request looking like
http://example.com/resource/volume
and containing a token comes to the proxy, we translate it to
http://cinder.local/volume/<project_id>

This happens because we populate the project_id information of
a request either from the url, or from the token.

Change-Id: Ie83fec4910eff750ba15f5485428c23ec3505e3b
2018-06-07 00:27:15 -04:00
Lohith 902c033af8 Avoid request loops between mixmatch proxies
Closes-Bug:#1763549

Change-Id: I9ad9a2363024ce722c1cb2b1bac27be755fc6888
2018-05-02 16:26:59 -04:00
Jeremy Freudberg a85cf6bf52 Stop using six.b and six.u
For a better developer experience, accomplish removal of six.b and
six.u by changing how Werkzeug response objects are handled in the
relevant unit tests.

Change-Id: Iac36e5fd9eb7ef78e6c8e9e8bff1c596e2e5823e
2017-07-31 17:51:22 +00:00
Kristi Nikolla 6673e2e6f2 Preliminary extension support + Name routing
This introduces preliminary support for extensions.
Extensions are registered to routes, and if the
request matches the registered route they will be
called to handle the request and the response.
The interface is still not finalized and will
progress as more extensions with their different
requirements are added.

Also included dependency on oslo_serialization for
loading the json response. Follow up patch will
change all instances of json.loads to
jsonutils.loads

Change-Id: I9c573ce1d4ebe85c07c8ff219f384e3c6c67b39a
2017-07-21 16:05:13 -04:00
Kristi Nikolla 4bb9dd6841 The Volume API now supports user messages
This tentatively adds support for that API by letting the
microversion header OpenStack-API-Version go through. Also
added a few unit tests just to check that we're properly routing
the messages path.

Change-Id: Ie21b15ee5d33085e0515a129ea4ef89836ca8d57
2017-07-05 17:04:19 +00:00
Kristi Nikolla 4d44d0bb0d Pop limit and marker only during aggregation
Change-Id: Id0eeb99c46f340dc1a5a151690cb2580c6f15ccb
2017-02-10 11:44:48 -05:00
Eric Juma e1fab7c7ce Allow normal response to unactioned calls if aggregation disabled
Also some mild refactoring in proxy.py. Now unversioned/unactioned calls
can go through without authentication. Renamed self.detailed to the more
descriptive strip_details.

Co-Authored-By: Kristi Nikolla <knikolla@bu.edu>

Change-Id: I5c3a0ab7c020fba480319f11cd1637d5c1f07e11
2017-02-01 14:01:37 -05:00
Kristi Nikolla aba889e244 Refactoring of test_volumes
Added some global session_fixtures to the BaseTest and migrated
test_volumes to use those. Also added url building helper
function.

Change-Id: I655183f7286a046cd272092bd3e5698a1160d029
2017-01-31 11:39:04 -05:00
Eric Juma 4fe468b259 Use samples module instead of hard-coded samples in tests
Replace hard-coded samples with the samples from the samples
module. Add more samples/features to samples module if necessary.

Change-Id: I500b4b23f08358dc16f49ff0ad45e77e6d04f18b
2016-12-22 16:20:22 -05:00
Eric Juma 00d42785d5 New samples for tests
Add JSON sample files in the new samples directory. Use these
sample files in the samples module. Refactor tests to use new
samples.

Change-Id: I414c62ddbe5ed3fc7c4d9474a4dad5142af2d51b
2016-12-22 18:11:26 +00:00
Eric Juma ad37451c60 Added tests to cover more cases with volumes
Change-Id: I1250d30c52119165418815d07d4731b3d5ee180c
2016-12-13 18:02:55 -05:00
wjdan.alharthi b6adaa8265 Refactor unit tests
changes the structure of unit tests directory by seperating
image tests from volume tests. Created a base for common
classes used by both.

Change-Id: I0e62b25f33d9d30051808927182081dbdc24eced
2016-12-08 16:44:59 +00:00