diff --git a/terraform/validation/main.tf b/terraform/validation/main.tf index fbee1a396..c8e4d4ad1 100644 --- a/terraform/validation/main.tf +++ b/terraform/validation/main.tf @@ -73,7 +73,7 @@ resource "null_resource" "validator" { provisioner "local-exec" { command = <<-EOT docker-compose -f ${local.docker_compose_path} down - docker-compose -f ${local.docker_compose_path} build --no-cache + docker-compose -f ${local.docker_compose_path} build docker-compose -f ${local.docker_compose_path} up --abort-on-container-exit EOT } diff --git a/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java b/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java index 74b5fb9c5..f575d1f54 100644 --- a/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java +++ b/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java @@ -38,6 +38,8 @@ public class CWLogValidator implements IValidator { private JsonSchema schema; protected String logGroupName; + private ICaller caller; + private Context context; protected final ObjectMapper mapper = new ObjectMapper(); @@ -50,6 +52,7 @@ public void init( FileConfig expectedDataTemplate) throws Exception { this.context = context; + this.caller = caller; cloudWatchService = new CloudWatchService(context.getRegion()); logGroupName = String.format(LOGGROUPPATH, context.getTestingId()); MustacheHelper mustacheHelper = new MustacheHelper(); @@ -61,11 +64,11 @@ public void init( .freeze(); JsonSchema jsonSchema = jsonSchemaFactory.getJsonSchema(jsonNode); this.schema = jsonSchema; - caller.callSampleApp(); } @Override public void validate() throws Exception { + caller.callSampleApp(); RetryHelper.retry( getMaxRetryCount(), CHECK_INTERVAL_IN_MILLI,