1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00

fix wrong message

This commit is contained in:
Alejandra Ferreiro Vidal 2019-04-30 09:48:47 +02:00
parent a4af238c95
commit 043c228115
2 changed files with 14 additions and 1 deletions

View File

@ -184,7 +184,7 @@ class ConfigurationHelper implements Serializable {
ConfigurationHelper withPropertyInValues(String key, Set values){
withMandatoryProperty(key)
def value = config[key]
def value = config[key] instanceof GString ? config[key].toString() : config[key]
if(! (value in values) ) {
throw new IllegalArgumentException("Invalid ${key} = '${value}'. Valid '${key}' values are: ${values}.")
}

View File

@ -515,4 +515,17 @@ class NeoDeployTest extends BasePiperTest {
utils: utils,
)
}
@Test
void deployModeAsGStringTest() {
Map deployProps = [deployMode: 'warPropertiesFile']
stepRule.step.neoDeploy(script: nullScript,
utils: utils,
neo: [credentialsId: 'myCredentialsId',
propertiesFile: warPropertiesFileName],
deployMode: "$deployProps.deployMode",
source: archiveName)
}
}