use of com.yahoo.container.handler.observability.ApplicationStatusHandler in project vespa by vespa-engine.
the class ContainerModelBuilderTest method verify_bindings_for_builtin_handlers.
@Test
public void verify_bindings_for_builtin_handlers() throws Exception {
Element clusterElem = DomBuilderTest.parse("<jdisc id='default' version='1.0' />");
createModel(root, clusterElem);
JdiscBindingsConfig config = root.getConfig(JdiscBindingsConfig.class, "default/container.0");
JdiscBindingsConfig.Handlers defaultRootHandler = config.handlers(BindingsOverviewHandler.class.getName());
assertThat(defaultRootHandler.serverBindings(), contains("*://*/"));
JdiscBindingsConfig.Handlers applicationStatusHandler = config.handlers(ApplicationStatusHandler.class.getName());
assertThat(applicationStatusHandler.serverBindings(), contains("http://*/ApplicationStatus", "https://*/ApplicationStatus"));
JdiscBindingsConfig.Handlers statisticsRequestHandler = config.handlers(StatisticsRequestHandler.class.getName());
assertTrue(statisticsRequestHandler.serverBindings(0).startsWith("http://*/statistics"));
assertTrue(statisticsRequestHandler.serverBindings(1).startsWith("https://*/statistics"));
JdiscBindingsConfig.Handlers fileRequestHandler = config.handlers(VipStatusHandler.class.getName());
assertThat(fileRequestHandler.serverBindings(), contains("http://*/status.html", "https://*/status.html"));
}
Aggregations