From 5461a72aa5bcc689c12c516f248a94f0d370c823 Mon Sep 17 00:00:00 2001 From: Ed Serbin Date: Fri, 31 Aug 2018 15:00:32 +0300 Subject: [PATCH 1/4] changed paths for win in Stop/Start DeploymentManager --- .../electriccloud/plugin/spec/StartDeploymentManager.groovy | 4 ++-- .../electriccloud/plugin/spec/StopDeploymentManager.groovy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy index df701a0e..2a06344e 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy @@ -82,12 +82,12 @@ class StartDeploymentManager extends PluginTestHelper { @Shared def stopLocations = [ - defaultLocation: is_windows ? 'C:/IBM/WebSphere/AppServer/bin/stopManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/stopManager.sh', + defaultLocation: is_windows ? 'C:/IBM/WebSphere/bin/stopManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/stopManager.sh', ] @Shared def startLocations = [ - defaultLocation: is_windows ? 'C:/IBM/WebSphere/AppServer/bin/startManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/startManager.sh', + defaultLocation: is_windows ? 'C:/IBM/WebSphere/bin/startManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/startManager.sh', wrong: 'wrong/path/startManager.sh' ] diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy index 865e9b7d..0c191ccd 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy @@ -82,13 +82,13 @@ class StopDeploymentManager extends PluginTestHelper { @Shared def stopLocations = [ - defaultLocation: is_windows ? 'C:/IBM/WebSphere/AppServer/bin/stopManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/stopManager.sh', + defaultLocation: is_windows ? 'C:/IBM/WebSphere/bin/stopManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/stopManager.sh', wrong: '/wrong/path/stopManager.sh' ] @Shared def startLocations = [ - defaultLocation: is_windows ? 'C:/IBM/WebSphere/AppServer/bin/startManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/startManager.sh' + defaultLocation: is_windows ? 'C:/IBM/WebSphere/bin/startManager.bat' : '/opt/IBM/WebSphere/AppServer/bin/startManager.sh' ] @Shared From 07d78b846f1b8f8cfcf32d043c4dbc167e68be5c Mon Sep 17 00:00:00 2001 From: Ed Serbin Date: Fri, 31 Aug 2018 16:12:54 +0300 Subject: [PATCH 2/4] changed quotes --- .../plugin/spec/StartDeploymentManager.groovy | 13 ++++++++++++- .../plugin/spec/StopDeploymentManager.groovy | 13 +++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy index 2a06344e..13ec2c5a 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy @@ -162,6 +162,7 @@ class StartDeploymentManager extends PluginTestHelper { createConfiguration(confignames.correctJSR160RMI, [doNotRecreate: false]) createConfiguration(confignames.correctNone, [doNotRecreate: false]) createConfiguration(confignames.correctRMI, [doNotRecreate: false]) + change_logs() importProject(projectName, 'dsl/RunProcedure.dsl', [projName: projectName, resName : wasResourceName, @@ -372,6 +373,16 @@ class StartDeploymentManager extends PluginTestHelper { return dslWithTimeout(code) } - + def change_logs(version){ + if (is_windows){ + jobLogs.'default'[0] = jobLogs.'default'[0].replace("'", "\"") + jobLogs.'profile'[0] = jobLogs.'profile'[0].replace("'", "\"") + jobLogs.'log'[0] = jobLogs.'log'[0].replace("'", "\"") + jobLogs.'timeOk'[0] = jobLogs.'timeOk'[0].replace("'", "\"") + jobLogs.'addParam'[0] = jobLogs.'addParam'[0].replace("'", "\"") + jobLogs.'addParams'[0] = jobLogs.'addParams'[0].replace("'", "\"") + jobLogs.'all'[0] = jobLogs.'all'[0].replace("'", "\"") + } + } } diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy index 0c191ccd..0a028d3e 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy @@ -163,6 +163,7 @@ class StopDeploymentManager extends PluginTestHelper { createConfiguration(confignames.correctJSR160RMI, [doNotRecreate: false]) createConfiguration(confignames.correctNone, [doNotRecreate: false]) createConfiguration(confignames.correctRMI, [doNotRecreate: false]) + change_logs() importProject(projectName, 'dsl/RunProcedure.dsl', [projName: projectName, resName : wasResourceName, @@ -413,4 +414,16 @@ class StopDeploymentManager extends PluginTestHelper { return dslWithTimeout(code) } + def change_logs(version){ + if (is_windows){ + jobLogs.'default'[0] = jobLogs.'default'[0].replace("'", "\"") + jobLogs.'profile'[0] = jobLogs.'profile'[0].replace("'", "\"") + jobLogs.'logs'[0] = jobLogs.'logs'[0].replace("'", "\"") + jobLogs.'timeOk'[0] = jobLogs.'timeOk'[0].replace("'", "\"") + jobLogs.'addParam'[0] = jobLogs.'addParam'[0].replace("'", "\"") + jobLogs.'addParams'[0] = jobLogs.'addParams'[0].replace("'", "\"") + jobLogs.'all'[0] = jobLogs.'all'[0].replace("'", "\"") + } + } + } From fcd2ec39351677ac18915a98b60c8703a22485ee Mon Sep 17 00:00:00 2001 From: Nadiya Vidman Date: Fri, 31 Aug 2018 16:27:11 +0300 Subject: [PATCH 3/4] Ignored several tests for windows --- .../electriccloud/plugin/spec/StopApplicationServers.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopApplicationServers.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopApplicationServers.groovy index 6777805a..fd43fd77 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopApplicationServers.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopApplicationServers.groovy @@ -27,6 +27,8 @@ class StopApplicationServers extends PluginTestHelper { def wasPath = System.getenv('WSADMIN_PATH') @Shared def wasAppPath = System.getenv('WAS_APPPATH') + @Shared + def is_windows = System.getenv("IS_WINDOWS") @Shared def confignames = [ @@ -290,6 +292,7 @@ class StopApplicationServers extends PluginTestHelper { testCases.systemTest8 | confignames.correctSOAP | serverLists.all | '300' | summaries.warning_both | jobLogs.warning_both | 'warning' | null } + @Unroll def 'StopApplicationServer - Positive(for multiple): #testCaseID.name #testCaseID.description'() { @@ -334,6 +337,7 @@ class StopApplicationServers extends PluginTestHelper { @Unroll def 'StopApplicationServer - Negative: : #testCaseID.name #testCaseID.description'(){ assumeFalse(wasHost=='websphere80nd' && (testCaseID.name=='C363350' || testCaseID.name=='C363351')) + assumeFalse(is_windows && (testCaseID.name=='C363350' || testCaseID.name=='C363351')) if (startedServers){ startApplicationServer(startedServers) From e1879e419aeaacce036c7884845e7e060bd67547 Mon Sep 17 00:00:00 2001 From: Ed Serbin Date: Fri, 31 Aug 2018 17:01:52 +0300 Subject: [PATCH 4/4] clear logs --- .../com/electriccloud/plugin/spec/StartDeploymentManager.groovy | 1 + .../com/electriccloud/plugin/spec/StopDeploymentManager.groovy | 1 + 2 files changed, 2 insertions(+) diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy index 13ec2c5a..bcbee142 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StartDeploymentManager.groovy @@ -382,6 +382,7 @@ class StartDeploymentManager extends PluginTestHelper { jobLogs.'addParam'[0] = jobLogs.'addParam'[0].replace("'", "\"") jobLogs.'addParams'[0] = jobLogs.'addParams'[0].replace("'", "\"") jobLogs.'all'[0] = jobLogs.'all'[0].replace("'", "\"") + jobLogs.'log'[1] = '' } } diff --git a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy index 0a028d3e..df3d2b3c 100644 --- a/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy +++ b/specs/src/test/groovy/com/electriccloud/plugin/spec/StopDeploymentManager.groovy @@ -423,6 +423,7 @@ class StopDeploymentManager extends PluginTestHelper { jobLogs.'addParam'[0] = jobLogs.'addParam'[0].replace("'", "\"") jobLogs.'addParams'[0] = jobLogs.'addParams'[0].replace("'", "\"") jobLogs.'all'[0] = jobLogs.'all'[0].replace("'", "\"") + jobLogs.'logs'[1] = '' } }