Tests: Fix line endings to match mock terminal line endings
The MockTerminal class always uses "\n" as line endings, so the tests should not use `System.lineSeparator`, but also a newline. relates elastic/x-pack-elasticsearch#1758 Original commit: elastic/x-pack-elasticsearch@364a4e43ad
This commit is contained in:
parent
ae70a657dd
commit
22d57ca96e
|
@ -76,12 +76,12 @@ public class ESNativeRealmMigrateToolTests extends CommandTestCase {
|
|||
}
|
||||
|
||||
terminalLogger.log(Level.ERROR, "logging an error");
|
||||
assertEquals("logging an error" + System.lineSeparator(), terminal.getOutput());
|
||||
assertEquals("logging an error\n", terminal.getOutput());
|
||||
terminal.reset();
|
||||
assertThat(terminal.getOutput(), isEmptyString());
|
||||
|
||||
terminalLogger.log(Level.FATAL, "logging a fatal message");
|
||||
assertEquals("logging a fatal message" + System.lineSeparator(), terminal.getOutput());
|
||||
assertEquals("logging a fatal message\n", terminal.getOutput());
|
||||
terminal.reset();
|
||||
assertThat(terminal.getOutput(), isEmptyString());
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class ESNativeRealmMigrateToolTests extends CommandTestCase {
|
|||
loggingLevels.remove(Level.OFF);
|
||||
for (Level level : loggingLevels) {
|
||||
terminalLogger.log(level, "this level should log " + level.name());
|
||||
assertEquals("this level should log " + level.name() + System.lineSeparator(), terminal.getOutput());
|
||||
assertEquals("this level should log " + level.name() + "\n", terminal.getOutput());
|
||||
terminal.reset();
|
||||
assertThat(terminal.getOutput(), isEmptyString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue