aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-11-11 11:56:34 +0200
committerIttay Stern <ittay.stern@att.com>2019-11-12 09:31:50 +0200
commit3d84cd65eef3fb2acb459015f692f1bd03212e7f (patch)
tree92a435613e5ab83cce16e19105e21f37c208bc3b /vid-automation/src/main/java/org
parent6b91534bf6733b7b2bad87ef8f70296a05430476 (diff)
Allow API tests even when VID's certificate is invalid
Issue-ID: VID-701 Change-Id: I0b02e2ae0fe468598b7bec726176552b7bf2108a Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java/org')
-rw-r--r--vid-automation/src/main/java/org/onap/vid/api/BaseApiTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/vid-automation/src/main/java/org/onap/vid/api/BaseApiTest.java b/vid-automation/src/main/java/org/onap/vid/api/BaseApiTest.java
index bfd4782f9..4819b813f 100644
--- a/vid-automation/src/main/java/org/onap/vid/api/BaseApiTest.java
+++ b/vid-automation/src/main/java/org/onap/vid/api/BaseApiTest.java
@@ -20,7 +20,6 @@ import java.util.Properties;
import java.util.Random;
import java.util.TimeZone;
import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -38,6 +37,7 @@ import vid.automation.reportportal.ReportPortalListenerDelegator;
import vid.automation.test.infra.FeaturesTogglingConfiguration;
import vid.automation.test.services.UsersService;
import vid.automation.test.utils.CookieAndJsonHttpHeadersInterceptor;
+import vid.automation.test.utils.InsecureHttpsClient;
@Listeners(ReportPortalListenerDelegator.class)
public class BaseApiTest {
@@ -50,16 +50,16 @@ public class BaseApiTest {
@SuppressWarnings("WeakerAccess")
protected Client client;
protected Random random;
- protected final RestTemplate restTemplate = new RestTemplate();
+ protected final RestTemplate restTemplate = InsecureHttpsClient.newRestTemplate();
protected final UsersService usersService = new UsersService();
- protected final RestTemplate restTemplateErrorAgnostic = new RestTemplate();
+ protected final RestTemplate restTemplateErrorAgnostic = InsecureHttpsClient.newRestTemplate();
@BeforeClass
public void init() {
uri = getUri();
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
- client = ClientBuilder.newClient();
+ client = InsecureHttpsClient.newJaxrsClient();
client.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
random = new Random(System.currentTimeMillis());
FeaturesTogglingConfiguration.initializeFeatureManager();