diff options
author | 2018-03-09 10:00:26 +0000 | |
---|---|---|
committer | 2018-03-09 10:00:26 +0000 | |
commit | f3b28a0aafd83a57d42afbf23c9f6fbe6f546db3 (patch) | |
tree | 5ecb2b2a78ab3139828db18de5f2a76d76c77519 /packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging | |
parent | 8d0b9eb56af520d28c423da76c0f0be02cb453c7 (diff) | |
parent | 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e (diff) |
Merge "Reduce log noise/warnings format to conventions"
Diffstat (limited to 'packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging')
-rw-r--r-- | packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java | 100 |
1 files changed, 49 insertions, 51 deletions
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java index bae9af5cc1..56bea0f6b3 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java @@ -47,62 +47,60 @@ import org.openecomp.mso.global_tests.ArquillianPackagerForITCases; @RunWith(Arquillian.class) public class LogsCheckerITCase { - + @BeforeClass - public static void waitBeforeStart () throws InterruptedException { - System.out.println ("Executing " + LogsCheckerITCase.class.getName ()); - + public static void waitBeforeStart() throws InterruptedException { + System.out.println("Executing " + LogsCheckerITCase.class.getName()); + + } + + @Deployment(name = "log-check", testable = true) + public static Archive<?> createAsdcControllerWarDeployment() throws Exception { + // Any war could be used here, we just take that one randomly + // Be careful some WAR does not work when being injected in JBOSS, probably due to Servlet conflict + System.out.println("Deploying ASDC Controller WAR for log checker"); + WebArchive warArchive = (WebArchive) ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war"); + + JavaArchive testclasses = ShrinkWrap.create(JavaArchive.class, "testClasses.jar"); + + testclasses.addPackage("org.openecomp.mso.filesearching"); + + warArchive.addAsLibraries(testclasses); + + Testable.archiveToTest(warArchive); + return warArchive; + } + + @Before + public void beforeEachTest() { + LogFileSearching.initFile("/tmp/mso-log-checker.log"); + } + + @After + public void afterEachTest() { + LogFileSearching.closeFile(); } - - @Deployment(name="log-check",testable=true) - public static Archive<?> createAsdcControllerWarDeployment () throws Exception { - // Any war could be used here, we just take that one randomly - // Be careful some WAR does not work when being injected in JBOSS, probably due to Servlet conflict - System.out.println("Deploying ASDC Controller WAR for log checker"); - WebArchive warArchive = (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war"); - - JavaArchive testclasses = ShrinkWrap.create (JavaArchive.class, "testClasses.jar"); - - testclasses.addPackage("org.openecomp.mso.filesearching"); - - warArchive.addAsLibraries(testclasses); - - Testable.archiveToTest(warArchive); - return warArchive; - } - - @Before - public void beforeEachTest() { - LogFileSearching.initFile("/tmp/mso-log-checker.log"); - } - - @After - public void afterEachTest() { - LogFileSearching.closeFile(); - } - + @Test - @OperateOnDeployment("log-check") - public void testJbossServerLog() throws IOException { - - File serverLogs = new File("/opt/jboss/standalone/log"); - //File serverLogs = new File("/tmp/jbosslogs/server.log"); - - assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, serverLogs)); - + @OperateOnDeployment("log-check") + public void testJbossServerLog() throws IOException { + + File serverLogs = new File("/opt/jboss/standalone/log"); + //File serverLogs = new File("/tmp/jbosslogs/server.log"); + + assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, serverLogs)); + } - + @Test @OperateOnDeployment("log-check") - public void testMSOLog() throws IOException { - //File serverLogs = new File("/opt/app/mso/jboss-eap-6.2/standalone/log/server.log"); - File msoLogs = new File("/var/log/ecomp/MSO"); - - assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, msoLogs)); - + public void testMSOLog() throws IOException { + //File serverLogs = new File("/opt/app/mso/jboss-eap-6.2/standalone/log/server.log"); + File msoLogs = new File("/var/log/ecomp/MSO"); + + assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, msoLogs)); + } - - - - + + } |