aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/test/java/com/yahoo/vespa/config/server/MockSecretStoreValidator.java
blob: f6eff3b6cf03ef1d55c006d0c396632efb179b76 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server;

import com.yahoo.config.provision.SystemName;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.SecretStoreProvider;
import com.yahoo.restapi.SlimeJsonResponse;
import com.yahoo.restapi.StringResponse;
import com.yahoo.slime.Slime;
import com.yahoo.vespa.config.server.application.Application;
import com.yahoo.config.model.api.TenantSecretStore;
import com.yahoo.vespa.config.server.http.SecretStoreValidator;

/**
 * @author olaa
 */
public class MockSecretStoreValidator extends SecretStoreValidator {

    public MockSecretStoreValidator() {
        super(new SecretStoreProvider().get());
    }

    public HttpResponse validateSecretStore(Application application, SystemName system, Slime slime) {
        return new SlimeJsonResponse(slime);
    }
}