Skip to content
Snippets Groups Projects
Commit f0904f39 authored by Riabokon Stanislav(EPAM)[GCP]'s avatar Riabokon Stanislav(EPAM)[GCP]
Browse files

Added logs and a root pom.xml.

parent 9d0ca57c
No related branches found
No related tags found
1 merge request!68Integration tests for Google Cloud Run (GONRG-1016)
......@@ -45,6 +45,12 @@
<artifactId>pact-jvm-provider-junit_2.12</artifactId>
<version>3.5.5</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
......
......@@ -13,8 +13,10 @@ import com.sun.jersey.api.client.ClientResponse;
import java.util.Objects;
import javax.ws.rs.core.MediaType;
import lombok.extern.java.Log;
import org.junit.Test;
@Log
public abstract class AcceptanceBaseTest {
protected LegalTagUtils legalTagUtils;
......@@ -94,9 +96,11 @@ public abstract class AcceptanceBaseTest {
ClientResponse response = legalTagUtils
.send(this.getApi(), this.getHttpMethod(), legalTagUtils.accessToken(), getBody(),
getQuery(), headers);
log.info("Response status = " + response.getStatus());
assertEquals(expectedResponse, response.getStatus());
if (expectedResponse == 204) {
if (Objects.nonNull(response.getType())) {
log.info("Content-Type = " + response.getType().toString());
assertTrue(response.getType().toString().toLowerCase().indexOf("text/html") >= 0); //Google Cloud Run specific
} else {
assertNull(response.getType());
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2017-2019, Schlumberger
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opengroup.osdu.legal</groupId>
<artifactId>os-legal-testing</artifactId>
<version>0.0.2-SNAPSHOT</version>
<description>Root Legal Service project</description>
<packaging>pom</packaging>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<modules>
<module>legal-test-core</module>
<module>legal-test-aws</module>
<module>legal-test-azure</module>
<module>legal-test-gcp</module>
<module>legal-test-ibm</module>
</modules>
<repositories>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/groups/17/-/packages/maven</url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/74/packages/maven</url>
</repository>
<snapshotRepository>
<id>${gitlab-server}</id>
<url>https://community.opengroup.org/api/v4/projects/74/packages/maven</url>
</snapshotRepository>
</distributionManagement>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment