use of com.hotels.styx.common.io.ClasspathResource in project styx by ExpediaGroup.
the class LoggingConfigurationHandlerTest method showsLogConfigContent.
@Test
public void showsLogConfigContent() throws IOException {
StartupConfig startupConfig = newStartupConfigBuilder().logbackConfigLocation(fixturesHome() + "/conf/environment/styx-config-test.yml").build();
LoggingConfigurationHandler handler = new LoggingConfigurationHandler(startupConfig.logConfigLocation());
HttpResponse response = Mono.from(handler.handle(get("/").build(), requestContext())).block();
String expected = Resources.load(new ClasspathResource("conf/environment/styx-config-test.yml", LoggingConfigurationHandlerTest.class));
assertThat(response.status(), is(OK));
assertThat(response.bodyAs(UTF_8), is(expected));
}
Aggregations