aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);