summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-03-21 19:26:25 +0530
committerSandeep J <sandeejh@in.ibm.com>2019-03-21 19:26:44 +0530
commitf734eff061de3c8570e005aa282ceed0b0a8f7b5 (patch)
tree127eff15545e711cebdc25a30fab349dbc5a27dc /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src
parent51550d6c0e25f0e620f3ec7efe078185a85d8e26 (diff)
added test case to VmStatuschecker.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Id1a3be46235af057c1f3f72cd2afd8ebbe377bc2 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java
index c452d56df..c59fe9fe1 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java
@@ -112,4 +112,14 @@ public class TestVmStatuschecker {
ModelObject mo = rbs.executeProviderOperation(mg.getParams(), mg.getSvcLogicContext());
verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM, "paused");
}
+
+ @Test
+ public void vmPendingStatuscheckerError() throws APPCException {
+ MockGenerator mg = new MockGenerator(Status.PENDING);
+ Server server = mg.getServer();
+ VmStatuschecker rbs = new VmStatuschecker();
+ rbs.setProviderCache(mg.getProviderCacheMap());
+ ModelObject mo = rbs.executeProviderOperation(mg.getParams(), mg.getSvcLogicContext());
+ verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM, "pending");
+ }
} \ No newline at end of file