diff options
author | Enbo Wang <wangenbo@huawei.com> | 2019-04-14 23:51:33 +0800 |
---|---|---|
committer | Enbo Wang <wangenbo@huawei.com> | 2019-04-15 21:47:54 +0800 |
commit | c06bd49c6a58ef995943f8b4236f84e1cec1f79c (patch) | |
tree | d883d0bd73425ef58b7c726260fd58b9d35e4734 /ansible-adapter/ansible-adapter-bundle/src/test | |
parent | 4d8ef14921d25cd924fc7dcf388a943d313e54b7 (diff) |
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 <wangenbo@huawei.com>
Diffstat (limited to 'ansible-adapter/ansible-adapter-bundle/src/test')
-rw-r--r-- | ansible-adapter/ansible-adapter-bundle/src/test/java/org/onap/ccsdk/adapter/ansible/impl/TestAnsibleAdapterImpl.java | 17 |
1 files changed, 17 insertions, 0 deletions
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 86bed7e41..4636d2450 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 "); + } + } } |