griddynamics / mpl

[IT-36925] Jenkins Shared Modular Pipeline Library
https://blog.griddynamics.com/developing-a-modular-pipeline-library-to-improve-devops-collaboration/
Apache License 2.0
157 stars 97 forks source link

MPL-32 Added working implementation of the JenkinsRule unit tests #49

Open sparshev opened 4 years ago

sparshev commented 4 years ago

TODO:

sparshev commented 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

sparshev commented 4 years ago

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:

sparshev commented 4 years ago

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.

sparshev commented 4 years ago

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.