Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(test): replace assertion used from library unitils-core to a…
…ssertj-core while spockframework upgrade to 2.2-groovy-3.0 (#4769) 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.
- Loading branch information