aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp
diff options
context:
space:
mode:
authorBen David, Elad (eb7504) <eb7504@intl.att.com>2019-11-03 17:22:48 +0200
committerBen David, Elad (eb7504) <eb7504@intl.att.com>2019-11-05 15:52:05 +0200
commit1e61754c29fc99636de692a0fb9d2ef1a4ba9e61 (patch)
tree90c20331d442c82dc955b0426d60b64a6ca353be /openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp
parent4a6e592af14fd3941df6e56e5b75c9ac5d5eb01b (diff)
Align logging to Onap-ELS 2019.11
Change-Id: I1750493d5c9f2eab8c1395f0fbc9ae66cf74b0a6 Issue-ID: SDC-2639 Signed-off-by: Ben David, Elad (eb7504) <eb7504@intl.att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp')
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp/sdc/logging/servlet/spring/LoggingInterceptorTest.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp/sdc/logging/servlet/spring/LoggingInterceptorTest.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp/sdc/logging/servlet/spring/LoggingInterceptorTest.java
index 406f8b6dbd..86a4318ec9 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp/sdc/logging/servlet/spring/LoggingInterceptorTest.java
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-spring/src/test/java/org/openecomp/sdc/logging/servlet/spring/LoggingInterceptorTest.java
@@ -22,13 +22,12 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.openecomp.sdc.logging.api.StatusCode.COMPLETE;
-import static org.openecomp.sdc.logging.api.StatusCode.ERROR;
import static org.openecomp.sdc.logging.servlet.spring.LoggingInterceptor.LOGGING_TRACKER_KEY;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.junit.Test;
+import org.onap.logging.ref.slf4j.ONAPLogConstants.ResponseStatus;
import org.openecomp.sdc.logging.servlet.HttpHeader;
import org.openecomp.sdc.logging.servlet.RequestProcessingResult;
import org.openecomp.sdc.logging.servlet.Tracker;
@@ -80,7 +79,7 @@ public class LoggingInterceptorTest {
final int status = 101;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(ERROR, result.getStatusCode());
+ assertEquals(ResponseStatus.ERROR, result.getStatusCode());
}
@Test
@@ -88,7 +87,7 @@ public class LoggingInterceptorTest {
final int status = 404;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(ERROR, result.getStatusCode());
+ assertEquals(ResponseStatus.ERROR, result.getStatusCode());
}
@Test
@@ -96,7 +95,7 @@ public class LoggingInterceptorTest {
final int status = 503;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(ERROR, result.getStatusCode());
+ assertEquals(ResponseStatus.ERROR, result.getStatusCode());
}
@Test
@@ -104,7 +103,7 @@ public class LoggingInterceptorTest {
final int status = 204;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(COMPLETE, result.getStatusCode());
+ assertEquals(ResponseStatus.COMPLETE, result.getStatusCode());
}
@Test
@@ -112,7 +111,7 @@ public class LoggingInterceptorTest {
final int status = 307;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(COMPLETE, result.getStatusCode());
+ assertEquals(ResponseStatus.COMPLETE, result.getStatusCode());
}
@Test
@@ -120,7 +119,7 @@ public class LoggingInterceptorTest {
final int status = 133;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(ERROR, result.getStatusCode());
+ assertEquals(ResponseStatus.ERROR, result.getStatusCode());
}
@Test
@@ -128,7 +127,7 @@ public class LoggingInterceptorTest {
final int status = 485;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(ERROR, result.getStatusCode());
+ assertEquals(ResponseStatus.ERROR, result.getStatusCode());
}
@Test
@@ -136,7 +135,7 @@ public class LoggingInterceptorTest {
final int status = 547;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(ERROR, result.getStatusCode());
+ assertEquals(ResponseStatus.ERROR, result.getStatusCode());
}
@Test
@@ -144,7 +143,7 @@ public class LoggingInterceptorTest {
final int status = 277;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(COMPLETE, result.getStatusCode());
+ assertEquals(ResponseStatus.COMPLETE, result.getStatusCode());
}
@Test
@@ -152,6 +151,6 @@ public class LoggingInterceptorTest {
final int status = 364;
LoggingInterceptor.ServletResponseResult result = new LoggingInterceptor.ServletResponseResult(status);
assertEquals(status, result.getStatus());
- assertEquals(COMPLETE, result.getStatusCode());
+ assertEquals(ResponseStatus.COMPLETE, result.getStatusCode());
}
}