aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle
diff options
context:
space:
mode:
authorLathishbabu Ganesan <lathishbabu.ganesan@ericsson.com>2019-02-27 09:06:57 -0500
committerTakamune Cho <takamune.cho@att.com>2019-02-27 16:56:14 +0000
commita16f7063b38184086e5f749f8a0cdc671a2bfdf2 (patch)
treec988153de7b3e97bd611a4fdbf2a542dc8a55383 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle
parenteb83cf5b1433585a2fe18ca90273046b3b4f6e2a (diff)
Additional test case to cover Reboot scenario
Issue-ID: APPC-1507 Change-Id: I1afa62d34bec6cc3bb56abd4fa5ffc9a5beee67a Signed-off-by: Lathishbabu Ganesan <lathishbabu.ganesan@ericsson.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestProviderAdapterImpl.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestProviderAdapterImpl.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestProviderAdapterImpl.java
index 30c7aa729..701258543 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestProviderAdapterImpl.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/impl/TestProviderAdapterImpl.java
@@ -6,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modifications Copyright (C) 2019 Ericsson
+ * =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -511,6 +513,26 @@ public class TestProviderAdapterImpl {
Server actualServer = adapter.migrateServer(params, svcContext);
assertEquals(Server.Status.READY, actualServer.getStatus());
}
+
+ /**
+ * Tests that we can reboot a server
+ *
+ * @throws ZoneException If the login cannot be performed because the principal and/or
+ * credentials are invalid.
+ * @throws IllegalArgumentException If the principal and/or credential are null or empty, or if
+ * the expected argument(s) are not defined or are invalid.
+ * @throws IllegalStateException If the identity service is not available or cannot be created
+ * @throws UnknownProviderException If the provider cannot be found
+ * @throws IOException if an I/O error occurs
+ * @throws APPCException If the server cannot be rebooted for some reason
+ */
+ @Test
+ public void testRebootServer()
+ throws IOException, IllegalStateException, IllegalArgumentException, ZoneException, APPCException {
+ prepareMock(Operation.REBOOT_SERVICE, Server.Status.READY);
+ Server actualServer = adapter.rebootServer(params, svcContext);
+ assertEquals(Server.Status.READY, actualServer.getStatus());
+ }
private void prepareMock(Operation operation, Server.Status serverStatus) throws APPCException {
IProviderOperation providerOperation = fetchOperation.apply(operation);