2018-02-01 10:42:53 +02:00
|
|
|
package util
|
2018-01-26 15:55:15 +02:00
|
|
|
|
2018-02-01 10:42:53 +02:00
|
|
|
import org.junit.rules.RuleChain
|
2018-01-26 15:55:15 +02:00
|
|
|
|
2018-02-01 10:42:53 +02:00
|
|
|
import com.lesfurets.jenkins.unit.BasePipelineTest
|
2018-01-26 15:55:15 +02:00
|
|
|
import com.lesfurets.jenkins.unit.global.lib.LibraryConfiguration
|
|
|
|
|
|
|
|
public class Rules {
|
|
|
|
|
|
|
|
public static RuleChain getCommonRules(BasePipelineTest testCase) {
|
|
|
|
return getCommonRules(testCase, null)
|
|
|
|
}
|
|
|
|
|
|
|
|
public static RuleChain getCommonRules(BasePipelineTest testCase, LibraryConfiguration libConfig) {
|
|
|
|
return RuleChain.outerRule(new JenkinsSetupRule(testCase, libConfig))
|
|
|
|
.around(new JenkinsReadYamlRule(testCase))
|
|
|
|
.around(new JenkinsResetDefaultCacheRule())
|
2018-02-01 10:42:53 +02:00
|
|
|
.around(new JenkinsErrorRule(testCase))
|
2018-01-26 15:55:15 +02:00
|
|
|
}
|
|
|
|
}
|