Search in sources :

Example 11 with ConfigId

use of com.yahoo.vespa.applicationmodel.ConfigId in project vespa by vespa-engine.

the class VespaModelUtilTest method testGetStorageNodeIndex.

@Test
public void testGetStorageNodeIndex() {
    ConfigId configId = TestUtil.storageNodeConfigId(CONTENT_CLUSTER_ID.toString(), 3);
    assertThat(VespaModelUtil.getStorageNodeIndex(configId)).isEqualTo(3);
}
Also used : ConfigId(com.yahoo.vespa.applicationmodel.ConfigId) Test(org.junit.Test)

Example 12 with ConfigId

use of com.yahoo.vespa.applicationmodel.ConfigId in project vespa by vespa-engine.

the class VespaModelUtilTest method testBadClusterControllerConfigId.

@Test(expected = IllegalArgumentException.class)
public void testBadClusterControllerConfigId() {
    ConfigId configId = new ConfigId("fantasy_sports/storage/9");
    VespaModelUtil.getClusterControllerIndex(configId);
    fail();
}
Also used : ConfigId(com.yahoo.vespa.applicationmodel.ConfigId) Test(org.junit.Test)

Example 13 with ConfigId

use of com.yahoo.vespa.applicationmodel.ConfigId in project vespa by vespa-engine.

the class VespaModelUtilTest method testGetClusterControllerIndexWithStandaloneClusterController.

@Test
public void testGetClusterControllerIndexWithStandaloneClusterController() {
    ConfigId configId = new ConfigId("fantasy_sports/standalone/fantasy_sports-controllers/1");
    assertThat(VespaModelUtil.getClusterControllerIndex(configId)).isEqualTo(1);
}
Also used : ConfigId(com.yahoo.vespa.applicationmodel.ConfigId) Test(org.junit.Test)

Aggregations

ConfigId (com.yahoo.vespa.applicationmodel.ConfigId)13 Test (org.junit.Test)7 ServiceType (com.yahoo.vespa.applicationmodel.ServiceType)6 ClusterId (com.yahoo.vespa.applicationmodel.ClusterId)5 HostName (com.yahoo.vespa.applicationmodel.HostName)5 ServiceInstance (com.yahoo.vespa.applicationmodel.ServiceInstance)5 ApplicationInstanceId (com.yahoo.vespa.applicationmodel.ApplicationInstanceId)4 ApplicationInstanceReference (com.yahoo.vespa.applicationmodel.ApplicationInstanceReference)4 ServiceCluster (com.yahoo.vespa.applicationmodel.ServiceCluster)4 TenantId (com.yahoo.vespa.applicationmodel.TenantId)4 ApplicationInstance (com.yahoo.vespa.applicationmodel.ApplicationInstance)3 ServiceStatus (com.yahoo.vespa.applicationmodel.ServiceStatus)3 ApplicationId (com.yahoo.config.provision.ApplicationId)2 ConfigserverConfig (com.yahoo.cloud.config.ConfigserverConfig)1 Node (com.yahoo.vespa.hosted.provision.Node)1 Host (com.yahoo.vespa.orchestrator.Host)1 Orchestrator (com.yahoo.vespa.orchestrator.Orchestrator)1 OrchestratorConfig (com.yahoo.vespa.orchestrator.config.OrchestratorConfig)1 ClusterControllerClient (com.yahoo.vespa.orchestrator.controller.ClusterControllerClient)1 ClusterControllerClientFactory (com.yahoo.vespa.orchestrator.controller.ClusterControllerClientFactory)1