-
Notifications
You must be signed in to change notification settings - Fork 102
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
Make consume respect the controller name in the url #1038
Conversation
2d7b6b7
to
a844ec9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. Could you please check if there's a test with a controller name in the endpoint url? If not we should add that (for parse_offer_url
, or _get_source_api
) I'd be ok if it's a mocked test within tests/unit
if coming up with a sensible integration test is hard. We just need to ensure the capability is there for future. Hope that makes sense.
Also looks like we need a rebase.
consume takes a controller_name argument. This is not needed and should be automatically generated from the offer url. A deprecation warning is logged and the variable is not used. Also update offer and consume integration tests to no longer be skipped.
5cb9a8e
to
74c847c
Compare
I've added a unit test which checks the consume behavior, though its uses a lot of mocks. I've also changed it so you can use the controller_name argument as expected, just to ensure that we don't break anything with this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this looks good 👍 mocking is fine as we can't bootstrap, the purpose of the test is just to protect the api in the future.
/merge |
#1056 ## What's Changed * Make consume respect the controller name in the url by @Aflynn50 in #1038 * Fix multiline description in textarea in bug template GH workflow by @cderici in #1041 * Fix issue with microk8s proxy by @Aflynn50 in #1044 * add missing "revision" parameter to addModel step. by @Thanhphan1147 in #1043 * Add user api to pylibjuju documentation by @cderici in #1049 ## New Contributors * @Thanhphan1147 made their first contribution in #1043 **Full Changelog**: 3.4.0.0...3.5.0.0
Description
consume
takes acontroller_name
argument. This is not needed and should be automatically generated from the offer url. A deprecation warning is logged and the variable is not used.Also update offer and consume integration tests to no longer be skipped.
This helps avoid #1031
QA Steps
All CI tests need to pass.