From 8ea2781e1be9b61eeb1cf2749dc3443d1d689c80 Mon Sep 17 00:00:00 2001 From: Daniel Zolty Date: Wed, 1 Nov 2023 12:24:34 -0700 Subject: [PATCH] PR fixes --- .../main/java/com/amazon/aoc/exception/ExceptionCode.java | 2 +- .../java/com/amazon/aoc/validators/CWLogValidatorTest.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/validator/src/main/java/com/amazon/aoc/exception/ExceptionCode.java b/validator/src/main/java/com/amazon/aoc/exception/ExceptionCode.java index f0fb7da3f..0b8ca4cdf 100644 --- a/validator/src/main/java/com/amazon/aoc/exception/ExceptionCode.java +++ b/validator/src/main/java/com/amazon/aoc/exception/ExceptionCode.java @@ -37,7 +37,7 @@ public enum ExceptionCode { NOT_ENOUGH_SPANS(50010, "not enough spans in the trace"), COLLECTOR_ID_NOT_MATCHED(50011, "span collector-id attribute does not match"), NULL_VAR(50012, "variable is null"), - EXPECTED_LOG_NOT_FOUND(50013, "Expected Log Not Found"), + EXPECTED_LOG_NOT_FOUND(50013, "expected log not found"), // build validator VALIDATION_TYPE_NOT_EXISTED(60001, "validation type not existed"), diff --git a/validator/src/test/java/com/amazon/aoc/validators/CWLogValidatorTest.java b/validator/src/test/java/com/amazon/aoc/validators/CWLogValidatorTest.java index 187d9f111..a6c6618fe 100644 --- a/validator/src/test/java/com/amazon/aoc/validators/CWLogValidatorTest.java +++ b/validator/src/test/java/com/amazon/aoc/validators/CWLogValidatorTest.java @@ -45,13 +45,11 @@ public void testSuccessfullLogMessage() throws Exception { outputLogEvent.setMessage(message); List eventList = new ArrayList<>(); eventList.add(outputLogEvent); - CWLogValidator validator = runValidation(validationConfig, context, eventList); - ProcessingReport report = validator.getProcessingReport(); - assertTrue(report.isSuccess()); + runValidation(validationConfig, context, eventList); } @Test - public void testFailedLogMessage() throws Exception { + public void testFailedNoTraceId() throws Exception { ValidationConfig validationConfig = new ValidationConfig(); validationConfig.setCallingType("http"); validationConfig.setExpectedLogStructureTemplate(