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
Fixes #17552 - set default api version to v2 #34
Conversation
The URL is correct if the version header is passed - please instead fix the default API version to match Foreman, instead of changing the documentation URL. The question (which I didn't understand) should not be in the commit message. |
1763ddf
to
f6e88ec
Compare
@domcleal Thanks for the review. The question I asked was about testing the API URL (integration testing most likely). How is it usually done via foreman or within the plugin itself or not required at all since functional tests are in place ? Didn't found any tests for api_constraints.rb as well. Should I add them in a different foreman patch ? |
You can add integration tests if you wish, or use Rails' routing test helpers. If you're doing that, I'll set this to WoC. |
Okay I'll test using Rails routing helpers. Alongside while testing entire test suite of foreman_bootdisk I am getting a bunch of errors. Thought it might be familiar to you
Full trace : https://gist.github.com/swapab/abe825973a6db64d7408ab0fb30050f8 Any idea how to fix those ? |
No, that does not look like foreman_bootdisk, disable your other plugins. |
f6e88ec
to
403315b
Compare
@domcleal Test cases added : 403315b#diff-3be020c4f93f48ef73b2df6232dfddd1 |
Merged, thanks @swapab. |
Apipie doc falsely states url(s) for bootdisk API calls.
Example:
/api/generic
should have been/bootdisk/api/v2/generic
.I wasn't sure how to test it. Should the API url be tested from foreman?