Search in sources :

Example 11 with VespaModelCreatorWithFilePkg

use of com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg in project vespa by vespa-engine.

the class ContainerModelBuilderTest method component_includes_are_added.

@Test
public void component_includes_are_added() {
    VespaModelCreatorWithFilePkg creator = new VespaModelCreatorWithFilePkg("src/test/cfg/application/include_dirs");
    VespaModel model = creator.create(true);
    ContainerCluster cluster = model.getContainerClusters().get("default");
    Map<ComponentId, Component<?, ?>> componentsMap = cluster.getComponentsMap();
    Component<?, ?> example = componentsMap.get(ComponentId.fromString("test.Exampledocproc"));
    assertThat(example.getComponentId().getName(), is("test.Exampledocproc"));
}
Also used : VespaModelCreatorWithFilePkg(com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg) VespaModel(com.yahoo.vespa.model.VespaModel) ContainerCluster(com.yahoo.vespa.model.container.ContainerCluster) Component(com.yahoo.vespa.model.container.component.Component) ComponentId(com.yahoo.component.ComponentId) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest) Test(org.junit.Test)

Example 12 with VespaModelCreatorWithFilePkg

use of com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg in project vespa by vespa-engine.

the class GlobalDistributionValidatorTest method throws_exception_if_referenced_document_not_global_end_to_end.

@Test
public void throws_exception_if_referenced_document_not_global_end_to_end() {
    exceptionRule.expect(IllegalArgumentException.class);
    exceptionRule.expectMessage("The following document types are referenced from other documents, but are not globally distributed: 'parent'");
    new VespaModelCreatorWithFilePkg("src/test/cfg/application/validation/global_distribution_validation/").create();
}
Also used : VespaModelCreatorWithFilePkg(com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg) Test(org.junit.Test)

Example 13 with VespaModelCreatorWithFilePkg

use of com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg in project vespa by vespa-engine.

the class ContainerIncludeTest method includeNonDirectory.

@Test(expected = IllegalArgumentException.class)
public void includeNonDirectory() {
    VespaModelCreatorWithFilePkg creator = new VespaModelCreatorWithFilePkg("src/test/cfg/container/data/containerinclude4/");
    creator.create();
}
Also used : VespaModelCreatorWithFilePkg(com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg) Test(org.junit.Test)

Example 14 with VespaModelCreatorWithFilePkg

use of com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg in project vespa by vespa-engine.

the class ContainerIncludeTest method include_empty_directory.

@Test
public void include_empty_directory() {
    VespaModelCreatorWithFilePkg creator = new VespaModelCreatorWithFilePkg("src/test/cfg/container/data/containerinclude6/");
    creator.create();
}
Also used : VespaModelCreatorWithFilePkg(com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg) Test(org.junit.Test)

Example 15 with VespaModelCreatorWithFilePkg

use of com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg in project vespa by vespa-engine.

the class ContainerIncludeTest method includeNonExistent.

@Test(expected = IllegalArgumentException.class)
public void includeNonExistent() {
    VespaModelCreatorWithFilePkg creator = new VespaModelCreatorWithFilePkg("src/test/cfg/container/data/containerinclude2/");
    creator.create();
}
Also used : VespaModelCreatorWithFilePkg(com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg) Test(org.junit.Test)

Aggregations

VespaModelCreatorWithFilePkg (com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg)18 Test (org.junit.Test)16 VespaModel (com.yahoo.vespa.model.VespaModel)5 HashMap (java.util.HashMap)2 ModelConfig (com.yahoo.cloud.config.ModelConfig)1 ComponentId (com.yahoo.component.ComponentId)1 ConfigModelRegistry (com.yahoo.config.model.ConfigModelRegistry)1 MapConfigModelRegistry (com.yahoo.config.model.MapConfigModelRegistry)1 DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)1 DocumentrouteselectorpolicyConfig (com.yahoo.documentapi.messagebus.protocol.DocumentrouteselectorpolicyConfig)1 MessagebusConfig (com.yahoo.messagebus.MessagebusConfig)1 Container (com.yahoo.vespa.model.container.Container)1 ContainerCluster (com.yahoo.vespa.model.container.ContainerCluster)1 Component (com.yahoo.vespa.model.container.component.Component)1 DocprocChain (com.yahoo.vespa.model.container.docproc.DocprocChain)1 ProcessingChain (com.yahoo.vespa.model.container.processing.ProcessingChain)1 SearchChain (com.yahoo.vespa.model.container.search.searchchain.SearchChain)1 ApiConfigModel (com.yahoo.vespa.model.test.ApiConfigModel)1 SimpleConfigModel (com.yahoo.vespa.model.test.SimpleConfigModel)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1