summaryrefslogtreecommitdiffstats
path: root/saltstack-adapter/saltstack-adapter-provider/src/test/java/org
diff options
context:
space:
mode:
authorGanesh Chandrasekaran <ganesh.c@samsung.com>2018-07-17 17:27:24 +0900
committerGanesh Chandrasekaran <ganesh.c@samsung.com>2018-07-17 17:27:36 +0900
commit43a3f54d5ac9ab15025910a575df9fd4be6237d8 (patch)
tree7cad10c6b8f2910ec3f18696ef4272dd0e9b1c64 /saltstack-adapter/saltstack-adapter-provider/src/test/java/org
parentb08a1b8cf2440fac7fc3d7eb7580a58d977524a2 (diff)
saltstack adaptor reqExecLog API cleanup
Issue-ID: CCSDK-331 Change-Id: I951efe3df1ad838e065ba6fd62dda53d533e6422 Signed-off-by: Ganesh Chandrasekaran <ganesh.c@samsung.com>
Diffstat (limited to 'saltstack-adapter/saltstack-adapter-provider/src/test/java/org')
-rw-r--r--saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterImpl.java18
-rw-r--r--saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterPropertiesProviderImpl.java1
-rw-r--r--saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestSaltstackAdapter.java76
3 files changed, 0 insertions, 95 deletions
diff --git a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterImpl.java b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterImpl.java
index 98137a8b9..50bf75826 100644
--- a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterImpl.java
+++ b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterImpl.java
@@ -783,24 +783,6 @@ public class TestSaltstackAdapterImpl {
@Test
- public void reqExecLog_shouldSetMessage() throws IllegalStateException, IllegalArgumentException {
-
- params.put("Id", "101");
-
- try {
- adapter.reqExecLog(params, svcContext);
- String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.log");
- //assertEquals(message, status);
- assertEquals(null, status);
- } catch (SvcLogicException e) {
- String status = svcContext.getAttribute("org.onap.appc.adapter.saltstack.log");
- fail(e.getMessage() + " Code = " + status);
- } catch (Exception e) {
- fail(e.getMessage() + " Unknown exception encountered ");
- }
- }
-
- @Test
public void reqExecCommand_shouldSetSuccessReal() throws SvcLogicException,
IllegalStateException, IllegalArgumentException {
diff --git a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterPropertiesProviderImpl.java b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterPropertiesProviderImpl.java
index 094e78c79..d5699c4c9 100644
--- a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterPropertiesProviderImpl.java
+++ b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestSaltstackAdapterPropertiesProviderImpl.java
@@ -307,7 +307,6 @@ public class TestSaltstackAdapterPropertiesProviderImpl {
adapter = new SaltstackAdapterImpl(propProvider);
String adaptorName = adapter.getAdapterName();
assertEquals("Saltstack Adapter", adaptorName);
- adapter.setExecTimeout(10);
}
@Test
diff --git a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestSaltstackAdapter.java b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestSaltstackAdapter.java
deleted file mode 100644
index 0caaf3320..000000000
--- a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestSaltstackAdapter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : APPC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Copyright (C) 2017 Amdocs
- * =============================================================================
- * 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- * ============LICENSE_END=========================================================
- */
-package org.onap.ccsdk.adapter.model;
-
-import org.junit.Test;
-import org.onap.ccsdk.sli.adaptors.saltstack.model.SaltstackMessageParser;
-import org.onap.ccsdk.sli.adaptors.saltstack.model.SaltstackResult;
-import org.onap.ccsdk.sli.adaptors.saltstack.model.SaltstackServerEmulator;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import static org.junit.Assert.assertNotNull;
-
-public class TestSaltstackAdapter {
-
- private Class[] parameterTypes;
- private SaltstackMessageParser saltstackMessageParser;
- private Method m;
-
- @Test
- public void callPrivateConstructorsMethodsForCodeCoverage() throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
-
- /* test constructors */
- Class<?>[] classesOne = {SaltstackMessageParser.class};
- for(Class<?> clazz : classesOne) {
- Constructor<?> constructor = clazz.getDeclaredConstructor();
- constructor.setAccessible(true);
- assertNotNull(constructor.newInstance());
- }
- Class<?>[] classesTwo = {SaltstackServerEmulator.class};
- for(Class<?> clazz : classesTwo) {
- Constructor<?> constructor = clazz.getDeclaredConstructor();
- constructor.setAccessible(true);
- assertNotNull(constructor.newInstance());
- }
- Class<?>[] classesThree = {SaltstackResult.class};
- for(Class<?> clazz : classesThree) {
- Constructor<?> constructor = clazz.getDeclaredConstructor();
- constructor.setAccessible(true);
- assertNotNull(constructor.newInstance());
- }
-
- /* test methods */
- saltstackMessageParser = new SaltstackMessageParser();
- parameterTypes = new Class[1];
- parameterTypes[0] = String.class;
-
- m = saltstackMessageParser.getClass().getDeclaredMethod("getFilePayload", parameterTypes);
- m.setAccessible(true);
- assertNotNull(m.invoke(saltstackMessageParser,"{\"test\": test}"));
-
- }
-}