aboutsummaryrefslogtreecommitdiffstats
path: root/flags/src/test/java/com/yahoo/vespa/flags/DimensionTest.java
blob: 11687265a05e05f6267179d25a2c13e8e0cfda1a (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.flags;

/**
 * @author hakonhall
 */
class DimensionTest {
    /**
     * A compile-time test:  If this breaks you have most likely added (or removed) a dimension?
     * If so you need to update the following:</p>
     *
     * <ul>
     *     <li>Dimension validation in SystemFlagsDataArchive</li>
     *     <li>Flag edit documenting dimension list in EditFlagDataCommandTest</li>
     * </ul>
     */
    @SuppressWarnings("unused")
    public String remember_to_update_SystemFlagsDataArchive(Dimension dimension) {
        return switch (dimension) {
            case APPLICATION, ARCHITECTURE, CLAVE, CLOUD, CLOUD_ACCOUNT, CLUSTER_ID, CLUSTER_TYPE,
                    CONSOLE_USER_EMAIL, ENVIRONMENT, HOSTNAME, INSTANCE_ID, NODE_TYPE, SYSTEM, TENANT_ID,
                    VESPA_VERSION, ZONE_ID -> dimension.toWire();
        };
    }
}