Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(clouddriver/test): refactor Spy.with{} closure during upgrad…
…e to groovy 3.x (#4545) While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, encountered the following errors in groovy test orca-clouddriver module: ``` No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) groovy.lang.MissingMethodException: No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps_closure4(AbstractDeployStrategyStageSpec.groovy:51) at app//groovy.lang.Closure.call(Closure.java:412) at app//groovy.lang.Closure.call(Closure.java:428) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps(AbstractDeployStrategyStageSpec.groovy:50) No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) groovy.lang.MissingMethodException: No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps_closure4(AbstractDeployStrategyStageSpec.groovy:51) at app//groovy.lang.Closure.call(Closure.java:412) at app//groovy.lang.Closure.call(Closure.java:428) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps(AbstractDeployStrategyStageSpec.groovy:50) No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) groovy.lang.MissingMethodException: No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps_closure4(AbstractDeployStrategyStageSpec.groovy:51) at app//groovy.lang.Closure.call(Closure.java:412) at app//groovy.lang.Closure.call(Closure.java:428) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps(AbstractDeployStrategyStageSpec.groovy:50) No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) groovy.lang.MissingMethodException: No signature of method: com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStage.getNoStrat() is applicable for argument types: () values: [] Possible solutions: getNoStrategy(), setNoStrategy(com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.NoStrategy) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps_closure4(AbstractDeployStrategyStageSpec.groovy:51) at app//groovy.lang.Closure.call(Closure.java:412) at app//groovy.lang.Closure.call(Closure.java:428) at com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.strategies.AbstractDeployStrategyStageSpec.should compose list of steps(AbstractDeployStrategyStageSpec.groovy:50) ``` To fix this issue replaced with{} closure with individual properties of Spy object.
- Loading branch information