Commit c82f171a authored by Igor Filippov (EPAM)'s avatar Igor Filippov (EPAM) Committed by Rostislav Dublin (EPAM)
Browse files

GONRG-1192

Updated poms.
parent 5cfd3c97
......@@ -31,6 +31,7 @@ import org.springframework.web.context.annotation.RequestScope;
public class AuditLogger {
private final JaxRsDpsLog logger;
private AuditEvents events = null;
private AuditEvents getAuditEvents() {
......
......@@ -14,6 +14,7 @@
package org.opengroup.osdu.partition.model;
import javax.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
......@@ -28,6 +29,7 @@ import java.util.Map;
@NoArgsConstructor
public class PartitionInfo {
@NotEmpty
@Builder.Default
Map<String, Property> properties = new HashMap<>();
}
\ No newline at end of file
......@@ -45,9 +45,6 @@ public class AuthorizationService implements IAuthorizationService {
try {
AuthorizationResponse authorizationResponse = authorizationServiceImpl
.authorizeAny(headers, PARTITION_ADMIN_ROLE);
if (Objects.nonNull(authorizationResponse)) {
headers.put("user", authorizationResponse.getUser());
}
} catch (AppException e) {
throw e;
} catch (Exception e) {
......
......@@ -19,6 +19,5 @@ KMS_KEY=${kms-key}
GOOGLE_CLOUD_PROJECT=${google-cloud-project}
#logging configuration
logging.level.org.springframework.web=DEBUG
logging.level.org.opengroup.osdu=debug
logging.level.org.springframework.web=${LOG_LEVEL:DEBUG}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<logger name="org.opengroup.osdu" level="${LOG_LEVEL}"/>
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
......@@ -8,7 +9,7 @@
<charset>utf8</charset>
</encoder>
</appender>
<root level="DEBUG">
<root level="info">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>
......@@ -28,7 +29,7 @@
</encoder>
</appender>
<root level="debug">
<root level="info">
<appender-ref ref="stdout"/>
</root>
</springProfile>
......
......@@ -95,7 +95,7 @@ public abstract class UpdatePartitionTest extends BaseTestTemplate {
return sb.toString();
}
private String getValidBodyForUpdatePartition() {
protected String getValidBodyForUpdatePartition() {
StringBuffer sb = new StringBuffer();
sb.append("{\n");
sb.append(" \"properties\": {")
......
......@@ -42,7 +42,7 @@ public class TestCreatePartition extends CreatePartitionTest {
@Override
@Test
public void should_return40XResponseCode_when_makingRequest_withInvalidPayload() throws Exception {
String invalidPayload = "invalidPayload";
String invalidPayload = "{\"properties_invalid\":{}}";
ClientResponse response = descriptor.runWithCustomPayload(getId(), invalidPayload, testUtils.getAccessToken());
assertEquals(400, response.getStatus());
}
......
......@@ -25,13 +25,13 @@ public class TestUpdatePartition extends UpdatePartitionTest {
@Override
@Before
public void setup() throws Exception {
public void setup() {
this.testUtils = new GCPTestUtils();
}
@Override
@After
public void tearDown() throws Exception {
public void tearDown() {
this.testUtils = null;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment