summaryrefslogtreecommitdiffstats
path: root/ansible-adapter/ansible-adapter-bundle/src/test
diff options
context:
space:
mode:
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.java17
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 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 ");
+ }
+ }
}