kubernetes-client
kubernetes-client copied to clipboard
PoC: MockWebServer based on Vert.x
Description
WIP Still working on this, but it seems that there is a viable solution with not that many breaking changes. However, it seems reasonable that this will deserve a major version change, or some tooling to help users upgrade.
Replaces the io.fabric8:mockwebserver module backend from OkHTTP to Vert.x.
Relates to:
- #2632
- https://github.com/quarkusio/quarkus/pull/14662
- #2764
- #4193
- #4290
- #5449
- #5485
- #5613
- https://github.com/quarkusio/quarkus/issues/29520
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change
- [ ] Chore (non-breaking change which doesn't affect codebase; test, version modification, documentation, etc.)
Checklist
- [x] Code contributed by me aligns with current project license: Apache 2.0
- [ ] I Added CHANGELOG entry regarding this change
- [ ] I have implemented unit tests to cover my changes
- [ ] I have added/updated the javadocs and other documentation accordingly
- [ ] No new bugs, code smells, etc. in SonarCloud report
- [ ] I tested my code in Kubernetes
- [ ] I tested my code in OpenShift
Build seems to be failing because tests haven't been updated to remove okhttp mockwebserver references
Build seems to be failing because tests haven't been updated to remove okhttp mockwebserver references
Maybe it wasn't clear by the description, but this is just WIP. So far only the mockwebserver module has been changed. I still need to migrate some of the tests there to use a different HTTP client instead of OkHttp. The core ones have already been updated and prove that the Mock server preserves the behavior after removing OkHttp.
Once I finish with the initial module I'll start by sending a PR to update the tests from OkHttp to Vert.x while still preserving the OkHttp production code. This way, subsequent PRs will be easier to review since tests won't (shouldn't) need updating.
For my use case, please try to ensure that, no matter what is necessary to represent a response body internally, that it is provided to any client in the exact way that was provided in the expected response. The current version base64 encodes the data, and the received information, when decoded, includes quotes and the encoded body data.
