From c06bd49c6a58ef995943f8b4236f84e1cec1f79c Mon Sep 17 00:00:00 2001 From: Enbo Wang Date: Sun, 14 Apr 2019 23:51:33 +0800 Subject: Add missing GetOutput method in ansible-adapter Add missing GetOutput method in ansible-adapter for ansible-server. Change-Id: Ifc544176b86fc033f2760a6b02d18f6e29bfd88a Issue-ID: CCSDK-1225 Signed-off-by: Enbo Wang --- .../adapter/ansible/impl/TestAnsibleAdapterImpl.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ansible-adapter/ansible-adapter-bundle/src/test') diff --git a/ansible-adapter/ansible-adapter-bundle/src/test/java/org/onap/ccsdk/adapter/ansible/impl/TestAnsibleAdapterImpl.java b/ansible-adapter/ansible-adapter-bundle/src/test/java/org/onap/ccsdk/adapter/ansible/impl/TestAnsibleAdapterImpl.java index 86bed7e4..4636d245 100644 --- a/ansible-adapter/ansible-adapter-bundle/src/test/java/org/onap/ccsdk/adapter/ansible/impl/TestAnsibleAdapterImpl.java +++ b/ansible-adapter/ansible-adapter-bundle/src/test/java/org/onap/ccsdk/adapter/ansible/impl/TestAnsibleAdapterImpl.java @@ -127,4 +127,21 @@ public class TestAnsibleAdapterImpl { fail(e.getMessage() + " Unknown exception encountered "); } } + + @Test + public void reqExecOutput_shouldSetMessage() throws IllegalStateException, IllegalArgumentException { + + params.put("Id", "101"); + + try { + adapter.reqExecOutput(params, svcContext); + String status = svcContext.getAttribute("org.onap.appc.adapter.ansible.output"); + assertEquals(message, status); + } catch (SvcLogicException e) { + String status = svcContext.getAttribute("org.onap.appc.adapter.ansible.output"); + fail(e.getMessage() + " Code = " + status); + } catch (Exception e) { + fail(e.getMessage() + " Unknown exception encountered "); + } + } } -- cgit 1.2.3-korg