Expose cluster bootstrap commands through remote API

This commit is contained in:
juvenal.diaz 2026-11-02 12:18:20 -06:00
parent 6c570ab6db
commit f60dbd5cad
2 changed files with 9 additions and 1 deletions

View File

@ -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,

View File

@ -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")