MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestNewCreateCommand_Subcommands

Function TestNewCreateCommand_Subcommands

cmd/create/create_test.go:55–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestNewCreateCommand_Subcommands(t *testing.T) {
56 cmd := NewCreateCommand()
57
58 expectedSubcommands := []string{"users", "ports", "passwords", "caches", "keys"}
59 for _, name := range expectedSubcommands {
60 found := false
61 for _, sub := range cmd.Commands() {
62 if sub.Name() == name {
63 found = true
64 break
65 }
66 }
67 assert.True(t, found, "expected subcommand %q to be registered", name)
68 }
69}
70
71func TestNewCreateCommand_SubcommandCount(t *testing.T) {
72 cmd := NewCreateCommand()

Callers

nothing calls this directly

Calls 1

NewCreateCommandFunction · 0.85

Tested by

no test coverage detected