Refactor dependencyManagement
to enable includes, added it for this
This commit is contained in:
parent
a5cc2611a6
commit
ceddc89fe4
25 changed files with 526 additions and 9 deletions
21
src/it/log-gcp-from-env/postbuild.bsh
Normal file
21
src/it/log-gcp-from-env/postbuild.bsh
Normal file
|
@ -0,0 +1,21 @@
|
|||
// verify log
|
||||
|
||||
String expected = "^\\{\"time\":\"202[3-9]-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{0,3}Z\",\"severity\":\"INFO\",\"thread\":\"main\",\"logger\":\"io.kokuwa.micronaut.logging.LoggingTest\",\"message\":\"test-output-marker\",\"raw-message\":\"test-output-marker\"}$";
|
||||
String[] logs = org.codehaus.plexus.util.FileUtils.fileRead(basedir + "/build.log").split("\n");
|
||||
|
||||
for (String log : logs) {
|
||||
if (!log.contains("test-output-marker")) {
|
||||
continue;
|
||||
}
|
||||
if (java.util.regex.Pattern.matches(expected, log)) {
|
||||
return true;
|
||||
} else {
|
||||
System.out.println("marker found, but formatting invalid:");
|
||||
System.out.println("[EXPECTED] " + expected);
|
||||
System.out.println("[ACTUAL] " + log);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("marker not found");
|
||||
return false;
|
Loading…
Add table
Add a link
Reference in a new issue