use of com.yahoo.vespa.model.test.utils.VespaModelCreatorWithMockPkg in project vespa by vespa-engine.
the class VespaModelTestCase method testHostsOverrides.
@Test
public void testHostsOverrides() throws IOException, SAXException {
VespaModel model = new VespaModelCreatorWithMockPkg(simpleHosts, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<services version=\"1.0\">" + "<config name=\"cloud.config.log.logd\">" + "<logserver><host>foo</host></logserver>" + "</config>" + "<admin version=\"2.0\">" + " <adminserver hostalias=\"node0\" />" + "</admin>" + "</services>").create();
LogdConfig config = getLogdConfig(model, "");
assertNotNull(config);
assertEquals(config.logserver().host(), "foo");
config = getLogdConfig(model, "hosts/" + HostName.getLocalhost() + "/logd");
assertNotNull(config);
assertEquals(config.logserver().host(), "foo");
}
Aggregations