iuliana commented on code in PR #1399: URL: https://github.com/apache/brooklyn-server/pull/1399#discussion_r1196148302
########## camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java: ########## @@ -1315,4 +1314,79 @@ public void testAddPolicyWithDslFromDeployableBlueprint() throws Exception { EntityAsserts.assertAttributeEquals(entity, Sensors.newSensor(Object.class, "result"), "yes"); } + @Test + public void testSshStepOnLocalhostLocation() throws Exception { + String yaml = + "location: localhost\n" + + "services:\n" + + " - type: " + WorkflowSoftwareProcess.class.getName() +"\n" + + " name: sample-server\n" ; + Entity app = createStartWaitAndLogApplication(yaml); + + WorkflowExecutionContext x1 = WorkflowBasicTest.runWorkflow(app.getChildren().iterator().next(), Strings.lines( + "lock: x", Review Comment: Done. ########## camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/WorkflowYamlTest.java: ########## @@ -1315,4 +1314,79 @@ public void testAddPolicyWithDslFromDeployableBlueprint() throws Exception { EntityAsserts.assertAttributeEquals(entity, Sensors.newSensor(Object.class, "result"), "yes"); } + @Test + public void testSshStepOnLocalhostLocation() throws Exception { + String yaml = + "location: localhost\n" + + "services:\n" + + " - type: " + WorkflowSoftwareProcess.class.getName() +"\n" + + " name: sample-server\n" ; + Entity app = createStartWaitAndLogApplication(yaml); + + WorkflowExecutionContext x1 = WorkflowBasicTest.runWorkflow(app.getChildren().iterator().next(), Strings.lines( + "lock: x", + "steps:", + "- type: ssh\n" + + " command: |\n" + + " echo \"init-done\" >> wf.log"), "test"); + Object result = x1.getTask(false).get().get(); + Asserts.assertEquals(((Map)result).get("exit_code"), 0); + } + + @Test + public void testSshStepOnLocalhostDefinition() throws Exception { Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brooklyn.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org