summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java2
-rw-r--r--rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/api/CbsClientConfigurationTest.java4
2 files changed, 1 insertions, 5 deletions
diff --git a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java
index 2fb07501..36555c2b 100644
--- a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java
+++ b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java
@@ -141,7 +141,7 @@ public interface CbsClientConfiguration {
.appName(getEnv(ENV_APP_NAME));
return Optional.ofNullable(pathToCaCert).filter(certPath -> !"".equals(certPath))
.map(certPath -> createSslHttpConfig(configBuilder, certPath))
- .orElse(createPlainHttpConfig(configBuilder));
+ .orElseGet(() -> createPlainHttpConfig(configBuilder));
}
static CbsClientConfiguration createPlainHttpConfig(ImmutableCbsClientConfiguration.Builder configBuilder) {
diff --git a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/api/CbsClientConfigurationTest.java b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/api/CbsClientConfigurationTest.java
index d0df0b6c..107c2d32 100644
--- a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/api/CbsClientConfigurationTest.java
+++ b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/api/CbsClientConfigurationTest.java
@@ -65,7 +65,6 @@ class CbsClientConfigurationTest {
// given
envs.set("DCAE_CA_CERTPATH", preparePathToCertFile());
envs.set("CONFIG_BINDING_SERVICE", "config-binding-service");
- envs.set("CONFIG_BINDING_SERVICE_PORT_10443_TCP_PORT", "10443");
envs.set("HOSTNAME", "dcae-prh");
envs.set("CONSUL_HOST", "consul-server.onap");
@@ -83,7 +82,6 @@ class CbsClientConfigurationTest {
envs.set("DCAE_CA_CERTPATH", null);
envs.set("CONFIG_BINDING_SERVICE_SERVICE_PORT", "9090");
envs.set("CONFIG_BINDING_SERVICE", "config-binding-service");
- envs.set("CONFIG_BINDING_SERVICE_PORT_10443_TCP_PORT", "10443");
envs.set("HOSTNAME", "dcae-prh");
envs.set("CONSUL_HOST", "consul-server.onap");
@@ -107,7 +105,6 @@ class CbsClientConfigurationTest {
envs.set("DCAE_CA_CERTPATH", "/home/cacert.pem");
envs.set("HOSTNAME", "dcae-prh");
envs.set("CONFIG_BINDING_SERVICE", "config-binding-service");
- envs.set("CONFIG_BINDING_SERVICE_PORT_10443_TCP_PORT", "10443");
envs.set("CONSUL_HOST", "consul-server.onap");
// then
@@ -122,7 +119,6 @@ class CbsClientConfigurationTest {
envs.set("HOSTNAME", "");
envs.set("DCAE_CA_CERTPATH", preparePathToCertFile());
envs.set("CONFIG_BINDING_SERVICE", "config-binding-service");
- envs.set("CONFIG_BINDING_SERVICE_PORT_10443_TCP_PORT", "10443");
envs.set("CONSUL_HOST", "consul-server.onap");
// then