This rips NoAuthMiddleware completely out of functional tests by:
- Removing our override of [api]auth_strategy in ConfFixture, allowing
it to default to ``keystone``. This causes the fake wsgi setup to go
through the same pipeline as real API requests; so making that work
entails...
- Mocking out the keystonecontext piece of the paste pipeline to create
the context previously mashed (somewhat inappropriately) into
NoAuthMiddleware. In the future we may want to mock this more
shallowly or find a way to make the req more realistic so it needn't
be mocked at all, but for now this is close to what the noauth2
pipeline used to do.
- Stubbing out the keystonemiddleware piece of the paste pipeline. In
the future we should try to use keystonemiddleware's AuthTokenFixture
so our tests can occur in a more realistic environment, but for now
this is just mimicking what the noauth2 pipeline used to do; except
for...
- Removing the authentication portion of the TestOpenStackClient. This
used to make an actual request(), which landed in NoAuthMiddleware,
which was hacking together some headers (based, it appears, on a
protocol which is many years out of date and no longer approximates
what keystone does, which should be the point if it's going to exist
at all). So now we just hack up the necessary headers inline.
- Doing the addition of project_id in request URIs in OSAPIFixture.
This is another thing that NoAuthMiddleware was doing inappropriately
(IRL the project_id will either be part of the request from the start,
or it won't). It was also only doing it part of the time; as a result,
a couple of tests requesting version documents, which were previously
not expecting the project ID to be present, needed to be modified to
expect it. This better reflects reality.
Change-Id: I459a605b4a9390f0e36356ca1fe432948159acd4