1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/test/groovy/util/Rules.groovy
Marcus Holl 8a019f5b86 Remove read yaml rule from common rules
read yaml rule is a very frequently used rule. But having the rule in the common rules
means we cannot register text or files to that rule, which makes it less handy to work
with yaml files in the tests.
2018-08-31 10:22:46 +02:00

21 lines
660 B
Groovy

package util
import org.junit.rules.RuleChain
import com.lesfurets.jenkins.unit.BasePipelineTest
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 JenkinsResetDefaultCacheRule())
.around(new JenkinsErrorRule(testCase))
.around(new JenkinsEnvironmentRule(testCase))
}
}