Skip to content

Commit

Permalink
Fixed AsadminLoggingITest + added javadoc
Browse files Browse the repository at this point in the history
- The asadmin command doesn't do what one would expect ...

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Sep 18, 2022
1 parent 09ca418 commit e2592cd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,17 @@ public void listLogLevels() {
}


/**
* See LoggerInfoMetadataService class, it uses a HK2 registry based on generated
* META-INF/loggerinfo/LoggerInfoMetadata.properties files.
*/
@Test
public void listLoggers() {
AsadminResult result = ASADMIN.exec("list-loggers");
assertThat(result, asadminOK());
String[] lines = substringBefore(result.getStdOut(), "Command list-loggers executed successfully.").split("\n");
assertAll(
() -> assertThat(lines, arrayWithSize(equalTo(63))),
() -> assertThat(lines, arrayWithSize(equalTo(62))),
() -> assertThat(lines[0], matchesPattern("Logger Name[ ]+Subsystem[ ]+Logger Description[ ]+"))
);
Map<String, String[]> loggers = Arrays.stream(lines).skip(1).map(line -> line.split("\\s{2,}"))
Expand Down

0 comments on commit e2592cd

Please sign in to comment.