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

refactor(test): replace assertion used from library unitils-core to assertj-core while spockframework upgrade to 2.2-groovy-3.0 #4769

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Aug 2, 2024

While upgrading spockframework from 2.0-groovy-3.0 to 2.2-groovy-3.0, encountered below errors during test execution of orca-pipelinetemplate module:

> Task :orca-pipelinetemplate:compileTestGroovy FAILED
startup failed:
/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy: 40: unable to resolve class org.unitils.reflectionassert.ReflectionComparatorMode
 @ line 40, column 1.
   import org.unitils.reflectionassert.ReflectionComparatorMode
   ^

/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy: 45: unable to resolve class org.unitils.reflectionassert.ReflectionAssert
 @ line 45, column 1.
   import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals
   ^

/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy: 41: unable to resolve class org.unitils.reflectionassert.ReflectionComparatorMode
 @ line 41, column 1.
   import org.unitils.reflectionassert.ReflectionComparatorMode
   ^

/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy: 47: unable to resolve class org.unitils.reflectionassert.ReflectionAssert
 @ line 47, column 1.
   import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals
   ^

4 errors

The org.unitils:unitils-core dependency has been dropped from spock 2.2, that is part of spock 2.0, this breaking change causes the above mentioned issue. The unitils-core is a dormant library since 2017, so replacing it with assertj-core to resolve this issue.

…ssertj-core while spockframework upgrade to 2.2-groovy-3.0

While upgrading spockframework from 2.0-groovy-3.0 to 2.2-groovy-3.0, encountered below errors during test execution of orca-pipelinetemplate module:
```
> Task :orca-pipelinetemplate:compileTestGroovy FAILED
startup failed:
/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy: 40: unable to resolve class org.unitils.reflectionassert.ReflectionComparatorMode
 @ line 40, column 1.
   import org.unitils.reflectionassert.ReflectionComparatorMode
   ^

/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy: 45: unable to resolve class org.unitils.reflectionassert.ReflectionAssert
 @ line 45, column 1.
   import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals
   ^

/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy: 41: unable to resolve class org.unitils.reflectionassert.ReflectionComparatorMode
 @ line 41, column 1.
   import org.unitils.reflectionassert.ReflectionComparatorMode
   ^

/orca/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy: 47: unable to resolve class org.unitils.reflectionassert.ReflectionAssert
 @ line 47, column 1.
   import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals
   ^

4 errors
```
The `org.unitils:unitils-core` dependency has been dropped from [spock 2.2](https://repo1.maven.org/maven2/org/spockframework/spock-unitils/2.2-groovy-3.0/spock-unitils-2.2-groovy-3.0.pom), that is part of [spock 2.0](https://repo1.maven.org/maven2/org/spockframework/spock-unitils/2.0-groovy-3.0/spock-unitils-2.0-groovy-3.0.pom), this breaking change causes the above mentioned issue.
The `unitils-core` is a dormant library since 2017, so replacing it with `assertj-core` to resolve this issue.
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Aug 2, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Aug 2, 2024
@mergify mergify bot merged commit 6cc873f into spinnaker:master Aug 2, 2024
5 checks passed
@j-sandy j-sandy deleted the unitils2assertj branch August 2, 2024 17:33
This pull request was closed.
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