kubernetes-client icon indicating copy to clipboard operation
kubernetes-client copied to clipboard

PoC: MockWebServer based on Vert.x

Open manusa opened this issue 1 year ago • 7 comments

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

manusa avatar Dec 04 '23 13:12 manusa

Build seems to be failing because tests haven't been updated to remove okhttp mockwebserver references

rohanKanojia avatar Dec 05 '23 08:12 rohanKanojia

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.

manusa avatar Dec 12 '23 06:12 manusa

Quality Gate Failed Quality Gate failed

Failed conditions

66.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jan 30 '24 06:01 sonarqubecloud[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
67.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 05 '24 13:03 sonarqubecloud[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
67.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 09 '24 08:05 sonarqubecloud[bot]

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.

Steve973 avatar Jun 18 '24 14:06 Steve973

Quality Gate Failed Quality Gate failed

Failed conditions
67.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Aug 12 '24 14:08 sonarqubecloud[bot]