Expose cluster bootstrap commands through remote API
This commit is contained in:
parent
6c570ab6db
commit
f60dbd5cad
|
|
@ -26,7 +26,7 @@ const maxOutputBytes = 1 << 20
|
|||
// with the public top-level cases in ./jeannie. Internal __up-task and the
|
||||
// recursive remote command are intentionally excluded.
|
||||
var allowedCommands = map[string]bool{
|
||||
"help": true, "up": true, "plan": true,
|
||||
"help": true, "up": true, "plan": true, "cluster": true, "cluster-context": true,
|
||||
"cluster-profile": true, "rebuild-cluster": true, "stop-cluster": true,
|
||||
"start-cluster": true, "cleanup-debian-k8s": true,
|
||||
"shutdown": true, "start": true,
|
||||
|
|
|
|||
|
|
@ -112,6 +112,14 @@ func TestStorageCommandIsRemotelyEnabled(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestClusterBootstrapCommandsAreRemotelyEnabled(t *testing.T) {
|
||||
for _, command := range []string{"cluster", "cluster-context", "stop-cluster", "cleanup-debian-k8s", "platform", "apps"} {
|
||||
if !allowedCommands[command] {
|
||||
t.Fatalf("%s must be exposed through the remote API", command)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestMeshCommandIsRemotelyEnabled(t *testing.T) {
|
||||
if !allowedCommands["mesh"] {
|
||||
t.Fatal("mesh must be exposed through the remote API")
|
||||
|
|
|
|||
Loading…
Reference in New Issue