Search in sources :

Example 1 with RoutingProviderConfig

use of com.yahoo.cloud.config.RoutingProviderConfig in project vespa by vespa-engine.

the class ContainerClusterTest method requireThatRoutingProviderIsDisabledForNonHosted.

@Test
public void requireThatRoutingProviderIsDisabledForNonHosted() {
    DeployState state = new DeployState.Builder().properties(new DeployProperties.Builder().hostedVespa(false).build()).build(true);
    MockRoot root = new MockRoot("foo", state);
    ContainerCluster cluster = new ContainerCluster(root, "container0", "container1");
    RoutingProviderConfig.Builder builder = new RoutingProviderConfig.Builder();
    cluster.getConfig(builder);
    RoutingProviderConfig config = new RoutingProviderConfig(builder);
    assertFalse(config.enabled());
    assertEquals(0, cluster.getAllComponents().stream().map(c -> c.getClassId().getName()).filter(c -> c.equals("com.yahoo.jdisc.http.filter.security.RoutingConfigProvider")).count());
}
Also used : QrStartConfig(com.yahoo.search.config.QrStartConfig) ClusterControllerContainer(com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer) MetricDefaultsConfig(com.yahoo.container.jdisc.config.MetricDefaultsConfig) ConfigserverConfig(com.yahoo.cloud.config.ConfigserverConfig) RegionName(com.yahoo.config.provision.RegionName) DeployState(com.yahoo.config.model.deploy.DeployState) MockRoot(com.yahoo.config.model.test.MockRoot) HostResource(com.yahoo.vespa.model.HostResource) ClusterInfoConfig(com.yahoo.cloud.config.ClusterInfoConfig) ContainerSearch(com.yahoo.vespa.model.container.search.ContainerSearch) Host(com.yahoo.vespa.model.Host) ThreadpoolConfig(com.yahoo.container.handler.ThreadpoolConfig) ApplicationPackage(com.yahoo.config.application.api.ApplicationPackage) Component(com.yahoo.vespa.model.container.component.Component) Iterator(java.util.Iterator) ContainerDocproc(com.yahoo.vespa.model.container.docproc.ContainerDocproc) Environment(com.yahoo.config.provision.Environment) Collection(java.util.Collection) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) MockApplicationPackage(com.yahoo.config.model.test.MockApplicationPackage) Assert.assertFalse(org.junit.Assert.assertFalse) Zone(com.yahoo.config.provision.Zone) SystemName(com.yahoo.config.provision.SystemName) Optional(java.util.Optional) SearchChains(com.yahoo.vespa.model.container.search.searchchain.SearchChains) ClusterControllerClusterVerifier(com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerClusterVerifier) RoutingProviderConfig(com.yahoo.cloud.config.RoutingProviderConfig) DeployProperties(com.yahoo.config.model.deploy.DeployProperties) Assert.assertEquals(org.junit.Assert.assertEquals) RoutingProviderConfig(com.yahoo.cloud.config.RoutingProviderConfig) DeployState(com.yahoo.config.model.deploy.DeployState) MockRoot(com.yahoo.config.model.test.MockRoot) Test(org.junit.Test)

Aggregations

ClusterInfoConfig (com.yahoo.cloud.config.ClusterInfoConfig)1 ConfigserverConfig (com.yahoo.cloud.config.ConfigserverConfig)1 RoutingProviderConfig (com.yahoo.cloud.config.RoutingProviderConfig)1 ApplicationPackage (com.yahoo.config.application.api.ApplicationPackage)1 DeployProperties (com.yahoo.config.model.deploy.DeployProperties)1 DeployState (com.yahoo.config.model.deploy.DeployState)1 MockApplicationPackage (com.yahoo.config.model.test.MockApplicationPackage)1 MockRoot (com.yahoo.config.model.test.MockRoot)1 Environment (com.yahoo.config.provision.Environment)1 RegionName (com.yahoo.config.provision.RegionName)1 SystemName (com.yahoo.config.provision.SystemName)1 Zone (com.yahoo.config.provision.Zone)1 ThreadpoolConfig (com.yahoo.container.handler.ThreadpoolConfig)1 MetricDefaultsConfig (com.yahoo.container.jdisc.config.MetricDefaultsConfig)1 QrStartConfig (com.yahoo.search.config.QrStartConfig)1 Host (com.yahoo.vespa.model.Host)1 HostResource (com.yahoo.vespa.model.HostResource)1 ClusterControllerClusterVerifier (com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerClusterVerifier)1 ClusterControllerContainer (com.yahoo.vespa.model.admin.clustercontroller.ClusterControllerContainer)1 Component (com.yahoo.vespa.model.container.component.Component)1