aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2023-09-28 16:04:42 +0200
committerjonmv <venstad@gmail.com>2023-09-28 16:04:42 +0200
commita1bd65e6be24f8073c6a5cc826d291a3571ee676 (patch)
tree3fe32ce362992e402ef0e7459468489df1a60611 /controller-server/src
parentd10c4a0aebadf5ffb73218b8444d489a79b159ae (diff)
Read active token fingerprints from configserver
Diffstat (limited to 'controller-server/src')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java
index ed5226ebc8b..4a1ad86b5a4 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java
@@ -103,6 +103,7 @@ public class ConfigServerMock extends AbstractComponent implements ConfigServer
private final Map<DeploymentId, TestReport> testReport = new HashMap<>();
private final Map<DeploymentId, CloudAccount> cloudAccounts = new HashMap<>();
private final Map<DeploymentId, List<X509Certificate>> additionalCertificates = new HashMap<>();
+ private final Map<String, List<String>> activeTokenFingerprints = new HashMap<>();
private List<SearchNodeMetrics> searchNodeMetrics;
private Version lastPrepareVersion = null;
@@ -319,6 +320,10 @@ public class ConfigServerMock extends AbstractComponent implements ConfigServer
return additionalCertificates.getOrDefault(deployment, List.of());
}
+ public void setActiveTokenFingerprints(String hostname, List<String> fingerprints) {
+ activeTokenFingerprints.put(hostname, List.copyOf(fingerprints));
+ }
+
@Override
public NodeRepositoryMock nodeRepository() {
return nodeRepository;
@@ -585,6 +590,11 @@ public class ConfigServerMock extends AbstractComponent implements ConfigServer
return "{\"settings\":{\"name\":\"foo\",\"role\":\"vespa-secretstore-access\",\"awsId\":\"892075328880\",\"externalId\":\"*****\",\"region\":\"us-east-1\"},\"status\":\"ok\"}";
}
+ @Override
+ public Map<String, List<String>> activeTokenFingerprints(DeploymentId deploymentId) {
+ return Map.copyOf(activeTokenFingerprints);
+ }
+
public static class Application {
private final ApplicationId id;