diff options
author | Martin Polden <mpolden@mpolden.no> | 2018-10-04 12:59:46 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2018-10-04 12:59:46 +0200 |
commit | 6162be545b9be83690d27cad76beebd946b28d5f (patch) | |
tree | 7550d58def39a7248d827517dfe986621df3a6fb | |
parent | b1d9a5c073a63e4c9d717fde2caa7999c9b8b9be (diff) |
Support all node types in secret-agent config
2 files changed, 12 insertions, 0 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfig.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfig.java index 09c6891612e..59dbb6fb5d1 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfig.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfig.java @@ -85,6 +85,8 @@ public class SecretAgentCheckConfig { case proxyhost: return "routinghost"; case config: return "configserver"; case confighost: return "configserverhost"; + case controller: return "controller"; + case controllerhost: return "controllerhost"; default: throw new IllegalArgumentException("Unknown node type " + nodeType); } } diff --git a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfigTest.java b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfigTest.java index 90363eaa5bb..e0ce75b6fc2 100644 --- a/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfigTest.java +++ b/node-admin/src/test/java/com/yahoo/vespa/hosted/node/admin/util/SecretAgentCheckConfigTest.java @@ -1,11 +1,13 @@ // 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.node.admin.util; +import com.yahoo.config.provision.NodeType; import org.junit.Test; import java.nio.file.Paths; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; /** * @author freva @@ -75,4 +77,12 @@ public class SecretAgentCheckConfigTest { " user: barfoo\n" + " check: /some/test\n", scheduleMaker.render()); } + + @Test + public void supportsAllNodeTypes() { + for (NodeType nodeType : NodeType.values()) { + assertNotNull(SecretAgentCheckConfig.nodeTypeToRole(nodeType)); + } + } + } |