summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/test/java/org
diff options
context:
space:
mode:
authorAmichai Hemli <amichai.hemli@intl.att.com>2019-10-03 14:53:32 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-03 14:53:32 +0000
commit39b185a11e5978991eedd4763415eed51b7c9462 (patch)
treeabf14ed61e0de3d97fa79972336a34cd4a463e8d /vid-automation/src/test/java/org
parent31237ff2baa728d41cba4d2f8fb4ddeb01deeb63 (diff)
parent34993f43a1cc4504cad15bbd70b6365e5206ea6e (diff)
Merge "Verify audit logs format `audit2019`"
Diffstat (limited to 'vid-automation/src/test/java/org')
-rw-r--r--vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
index 3ec0c16e4..e01ffe8b4 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
@@ -1,9 +1,8 @@
package org.onap.vid.more;
import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-import static org.junit.Assert.assertThat;
import com.fasterxml.jackson.databind.JsonNode;
import java.net.URI;
@@ -41,6 +40,11 @@ public class LoggerFormatTest extends BaseApiTest {
validateLogsFormat("audit");
}
+ @Test
+ public void validateAudit2019LogsFormat() {
+ validateLogsFormat("audit2019", "audit-ELS-2019.11", 0);
+ }
+
@Test(enabled = false) // no total-score is returned for error-log
public void validateErrorLogsFormat() {
validateLogsFormat("error");
@@ -57,6 +61,10 @@ public class LoggerFormatTest extends BaseApiTest {
}
private void validateLogsFormat(String logName, String logType) {
+ validateLogsFormat(logName, logType, 0.95);
+ }
+
+ private void validateLogsFormat(String logName, String logType, double score) {
String logLines = getLogLines(logName);
logger.info("logLines are: "+logLines);
@@ -65,8 +73,8 @@ public class LoggerFormatTest extends BaseApiTest {
double fieldscore = response.path("summary").path("score").path("fieldscore").asDouble();
double overall = response.path("summary").path("score").path("overallscore").asDouble();
- assertThat(fieldscore, is(greaterThan(0.95)));
- assertThat(overall, is(greaterThan(0.95)));
+ assertThat(fieldscore, is(greaterThanOrEqualTo(score)));
+ assertThat(overall, is(greaterThanOrEqualTo(score)));
}