diff options
author | 2020-11-06 12:07:28 +0100 | |
---|---|---|
committer | 2020-11-06 14:44:55 +0100 | |
commit | cef5a0b50f07e4e658ff9d2e058d6aa6eb8cb780 (patch) | |
tree | ca5ba0e22ad5e9522f22f68523c9bfe7cd2f2164 /a1-policy-management/src/test | |
parent | 4dec4dc6aa0b526bb21aedee4b1120d795300978 (diff) |
Added support for using HTTP proxy
A HTTP proxy may be used to access NearRT-RICs
For other HTTP acces; Consul; DMAAP, local, and R-APP callbacks no proxy is used.
Change-Id: Ibc3ed8bada76cafb23323bf03b28a9876bed60eb
Issue-ID: CCSDK-2502
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
Diffstat (limited to 'a1-policy-management/src/test')
4 files changed, 6 insertions, 4 deletions
diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java index 36bbda57..2e583f65 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/AsyncRestClientTest.java @@ -58,7 +58,7 @@ class AsyncRestClientTest { InternalLoggerFactory.setDefaultFactory(JdkLoggerFactory.INSTANCE); Loggers.useJdkLoggers(); mockWebServer = new MockWebServer(); - clientUnderTest = new AsyncRestClient(mockWebServer.url(BASE_URL).toString()); + clientUnderTest = new AsyncRestClient(mockWebServer.url(BASE_URL).toString(), null, null); } @AfterAll diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/CcsdkA1AdapterClientTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/CcsdkA1AdapterClientTest.java index aad1ed02..985ce558 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/CcsdkA1AdapterClientTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/clients/CcsdkA1AdapterClientTest.java @@ -85,7 +85,7 @@ class CcsdkA1AdapterClientTest { @Test void createClientWithWrongProtocol_thenErrorIsThrown() { assertThrows(IllegalArgumentException.class, () -> { - new CcsdkA1AdapterClient(A1ProtocolType.STD_V1_1, null, null, new AsyncRestClient("", null)); + new CcsdkA1AdapterClient(A1ProtocolType.STD_V1_1, null, null, new AsyncRestClient("", null, null)); }); } diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/ApplicationTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/ApplicationTest.java index 551ed599..b5164889 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/ApplicationTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v1/ApplicationTest.java @@ -720,10 +720,11 @@ class ApplicationTest { .isTrustStoreUsed(useTrustValidation) // .trustStore(config.trustStore()) // .trustStorePassword(config.trustStorePassword()) // + .httpProxyConfig(config.httpProxyConfig()) // .build(); AsyncRestClientFactory f = new AsyncRestClientFactory(config); - return f.createRestClient(baseUrl()); + return f.createRestClientNoHttpProxy(baseUrl()); } private AsyncRestClient restClient() { diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java index a0cb2af8..5e089a0b 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ApplicationTest.java @@ -790,10 +790,11 @@ class ApplicationTest { .isTrustStoreUsed(useTrustValidation) // .trustStore(config.trustStore()) // .trustStorePassword(config.trustStorePassword()) // + .httpProxyConfig(config.httpProxyConfig()) // .build(); AsyncRestClientFactory f = new AsyncRestClientFactory(config); - return f.createRestClient(baseUrl); + return f.createRestClientNoHttpProxy(baseUrl); } |