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

test(core): Fix tests that break with groovy upgrade #390

Merged
merged 1 commit into from
Jun 24, 2019
Merged

test(core): Fix tests that break with groovy upgrade #390

merged 1 commit into from
Jun 24, 2019

Conversation

ezimanyi
Copy link
Contributor

A few of the rosco tests fail when we upgrade groovy because groovy no longer considers objects equal they are identical except that a field is null in one vs empty array in the other.

That was masking the fact that we weren't stubbing out the getMaskedPackerParameters function on our mock CloudProviderBakeHandler. Add in that stubbing, and also change the calling code to use the actual accessor rather than the groovy-generated synthetic one.

There's probably a way to factor out some of the common logic in the tests so changes like this don't need to touch as many lines, but for now just making the required change in each test.

A few of the rosco tests fail when we upgrade groovy because
groovy no longer considers objects equal they are identical
except that a field is null in one vs empty array in the other.

That was masking the fact that we weren't stubbing out the
getMaskedPackerParameters function on our mock CloudProviderBakeHandler.
Add in that stubbing, and also change the calling code to use the
actual accessor rather than the groovy-generated synthetic one.

There's probably a way to factor out some of the common logic in the
tests so changes like this don't need to touch as many lines, but
for now just making the required change in each test.
Copy link

@duftler duftler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@maggieneterval maggieneterval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😷

@maggieneterval maggieneterval merged commit 276152c into spinnaker:master Jun 24, 2019
@ezimanyi ezimanyi deleted the fix-groovy-tests branch June 24, 2019 15:13
opsmxdemo pushed a commit to OpsMx/rosco that referenced this pull request Sep 15, 2020
A few of the rosco tests fail when we upgrade groovy because
groovy no longer considers objects equal they are identical
except that a field is null in one vs empty array in the other.

That was masking the fact that we weren't stubbing out the
getMaskedPackerParameters function on our mock CloudProviderBakeHandler.
Add in that stubbing, and also change the calling code to use the
actual accessor rather than the groovy-generated synthetic one.

There's probably a way to factor out some of the common logic in the
tests so changes like this don't need to touch as many lines, but
for now just making the required change in each test.
opsmxdemo pushed a commit to OpsMx/rosco that referenced this pull request Sep 16, 2020
A few of the rosco tests fail when we upgrade groovy because
groovy no longer considers objects equal they are identical
except that a field is null in one vs empty array in the other.

That was masking the fact that we weren't stubbing out the
getMaskedPackerParameters function on our mock CloudProviderBakeHandler.
Add in that stubbing, and also change the calling code to use the
actual accessor rather than the groovy-generated synthetic one.

There's probably a way to factor out some of the common logic in the
tests so changes like this don't need to touch as many lines, but
for now just making the required change in each test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants