RED-4510: Generated Redaction Log and Generating will not run with profile

This commit is contained in:
Philipp Schramm 2022-07-26 14:56:03 +02:00
parent 2237ae3910
commit 79aee79567
2 changed files with 3 additions and 7 deletions

View File

@ -49,7 +49,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3;
@ -215,7 +214,7 @@ public class RulesTest {
* Please commit generated files, if not the following tests will fail * Please commit generated files, if not the following tests will fail
*/ */
@Test @Test
@Ignore// TODO PSC REMOVE // @Ignore// TODO PSC REMOVE
public void generateRedactionLogForAllFiles() { public void generateRedactionLogForAllFiles() {
Set<String> files = getFileNames(new HashSet<>(), FileSystems.getDefault().getPath(RESOURCES_PATH)); Set<String> files = getFileNames(new HashSet<>(), FileSystems.getDefault().getPath(RESOURCES_PATH));
@ -230,13 +229,11 @@ public class RulesTest {
/** /**
* Analyses file and compares its RedactionLog with saved one from here: REDACTION_LOG_PATH. * Analyses file and compares its RedactionLog with saved one from here: REDACTION_LOG_PATH.
* If RedactionLog Json does not exist, test will fail. * If RedactionLog Json does not exist, test will fail.
* Test is ignored, because it's for manual tests.
*/ */
@Ignore
@Test @Test
public void analyseFileAndCompareRedactionLog() { public void analyseFileAndCompareRedactionLog() {
String fileName = "files/Compounds/31 A14111B - EU AIR3 - MCP Section 1 - Identity of the plant protection product.pdf"; String fileName = "files/RulesTest/SYNGENTA_EFSA_sanitisation_GFL_v1_withHighlights.pdf";
analyseFileAndCompareRedactionLog(fileName); analyseFileAndCompareRedactionLog(fileName);
} }
@ -245,7 +242,7 @@ public class RulesTest {
* Analyses all files and compares its RedactionLog with saved one from here: REDACTION_LOG_PATH. * Analyses all files and compares its RedactionLog with saved one from here: REDACTION_LOG_PATH.
* If RedactionLog Json for one file does not exist, whole test will fail. * If RedactionLog Json for one file does not exist, whole test will fail.
*/ */
@IfProfileValue(name = "test-groups", value = "rules-test") //TODO PSC // @IfProfileValue(name = "test-groups", value = "rules-test") //TODO PSC
@Test @Test
public void analyseAllFilesAndCompareRedactionLogs() { public void analyseAllFilesAndCompareRedactionLogs() {