diff options
Diffstat (limited to 'rest-services/cbs-client')
2 files changed, 7 insertions, 7 deletions
diff --git a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProvider.java b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProvider.java index 88072985..fdc966b3 100644 --- a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProvider.java +++ b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProvider.java @@ -52,7 +52,7 @@ final class ReactiveCloudConfigurationProvider implements CloudConfigurationProv @Override public Mono<JsonObject> callForServiceConfigurationReactive(EnvProperties envProperties) { return callConsulForConfigBindingServiceEndpoint(envProperties) - .flatMap(this::callConfigBindingServiceForPrhConfiguration); + .flatMap(this::callConfigBindingServiceForConfiguration); } @Override @@ -82,8 +82,8 @@ final class ReactiveCloudConfigurationProvider implements CloudConfigurationProv envProperties.cbsName()); } - private Mono<JsonObject> callConfigBindingServiceForPrhConfiguration(String configBindingServiceUri) { - LOGGER.info("Retrieving PRH configuration"); + private Mono<JsonObject> callConfigBindingServiceForConfiguration(String configBindingServiceUri) { + LOGGER.info("Retrieving configuration"); return cloudHttpClient.callHttpGet(configBindingServiceUri, JsonObject.class); } diff --git a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProviderTest.java b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProviderTest.java index afc5a255..5d6ef6bc 100644 --- a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProviderTest.java +++ b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/providers/ReactiveCloudConfigurationProviderTest.java @@ -52,8 +52,8 @@ class ReactiveCloudConfigurationProviderTest { + "\"CreateIndex\":803,\"ModifyIndex\":803}]"; private static final JsonArray configBindingServiceJson = gson.fromJson(configBindingService, JsonArray.class); private static final JsonArray emptyConfigBindingServiceJson = gson.fromJson("[]", JsonArray.class); - private static final String prhMockConfiguration = "{\"test\":1}"; - private static final JsonObject prhMockConfigurationJson = gson.fromJson(prhMockConfiguration, JsonObject.class); + private static final String configurationMock = "{\"test\":1}"; + private static final JsonObject configurationJsonMock = gson.fromJson(configurationMock, JsonObject.class); private EnvProperties envProperties = ImmutableEnvProperties.builder() .appName("dcae-prh") @@ -70,13 +70,13 @@ class ReactiveCloudConfigurationProviderTest { webClient.callHttpGet("http://consul:8500/v1/catalog/service/config-binding-service", JsonArray.class)) .thenReturn(Mono.just(configBindingServiceJson)); when(webClient.callHttpGet("http://config-binding-service:10000/service_component/dcae-prh", JsonObject.class)) - .thenReturn(Mono.just(prhMockConfigurationJson)); + .thenReturn(Mono.just(configurationJsonMock)); ReactiveCloudConfigurationProvider provider = new ReactiveCloudConfigurationProvider(webClient); //when/then StepVerifier.create(provider.callForServiceConfigurationReactive(envProperties)).expectSubscription() - .expectNext(prhMockConfigurationJson).verifyComplete(); + .expectNext(configurationJsonMock).verifyComplete(); } @Test |