-
Notifications
You must be signed in to change notification settings - Fork 13
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
KIALI-1766 - Using Swagger to generate Kiali Client #16
Conversation
3b386f3
to
a85500b
Compare
48b190e
to
b18ded5
Compare
- Including Env for Pytest - Pytest - Swagger Class - test_kiali_alternatives (compare old and new request way)
b18ded5
to
7a2d20e
Compare
2190aff
to
0b7cf1c
Compare
- Adding Tests
1f1f896
to
06f0c7a
Compare
This Pull Request included 33 API Tests (one for each REST API available at swagger) |
Consider adding handling/retries for connection errors that appear to be transient and random, during E2E test runs. |
Shouldn't the E2E test take care of that? If there's a connection error, you'll get a Python error which can be easily catched. I don't know why this copy of client removed the error handling, but this is the part from Hawkular's codebase: elif isinstance(e, URLError):
# Cast to HawkularMetricsConnectionError
ee = HawkularConnectionError(e)
ee.msg = "Error, could not send event(s) to the Hawkular Metrics: " + str(e.reason)
raise ee Those are the cases when there's a connection timeout etc. |
I have removed on this PR because we wanted to know more than error message... eg: request, url and other metadata that might be useful to discover if the test failed because of an environmental issue or some problem on API. Maybe I could implement an error handling that can have another. |
Why would those casts remove the access to that information? They were just using inheritance, Point is, I think retry should be in the testing code - not the client code. Otherwise the client's retry might hide something that should be catched by tests. The test should determine which failures are acceptable, not the client. That's my opinion. |
This PR depends on kiali/kiali#693 and kiali/kiali#698 |
Using Swagger to auto-generate the Files and including Requests for some Metadata on Requests