summaryrefslogtreecommitdiffstats
path: root/athenz-identity-provider-service/src/test/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/TestUtils.java
blob: de623b7bcf83581d502502eecdaa643a9bcc6d6d (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
// 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.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.Builder zoneConfig =
                new AthenzProviderServiceConfig.Builder()
                        .serviceName(service)
                        .secretVersion(0)
                        .domain(domain)
                        .certDnsSuffix(dnsSuffix)
                        .ztsUrl("localhost/zts")
                        .secretName("s3cr3t");
        return new AthenzProviderServiceConfig(
                new AthenzProviderServiceConfig.Builder()
                        .athenzCaTrustStore("/dummy/path/to/athenz-ca.jks"));
    }

}