Skip to content
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

fix(test/bakery): Mock http error using SpinnakerHttpException in CompletedBakeTaskSpec #4711

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

Pranav-b-7
Copy link
Contributor

@Pranav-b-7 Pranav-b-7 commented Apr 25, 2024

With the introduction of the commit: e63a661 , the expected behaviour of all BakeryService APIs is to throw Spinnaker*Exception when any http error has occurred.

This PR aims at correcting this unexpected behaviour.

…mpletedBakeTaskSpec

With the introduction of the commit: e63a661 , the expected behaviour of all BakeryService APIs is to throw Spinnaker*Exception when any http error has occurred.

- CompletedBakeTask is invoking an API : lookupBake(region, bakeid) -https://github.com/spinnaker/orca/blob/d2f50242637207491ba9fdcc40eaf02c3255c447/orca-bakery/src/main/groovy/com/netflix/spinnaker/orca/bakery/tasks/CompletedBakeTask.groovy#L43. This API error response is mocked up with RetrofitError in the test : https://github.com/spinnaker/orca/blob/d2f50242637207491ba9fdcc40eaf02c3255c447/orca-bakery/src/test/groovy/com/netflix/spinnaker/orca/bakery/tasks/CompletedBakeTaskSpec.groovy#L84

- This test case seems to be invalid/irrelevant because it has to throw SpinnakerHttpException here.

This commit aims at correcting this unexpected behaviour.
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Apr 25, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Apr 25, 2024
@mergify mergify bot merged commit c235cf3 into spinnaker:master Apr 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for merge target-release/1.35
Projects
None yet
3 participants