diff options
author | r.bogacki <r.bogacki@samsung.com> | 2019-05-24 13:51:36 +0200 |
---|---|---|
committer | Robert Bogacki <r.bogacki@samsung.com> | 2019-05-29 12:29:06 +0000 |
commit | a38e3fb6be80f815a6a06748f53d67c76e56f5c3 (patch) | |
tree | 3b66815ce4a23d4040adc49943c2d478c608f244 /adapters/mso-vfc-adapter/src/main/java/org | |
parent | 4b7ebd265366542ec872869e9ec0016a88e879b1 (diff) |
JUnit tests for RestfulUtil
Increased junit tests coverage according to Sonar analyses.
Added missing tests for RestfulUtil.
Issue-ID: SO-1692
Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Change-Id: I8744960c0ad3a36ca4c36e23867168bfda5cbd1d
Diffstat (limited to 'adapters/mso-vfc-adapter/src/main/java/org')
-rw-r--r-- | adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java index 3419e6d20c..1e61d4deb2 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java @@ -79,6 +79,9 @@ public class RestfulUtil { @Autowired private Environment env; + @Autowired + private HttpClient client; + public String getMsbHost() { // MSB_IP will be set as ONAP_IP environment parameter in install flow. String msbIp = System.getenv().get(ONAP_IP); @@ -111,8 +114,6 @@ public class RestfulUtil { RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(timeout).setConnectTimeout(timeout) .setConnectionRequestTimeout(timeout).build(); - HttpClient client = HttpClientBuilder.create().build(); - if ("POST".equalsIgnoreCase(methodType)) { HttpPost httpPost = new HttpPost(msbUrl); httpPost.setConfig(requestConfig); |