summaryrefslogtreecommitdiffstats
path: root/tenant-cd-api/src/main/java/ai/vespa/hosted/cd/TestRuntime.java
blob: feea05b7064da5202d2745950745eecc1698a8d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.hosted.cd;

import java.util.ServiceLoader;

/**
 * The place to obtain environment-dependent configuration for test of a Vespa deployment.
 *
 * @author jvenstad
 * @author mortent
 */
public interface TestRuntime {
    static TestRuntime get() {
        ServiceLoader<TestRuntime> serviceLoader = ServiceLoader.load(TestRuntime.class);
        return serviceLoader.findFirst().orElseThrow(() -> new RuntimeException("No TestRuntime implementation found"));
    }

    Deployment deploymentToTest();
}