diff --git a/orca-pipelinetemplate/orca-pipelinetemplate.gradle b/orca-pipelinetemplate/orca-pipelinetemplate.gradle index ab515d0e5c..7499e79dbd 100644 --- a/orca-pipelinetemplate/orca-pipelinetemplate.gradle +++ b/orca-pipelinetemplate/orca-pipelinetemplate.gradle @@ -27,7 +27,7 @@ dependencies { annotationProcessor("org.projectlombok:lombok") testImplementation("org.slf4j:slf4j-simple") - testImplementation("org.spockframework:spock-unitils") + testImplementation("org.assertj:assertj-core") testImplementation("org.codehaus.groovy:groovy-json") testImplementation("io.spinnaker.fiat:fiat-core:$fiatVersion") testImplementation("io.spinnaker.kork:kork-retrofit") diff --git a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy index 60b229df94..4468608ffb 100644 --- a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy +++ b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy @@ -37,12 +37,11 @@ import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.model.StageDefinitio import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.render.JinjaRenderer import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.render.Renderer import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.render.YamlRenderedValueConverter -import org.unitils.reflectionassert.ReflectionComparatorMode import spock.lang.Specification import spock.lang.Subject import spock.lang.Unroll -import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals +import static org.assertj.core.api.Assertions.assertThat class PipelineTemplatePipelinePreprocessorSpec extends Specification { @@ -186,7 +185,7 @@ class PipelineTemplatePipelinePreprocessorSpec extends Specification { triggers: [], expectedArtifacts: [] ] - assertReflectionEquals(expected, result, ReflectionComparatorMode.IGNORE_DEFAULTS) + assertThat(expected).usingRecursiveComparison().ignoringActualNullFields().isEqualTo(result) } def 'should render jackson mapping exceptions'() { diff --git a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy index 7405960189..b286b8364f 100644 --- a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy +++ b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/v1schema/V1SchemaIntegrationSpec.groovy @@ -38,13 +38,12 @@ import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.render.Renderer import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.render.YamlRenderedValueConverter import org.springframework.core.io.Resource import org.springframework.core.io.support.PathMatchingResourcePatternResolver -import org.unitils.reflectionassert.ReflectionComparatorMode import org.yaml.snakeyaml.Yaml import org.yaml.snakeyaml.constructor.SafeConstructor import spock.lang.Specification import spock.lang.Unroll -import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals +import static org.assertj.core.api.Assertions.assertThat class V1SchemaIntegrationSpec extends Specification { @@ -89,7 +88,7 @@ class V1SchemaIntegrationSpec extends Specification { def result = subject.process(integration.toRequest()) then: - assertReflectionEquals(expected, result, ReflectionComparatorMode.IGNORE_DEFAULTS) + assertThat(expected).usingRecursiveComparison().ignoringActualNullFields().isEqualTo(result) where: integration << new IntegrationTestDataProvider().provide()