summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2019-03-15 11:48:59 +0530
committerTakamune Cho <takamune.cho@att.com>2019-03-15 13:52:11 +0000
commite99802fda660284a0d47872af2b0f797295341cf (patch)
tree572413287510097b1f854d2fd83e768943b1fd2f
parente57819e7b1c5aa3e591506a7c413443fd9dfb68a (diff)
added test case to TestVmStatusChecker.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Idf3acce4be6e950524d342466ee523b9b57b5b2c Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java12
1 files changed, 11 insertions, 1 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 32168b309..c452d56df 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
@@ -6,7 +6,7 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
- * Copyright (C) 2019 IBM.
+ * Modifications Copyright (C) 2019 IBM.
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -102,4 +102,14 @@ public class TestVmStatuschecker {
ModelObject mo = rbs.executeProviderOperation(mg.getParams(), mg.getSvcLogicContext());
verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM, "ready");
}
+
+ @Test
+ public void vmPausedStatuscheckerError() throws APPCException {
+ MockGenerator mg = new MockGenerator(Status.PAUSED);
+ 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, "paused");
+ }
} \ No newline at end of file