mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 04:35:12 +01:00
Set ConsoleLogger not to use log file after running ConsoleLoggerTest
This commit is contained in:
parent
cf3d84e3c1
commit
2d10b46df2
@ -6,6 +6,7 @@ import fr.xephi.authme.settings.properties.PluginSettings;
|
||||
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||
import fr.xephi.authme.util.StringUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@ -68,6 +69,16 @@ public class ConsoleLoggerTest {
|
||||
ConsoleLogger.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the ConsoleLogger back to its defaults after running all tests. Especially important
|
||||
* is that we no longer enable logging to a file as the log file we've supplied will no longer
|
||||
* be around after this test class has finished.
|
||||
*/
|
||||
@AfterClass
|
||||
public static void resetConsoleToDefault() {
|
||||
ConsoleLogger.setLoggingOptions(newSettings(false, LogLevel.FINE));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldLogToFile() throws IOException {
|
||||
// given
|
||||
|
Loading…
Reference in New Issue
Block a user