forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
extensions/arc/deployment/src/test/java/io/quarkus/arc/test/LoggingConfigTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.quarkus.arc.test; | ||
|
||
import org.eclipse.microprofile.config.ConfigProvider; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.builder.BuildContext; | ||
import io.quarkus.builder.BuildStep; | ||
import io.quarkus.deployment.builditem.RunTimeConfigurationDefaultBuildItem; | ||
import io.quarkus.test.QuarkusUnitTest; | ||
|
||
public class LoggingConfigTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusUnitTest config = new QuarkusUnitTest() | ||
.withEmptyApplication() | ||
.addBuildChainCustomizer(b -> { | ||
b.addBuildStep(new BuildStep() { | ||
@Override | ||
public void execute(BuildContext context) { | ||
context.produce(new RunTimeConfigurationDefaultBuildItem("quarkus.log.console.enable", "false")); | ||
} | ||
}).produces(RunTimeConfigurationDefaultBuildItem.class).build(); | ||
}); | ||
|
||
@Test | ||
public void testConsoleLogging() { | ||
System.out.println(ConfigProvider.getConfig().getConfigValue("quarkus.log.console.enable")); | ||
} | ||
|
||
} |