-
Notifications
You must be signed in to change notification settings - Fork 19
add NetworkConnectivity and CorruptedResponses Tests using Wiremock #295
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
Conversation
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.
PR contains unrelated changes. Make sure it's rebased correctly on main and contains only one single commit that reflect the test changes
@jonesbusy due to the specific utils file src/main/generated/Versions.java the build is failing. |
Looks at the CI on main. It works. Build is faling because of spotless. |
I ran spotless and the build was successful. |
I would be great to follow the contributing quideline before opening PR. Not doing it creates extra work for maintainer and lower chances for PR to get merged (even for small changes like this one). Thanks |
Signed-off-by: kartiksharma-git <[email protected]>
apologies for the inconvenience caused |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
=========================================
Coverage 88.20% 88.20%
Complexity 561 561
=========================================
Files 39 39
Lines 1772 1772
Branches 194 194
=========================================
Hits 1563 1563
Misses 132 132
Partials 77 77 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Looking at codecov those 2 tests doesn't increase coverage. I'm fine to keep them since it will be useful for #18 Mergint then. Thanks. |
Signed-off-by: @ikartiksh , [email protected]
Description
Issue #23
shouldHandleNetworkConnectivityLoss
: Simulates a network connectivity loss by having WireMock return a 503 Service Unavailable response. The test verifies that an OrasException with a "Response code: 503" message is thrown when the registry is queried.shouldHandleCorruptedResponse
: Simulates a corrupted blob response by returning a mismatched response body. The test checks that an OrasException is thrown with a "Digest mismatch" message when the blob's digest does not match the expected one.Testing done
Submitter checklist
mvn license:update-file-header
,mvn spotless:apply
,pre-commit run -a
,mvn clean install
before opening the PR