diff --git a/application/src/test/java/org/thingsboard/server/service/install/InstallScriptsTest.java b/application/src/test/java/org/thingsboard/server/service/install/InstallScriptsTest.java index 9b1d99c77a..26eead0ec7 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/InstallScriptsTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/InstallScriptsTest.java @@ -16,6 +16,7 @@ package org.thingsboard.server.service.install; import com.fasterxml.jackson.databind.JsonNode; +import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @@ -46,6 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.willReturn; +@Slf4j @SpringBootTest(classes = {InstallScripts.class, RuleChainDataValidator.class}) class InstallScriptsTest { @@ -80,16 +82,16 @@ class InstallScriptsTest { @Test void testDefaultRuleChainsTemplates() throws IOException { - Path tenantRuleChainsDir = installScripts.getTenantRuleChainsDir(); - List ruleChainsFromPath = installScripts.findRuleChainsFromPath(tenantRuleChainsDir); - ruleChainsFromPath.forEach(this::validateRuleChainTemplate); + Path dir = installScripts.getTenantRuleChainsDir(); + installScripts.findRuleChainsFromPath(dir) + .forEach(this::validateRuleChainTemplate); } @Test void testDefaultEdgeRuleChainsTemplates() throws IOException { - Path edgeChainsDir = installScripts.getEdgeRuleChainsDir(); - List ruleChainsFromPath = installScripts.findRuleChainsFromPath(edgeChainsDir); - ruleChainsFromPath.forEach(this::validateRuleChainTemplate); + Path dir = installScripts.getEdgeRuleChainsDir(); + installScripts.findRuleChainsFromPath(dir) + .forEach(this::validateRuleChainTemplate); } @Test @@ -98,6 +100,7 @@ class InstallScriptsTest { } private void validateRuleChainTemplate(Path templateFilePath) { + log.warn("validateRuleChainTemplate {}", templateFilePath); JsonNode ruleChainJson = JacksonUtil.toJsonNode(templateFilePath.toFile()); RuleChain ruleChain = JacksonUtil.treeToValue(ruleChainJson.get("ruleChain"), RuleChain.class);