Open sparshev opened 4 years ago
Nope, we can't use CPS from JenkinsPipelineUnit by default - the implementation contains quite critical issues (for example [1,2,3].findAll { it > 1 }
will return false
instead of [2,3]
), like the one was fixed here: jenkinsci/workflow-cps-plugin#124
Added another implementation of the CPS tests - based on JenkinsRule with groovy-cps interceptor. This implementation seems working fine mvn clean verify
shows almost the same results as the simple JenkinsPipelineUnit tests. But:
MPLTestBase
to the new one MPLTestBaseJenkinsRule
Build.fileExists(openshift)
is one level deeper than required... It could be some sort of issue with the Closure in the test).Reproduced weird behavior during tests running: when old tests running before new ones - new ones will not be completed:
Something in the groovy tests is not working well.
Not weird as figured out - Helper.runModule
replaced in the BuildTest, so it's saved for the future tests executions. Need to add restore the overriding classes state.
TODO: