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/clouddriver): Mock http error using SpinnakerHttpException in WaitForCloudFormationCompletionTaskSpec #4717

Merged

Conversation

Pranav-b-7
Copy link
Contributor

With the introduction of the commit: 84a7106 , the expected behaviour of all OortService APIs is to throw SpinnakerHttpException when any http error has occurred.

Here in this test the response of the API :

Map getCloudFormationStack(@Path(value = "stackId", encode = false) String stackId);
is mocked up with RetrofitError which makes the test irrelvant.

Wrapping the RetrofitError in SpinnakerHttpException to make it in compliance with the retrofit configuration.

…n WaitForCloudFormationCompletionTaskSpec

With the introduction of the commit: 84a7106 , the expected behaviour of all OortService APIs is to throw SpinnakerHttpException when any http error has occurred.

Here in this test the response of the API : https://github.com/spinnaker/orca/blob/a1b32d7398eb9b1ff610d7f3afd980b51f6cf7b1/orca-clouddriver/src/main/java/com/netflix/spinnaker/orca/clouddriver/OortService.java#L182 is mocked up with RetrofitError which makes the test irrelvant.

Wrapping the RetrofitError in SpinnakerHttpException to make it in compliance with the retrofit configuration.
@dbyron-sf dbyron-sf marked this pull request as ready for review April 29, 2024 19:18
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Apr 29, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Apr 29, 2024
@mergify mergify bot merged commit bc76db0 into spinnaker:master Apr 29, 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
Development

Successfully merging this pull request may close these issues.

3 participants