use of com.yahoo.config.model.api.ConfigDefinitionRepo in project vespa by vespa-engine.
the class StaticConfigDefinitionRepoTest method testThatRepoIsCorrectlyInitialized.
@Test
public void testThatRepoIsCorrectlyInitialized() throws IOException {
File topDir = folder.newFolder();
File defDir = new File(topDir, "classes");
defDir.mkdir();
addFile(defDir, new ConfigDefinitionKey("foo", "foons"), "namespace=foons\nval int\n");
addFile(defDir, new ConfigDefinitionKey("bar", "barns"), "namespace=barns\nval string\n");
ConfigDefinitionRepo repo = new StaticConfigDefinitionRepo(defDir);
assertThat(repo.getConfigDefinitions().size(), is(2));
}
use of com.yahoo.config.model.api.ConfigDefinitionRepo in project vespa by vespa-engine.
the class DeployStateTest method createDeployState.
private DeployState createDeployState(ApplicationPackage app, Map<ConfigDefinitionKey, com.yahoo.vespa.config.buildergen.ConfigDefinition> defs) {
DeployState.Builder builder = new DeployState.Builder().applicationPackage(app);
builder.configDefinitionRepo(new ConfigDefinitionRepo() {
@Override
public Map<ConfigDefinitionKey, com.yahoo.vespa.config.buildergen.ConfigDefinition> getConfigDefinitions() {
return defs;
}
});
return builder.build(true);
}
Aggregations