-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dummy identity provider to remove Keystone dependancy during testing #162
base: master
Are you sure you want to change the base?
Conversation
217fddd
to
2e7a9bb
Compare
My apologies for the ugly diff. I should have waited to do linting and formatting at the end. I have re-written The only question I have left is how the test cases should be modified. References to the moved functions above will of course be changed, as well as references to the keystone idp, but I'd still like to ask...
|
We will be using
I'll have to think on that a bit. |
2e7a9bb
to
3288e63
Compare
esi-leap/esi_leap/common/idp/__init__.py Lines 8 to 11 in 3288e63
@larsks I've made the function above to allow code in the esi_leap API to obtain the configured IDP class at runtime, instead of at import time, as we've talked about in our Tuesday meeting. Since test cases can override the config file at runtime, this allows us to make the esi_leap API use arbitrary IDP classes. esi-leap/esi_leap/api/controllers/v1/utils.py Lines 143 to 144 in 3288e63
As shown above, with this change, code in the esi_leap API, such as the Controller classes, will obtain the idp by calling |
3288e63
to
488dedd
Compare
@larsks In this draft update, I have done the following:
I will fix the python 3.8 test later, since it requires a very small fix.
|
during testing The dummy identity provider (idp) can be enabled by setting the environment variable ESI_DEBUG to True. For now, the dummy idp returns information about a dummy project Some functions from `api/controllers/v1/utils.py` have been moved into the only controllers that use them and turned into static class methods. Allow idp injection through config file
488dedd
to
0acb060
Compare
Closes #159 after the draft is complete. The dummy identity provider (idp) can be enabled by setting the environment variable ESI_DEBUG to True. For now, the dummy idp returns information about a dummy project.
Some functions from
api/controllers/v1/utils.py
have been moved into the only controllers that use them and turned into static class methods.Assuming everyone is fine with these draft changes, the remaining steps would be to do some cleanup with the test cases.