Search in sources :

Example 1 with ChainedComponent

use of com.yahoo.vespa.model.container.component.chain.ChainedComponent in project vespa by vespa-engine.

the class DomProviderBuilderTest method testCertificateConfig_noProxy.

@Test
public void testCertificateConfig_noProxy() {
    provider = new DomProviderBuilder(new HashMap<String, ComponentsBuilder.ComponentType>()).doBuild(root, noProxy);
    ChainedComponent providerSearcher = provider.getInnerComponents().iterator().next();
    assertThat(providerSearcher, instanceOf(HttpProviderSearcher.class));
    ProviderConfig.Builder providerBuilder = new ProviderConfig.Builder();
    ((HttpProvider) provider).getConfig(providerBuilder);
    ProviderConfig providerConfig = new ProviderConfig(providerBuilder);
    assertThat(providerConfig.yca().applicationId(), is("my-app"));
    assertThat(providerConfig.yca().useProxy(), is(false));
}
Also used : HttpProvider(com.yahoo.vespa.model.container.search.searchchain.HttpProvider) ChainedComponent(com.yahoo.vespa.model.container.component.chain.ChainedComponent) ProviderConfig(com.yahoo.search.federation.ProviderConfig) ComponentsBuilder(com.yahoo.vespa.model.builder.xml.dom.chains.ComponentsBuilder) HttpProviderSearcher(com.yahoo.vespa.model.container.search.searchchain.HttpProviderSearcher) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Example 2 with ChainedComponent

use of com.yahoo.vespa.model.container.component.chain.ChainedComponent in project vespa by vespa-engine.

the class ProcessingChainsTest method testProcessingChainConfiguration.

@Test
public void testProcessingChainConfiguration() {
    ProcessingChain defaultChain = processingChains.allChains().getComponent("default");
    assertEquals("default", defaultChain.getId().stringValue());
    assertEquals(1, defaultChain.getInnerComponents().size());
    Collection<ChainedComponent<?>> outerProcessors = processingChains.getComponentGroup().getComponents();
    assertEquals(1, outerProcessors.size());
    assertEquals("processor1", outerProcessors.iterator().next().getComponentId().toString());
    Collection<Processor> innerProcessors = defaultChain.getInnerComponents();
    assertEquals("processor2", innerProcessors.iterator().next().getComponentId().toString());
}
Also used : Processor(com.yahoo.vespa.model.container.processing.Processor) ProcessingChain(com.yahoo.vespa.model.container.processing.ProcessingChain) ChainedComponent(com.yahoo.vespa.model.container.component.chain.ChainedComponent) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Aggregations

DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)2 ChainedComponent (com.yahoo.vespa.model.container.component.chain.ChainedComponent)2 Test (org.junit.Test)2 ProviderConfig (com.yahoo.search.federation.ProviderConfig)1 ComponentsBuilder (com.yahoo.vespa.model.builder.xml.dom.chains.ComponentsBuilder)1 ProcessingChain (com.yahoo.vespa.model.container.processing.ProcessingChain)1 Processor (com.yahoo.vespa.model.container.processing.Processor)1 HttpProvider (com.yahoo.vespa.model.container.search.searchchain.HttpProvider)1 HttpProviderSearcher (com.yahoo.vespa.model.container.search.searchchain.HttpProviderSearcher)1