aboutsummaryrefslogtreecommitdiffstats
path: root/config-model-api/src/test/java/com/yahoo/config/model/api/container/ContainerServiceTypeTest.java
blob: e451598b71d0dd5c66a1b042c1854a8120026e95 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.model.api.container;

import org.junit.Test;

import static com.yahoo.config.model.api.container.ContainerServiceType.CLUSTERCONTROLLER_CONTAINER;
import static com.yahoo.config.model.api.container.ContainerServiceType.CONTAINER;
import static com.yahoo.config.model.api.container.ContainerServiceType.LOGSERVER_CONTAINER;
import static com.yahoo.config.model.api.container.ContainerServiceType.METRICS_PROXY_CONTAINER;
import static com.yahoo.config.model.api.container.ContainerServiceType.QRSERVER;
import static org.junit.Assert.assertEquals;

/**
 * @author gjoranv
 */
public class ContainerServiceTypeTest {

    @Test
    public void new_values_are_not_added_without_updating_tests() {
        assertEquals(5, ContainerServiceType.values().length);
    }

    @Test
    public void service_names_do_not_change() {
        assertEquals("container", CONTAINER.serviceName);
        assertEquals("qrserver", QRSERVER.serviceName);
        assertEquals("container-clustercontroller", CLUSTERCONTROLLER_CONTAINER.serviceName);
        assertEquals("logserver-container", LOGSERVER_CONTAINER.serviceName);
        assertEquals("metricsproxy-container", METRICS_PROXY_CONTAINER.serviceName);
    }

}