aboutsummaryrefslogtreecommitdiffstats
path: root/flags/src/test/java/com/yahoo/vespa/flags/DimensionTest.java
blob: 4b64c8a198ea42acd87ecb558d08aff653f76b48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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 Dimension validation in SystemFlagsDataArchive.
     */
    @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();
        };
    }
}