blob: 5ae4b9f9bc51ab1bffd50fc14e1905dd27c8a4d7 (
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
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.athenz.instanceproviderservice;
import com.google.common.collect.ImmutableMap;
import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.hosted.athenz.instanceproviderservice.config.AthenzProviderServiceConfig;
/**
* @author bjorncs
*/
public class TestUtils {
public static AthenzProviderServiceConfig getAthenzProviderConfig(String domain,
String service,
String dnsSuffix,
Zone zone) {
AthenzProviderServiceConfig.Zones.Builder zoneConfig =
new AthenzProviderServiceConfig.Zones.Builder()
.serviceName(service)
.secretVersion(0)
.domain(domain)
.certDnsSuffix(dnsSuffix)
.secretName("s3cr3t");
return new AthenzProviderServiceConfig(
new AthenzProviderServiceConfig.Builder()
.zones(ImmutableMap.of(zone.environment().value() + "." + zone.region().value(), zoneConfig))
.ztsUrl("localhost/zts")
.athenzCaTrustStore("/dummy/path/to/athenz-ca.jks"));
}
}
|