From: Gao Weitao Date: Mon, 27 Aug 2018 09:17:31 +0000 (+0000) Subject: Merge "Logger usage Issue In ScaleManager" X-Git-Tag: 1.2.0~8 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=0c2f68bf81e2156a9a9816e703d556d0c1555dfe;hp=74137c1b57511f4303f80a15c3dae9b1be364ba9;p=vfc%2Fnfvo%2Fdriver%2Fvnfm%2Fsvnfm.git Merge "Logger usage Issue In ScaleManager" --- diff --git a/huawei/pom.xml b/huawei/pom.xml index b6f765ed..275d5cc8 100644 --- a/huawei/pom.xml +++ b/huawei/pom.xml @@ -18,7 +18,7 @@ org.onap.vfc.nfvo.driver.vnfm.svnfm vfc-nfvo-driver-vnfm-svnfm - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT 4.0.0 org.onap.vfc.nfvo.driver.vnfm.svnfm.huawei diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/RestfulConfigureTest.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/RestfulConfigureTest.java new file mode 100644 index 00000000..9a40cda3 --- /dev/null +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/RestfulConfigureTest.java @@ -0,0 +1,93 @@ +/* + * Copyright 2016 Huawei Technologies Co., Ltd. + * + * 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. + */ + + +package org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.common.restclient; + +import static org.junit.Assert.*; + +import java.io.IOException; + +import org.junit.Test; + +import net.sf.json.JSONException; + +public class RestfulConfigureTest { + + @Test + public void testRestfulConfigure() { + RestfulConfigure rc = new RestfulConfigure(); + rc.toString(); + } + + @Test + public void testRestfulConfigureStringNoFilePath() { + RestfulConfigure rc = new RestfulConfigure(""); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + + @Test + public void testRestfulConfigureStringNoFileExist() { + RestfulConfigure rc = new RestfulConfigure("C:/Users/Public/Desktop"); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + + @Test + public void testRestfulConfigureString() { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check7.txt"); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + + @Test + public void testRestfulConfigureStringNoFile() { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check1.txt"); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + + @Test + public void testRestfulConfigureStringWrongFile() { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check2.txt"); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + + @Test + public void testRestfulConfigureStringEmptyFile() { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check3.txt"); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + @Test + public void testRestfulConfigureStringNoHostFile() { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check4.txt"); + RestfulOptions rp = rc.getOptions(); + assertTrue(true); + } + @Test(expected=JSONException.class) + public void testRestfulConfigureStringZeroFile() throws IOException { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check5.txt"); + rc.getOptions(); + } + /*@Test + public void testRestfulConfigureStringClose() { + RestfulConfigure rc = new RestfulConfigure("src/test/resources/Check6.txt"); + rc.getOptions(); + }*/ +} diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check2.txt b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check2.txt new file mode 100644 index 00000000..926dc205 --- /dev/null +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check2.txt @@ -0,0 +1,12 @@ +{ + "defaultServer": + { + "host":"", + "port":"80" + }, +"ConnectTimeout":"300000", +"thread":"10", +"idletimeout":"500000", +"timeout":"300000" +} + \ No newline at end of file diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check3.txt b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check3.txt new file mode 100644 index 00000000..08e37413 --- /dev/null +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check3.txt @@ -0,0 +1,12 @@ +{ + "": + { + "host":"", + "port":"" + }, +"":"", +"":"", +"":"", +"":"" +} + \ No newline at end of file diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check4.txt b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check4.txt new file mode 100644 index 00000000..7ccbf2b7 --- /dev/null +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check4.txt @@ -0,0 +1,12 @@ +{ + "defaultServer": + { + "":"127.0.0.1", + "port":"80" + }, +"ConnectTimeout":"300000", +"thread":"10", +"idletimeout":"500000", +"timeout":"300000" +} + \ No newline at end of file diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check5.txt b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check5.txt new file mode 100644 index 00000000..e69de29b diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check7.txt b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check7.txt new file mode 100644 index 00000000..47c4e08c --- /dev/null +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/resources/Check7.txt @@ -0,0 +1,12 @@ +{ + "defaultServer": + { + "host":"127.0.0.1", + "port":"80" + }, +"ConnectTimeout":"300000", +"thread":"10", +"idletimeout":"500000", +"timeout":"300000" +} + \ No newline at end of file diff --git a/nokia/pom.xml b/nokia/pom.xml index 7fd5cdfa..c3d3dc5f 100644 --- a/nokia/pom.xml +++ b/nokia/pom.xml @@ -18,7 +18,7 @@ org.onap.vfc.nfvo.driver.vnfm.svnfm vfc-nfvo-driver-vnfm-svnfm - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT 4.0.0 org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia diff --git a/nokiav2/deployment/pom.xml b/nokiav2/deployment/pom.xml index 2f300e76..abf8ef1d 100644 --- a/nokiav2/deployment/pom.xml +++ b/nokiav2/deployment/pom.xml @@ -17,14 +17,14 @@ 4.0.0 deployment - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT pom vfc/nfvo/driver/vnfm/svnfm/nokiav2/deployment Nokia SVNFM driver deployment files org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2 - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT diff --git a/nokiav2/driver/pom.xml b/nokiav2/driver/pom.xml index 956ef957..1e6b0dc1 100644 --- a/nokiav2/driver/pom.xml +++ b/nokiav2/driver/pom.xml @@ -17,14 +17,14 @@ 4.0.0 driver - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT jar vfc/nfvo/driver/vnfm/svnfm/nokiav2/driver svnfm vnfm driver org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2 - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT UTF-8 @@ -35,7 +35,7 @@ org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2-clients - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT org.springframework.boot diff --git a/nokiav2/driverwar/pom.xml b/nokiav2/driverwar/pom.xml index 7215e3f8..d6866cda 100644 --- a/nokiav2/driverwar/pom.xml +++ b/nokiav2/driverwar/pom.xml @@ -18,14 +18,14 @@ 4.0.0 org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 driverwar - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT war vfc/nfvo/driver/vnfm/svnfm/nokiav2/driverwar svnfm vnfm driver org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2 - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT UTF-8 @@ -36,7 +36,7 @@ org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 driver - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT org.springframework.boot diff --git a/nokiav2/generatedapis/pom.xml b/nokiav2/generatedapis/pom.xml index 294158c5..ee3e65d7 100644 --- a/nokiav2/generatedapis/pom.xml +++ b/nokiav2/generatedapis/pom.xml @@ -18,12 +18,12 @@ org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2 - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT 4.0.0 org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2-clients - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT jar vfc/nfvo/driver/vnfm/svnfm/nokiav2/generatedapis diff --git a/nokiav2/pom.xml b/nokiav2/pom.xml index 52a368e7..72ab854d 100644 --- a/nokiav2/pom.xml +++ b/nokiav2/pom.xml @@ -18,17 +18,17 @@ org.onap.vfc.nfvo.driver.vnfm.svnfm vfc-nfvo-driver-vnfm-svnfm - 1.1.0-SNAPSHOT + 1.2.0-SNAPSHOT 4.0.0 org.onap.vfc.nfvo.driver.vnfm.svnfm.nokiav2 vfc-nfvo-driver-vnfm-svnfm-nokiav2 - 1.1.1-SNAPSHOT + 1.2.0-SNAPSHOT pom vfc-nfvo-driver-vnfm-svnfm-nokiav2 0.8.0 - 2.0.2.RELEASE + 2.0.4.RELEASE