use of com.yahoo.config.model.application.provider.BaseDeployLogger in project vespa by vespa-engine.
the class FileSenderTest method require_that_fields_in_inner_maps_are_modified.
@Test
public void require_that_fields_in_inner_maps_are_modified() {
def.structMapDef("inner").addFileDef("fileVal");
def.structMapDef("inner").addStringDef("stringVal");
ConfigPayloadBuilder inner = builder.getMap("inner").put("foo");
inner.setField("fileVal", "bar.txt");
inner.setField("stringVal", "bar.txt");
service.pathToRef.put("bar.txt", new FileNode("barhash").value());
FileSender.sendUserConfiguredFiles(producer, serviceList, new BaseDeployLogger());
assertThat(builder.getMap("inner").get("foo").getObject("fileVal").getValue(), is("barhash"));
assertThat(builder.getMap("inner").get("foo").getObject("stringVal").getValue(), is("bar.txt"));
}
use of com.yahoo.config.model.application.provider.BaseDeployLogger in project vespa by vespa-engine.
the class FileSenderTest method require_that_structs_are_modified.
@Test
public void require_that_structs_are_modified() {
def.structDef("struct").addFileDef("fileVal");
def.structDef("struct").addStringDef("stringVal");
builder.getObject("struct").setField("fileVal", "foo.txt");
builder.getObject("struct").setField("stringVal", "foo.txt");
service.pathToRef.put("foo.txt", new FileNode("foohash").value());
FileSender.sendUserConfiguredFiles(producer, serviceList, new BaseDeployLogger());
assertThat(builder.getObject("struct").getObject("fileVal").getValue(), is("foohash"));
assertThat(builder.getObject("struct").getObject("stringVal").getValue(), is("foo.txt"));
}
use of com.yahoo.config.model.application.provider.BaseDeployLogger in project vespa by vespa-engine.
the class FileSenderTest method require_that_simple_file_fields_are_modified.
@Test
public void require_that_simple_file_fields_are_modified() {
def.addFileDef("fileVal");
def.addStringDef("stringVal");
builder.setField("fileVal", "foo.txt");
builder.setField("stringVal", "foo.txt");
service.pathToRef.put("foo.txt", new FileNode("fooshash").value());
FileSender.sendUserConfiguredFiles(producer, serviceList, new BaseDeployLogger());
assertThat(builder.getObject("fileVal").getValue(), is("fooshash"));
assertThat(builder.getObject("stringVal").getValue(), is("foo.txt"));
}
use of com.yahoo.config.model.application.provider.BaseDeployLogger in project vespa by vespa-engine.
the class SessionFactoryTest method require_that_session_can_be_created_from_existing.
@Test
public void require_that_session_can_be_created_from_existing() throws IOException {
LocalSession session = getLocalSession();
assertNotNull(session);
assertThat(session.getSessionId(), is(2l));
LocalSession session2 = factory.createSessionFromExisting(session, new BaseDeployLogger(), TimeoutBudgetTest.day());
assertNotNull(session2);
assertThat(session2.getSessionId(), is(3l));
}
use of com.yahoo.config.model.application.provider.BaseDeployLogger in project vespa by vespa-engine.
the class TestDriver method validate.
private void validate(ApplicationPackage appPkg) throws IOException {
if (!validate) {
return;
}
SchemaValidators schemaValidators = new SchemaValidators(new Version(6), new BaseDeployLogger());
if (appPkg.getHosts() != null) {
schemaValidators.hostsXmlValidator().validate(appPkg.getHosts());
}
schemaValidators.servicesXmlValidator().validate(appPkg.getServices());
}
Aggregations