Hi,
I want to use the given example
com.dslexample.JobScriptsSpec to ensure all of my *.groovy code is compiling.
When running
I got the following error:
com.dslexample.JobScriptsSpec > test script Validate-WLS-Config.groovy FAILED
Expected no exception to be thrown, but got 'groovy.lang.MissingPropertyException'
at spock.lang.Specification.noExceptionThrown(Specification.java:118)
at com.dslexample.JobScriptsSpec.test script #file.name(JobScriptsSpec.groovy:24)
Caused by:
groovy.lang.MissingPropertyException: No such property: ENVIRONMENT for class: script14320244323261021416627
at script14320244323261021416627.run(script14320244323261021416627.groovy:6)
at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:72)
at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:92)
at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:88)
at com.dslexample.JobScriptsSpec.test script #file.name(JobScriptsSpec.groovy:21)
This is due to my script, that is accessing the environment variables provided in the SeedJob:
// Validate-WLS-Config.groovy
//
String env="${ENVIRONMENT}"
....
how can I mock this ?
So I´m quite new to gradle and the spock-framework, any help appreciated !
Thanx in advance,
Torsten