diff options
author | 2018-07-23 14:27:22 +0900 | |
---|---|---|
committer | 2018-07-23 14:27:37 +0900 | |
commit | 021cae43d3b22dcbd41e7b34ca4215c167714ab4 (patch) | |
tree | 7ef08cca0a2a169fc7456c7416e3557969cd8582 /saltstack-adapter/saltstack-adapter-provider/src/test/java/org | |
parent | e70da25135855b88571b19c108089b74181996a6 (diff) |
Use ByteStream instead of FileStream
Issue-ID: CCSDK-393
Change-Id: Id004f0bce1768e00f3e326efc204532acdb22546
Signed-off-by: Ganesh Chandrasekaran <ganesh.c@samsung.com>
Diffstat (limited to 'saltstack-adapter/saltstack-adapter-provider/src/test/java/org')
4 files changed, 13 insertions, 18 deletions
diff --git a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestConnectionBuilder.java b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestConnectionBuilder.java index 266147aad..8cd7af25e 100644 --- a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestConnectionBuilder.java +++ b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/impl/TestConnectionBuilder.java @@ -29,14 +29,11 @@ import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.sli.adaptors.saltstack.impl.ConnectionBuilder; import org.onap.ccsdk.sli.adaptors.saltstack.model.SaltstackResult; -import org.onap.ccsdk.sli.core.sli.SvcLogicContext; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; import java.util.HashMap; import java.util.Map; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; public class TestConnectionBuilder { 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 a0d36046c..50530ecd8 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 @@ -801,7 +801,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if local ssh is not enabled System.out.print(e.getMessage()); } @@ -829,7 +829,7 @@ public class TestSaltstackAdapterImpl { assertEquals(TestId, "test1"); TestId = svcContext.getAttribute("test1.minion1"); assertEquals(TestId, "true"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -855,7 +855,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -881,7 +881,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -908,7 +908,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -936,7 +936,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -964,7 +964,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -992,7 +992,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -1018,7 +1018,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } @@ -1046,7 +1046,7 @@ public class TestSaltstackAdapterImpl { TestId = svcContext.getAttribute("org.onap.appc.adapter.saltstack.Id"); assertEquals("200", status); assertEquals(TestId, "test1"); - } catch (Exception e){ + } catch (Exception e) { //if saltstack ssh IP is not enabled System.out.print(e.getMessage()); } 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 29d08801b..57590baec 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 @@ -29,7 +29,6 @@ import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.sli.adaptors.saltstack.SaltstackAdapterPropertiesProvider; import org.onap.ccsdk.sli.adaptors.saltstack.impl.SaltstackAdapterImpl; -import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; import java.util.Properties; @@ -258,7 +257,6 @@ public class TestSaltstackAdapterPropertiesProviderImpl { } - @Test public void reqExecCommand_setPropertiesElsePortNull() throws SvcLogicException, IllegalStateException, IllegalArgumentException { diff --git a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestJsonParser.java b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestJsonParser.java index d082285f5..71798fbc8 100644 --- a/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestJsonParser.java +++ b/saltstack-adapter/saltstack-adapter-provider/src/test/java/org/onap/ccsdk/adapter/model/TestJsonParser.java @@ -8,9 +8,9 @@ * 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. @@ -23,8 +23,8 @@ package org.onap.ccsdk.adapter.model; import org.codehaus.jettison.json.JSONException; import org.junit.Test; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.onap.ccsdk.sli.adaptors.saltstack.model.JsonParser; +import org.onap.ccsdk.sli.core.sli.SvcLogicException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; |