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

Function TestNewTrysshCommand_Subcommands

cmd/cmd_test.go:18–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func TestNewTrysshCommand_Subcommands(t *testing.T) {
19 rootCmd := NewTrysshCommand()
20
21 expectedSubcommands := []string{
22 "version",
23 "ssh",
24 "scp",
25 "alias",
26 "create",
27 "delete",
28 "get",
29 "prune",
30 "encrypt",
31 }
32
33 for _, name := range expectedSubcommands {
34 found := false
35 for _, sub := range rootCmd.Commands() {
36 if sub.Name() == name {
37 found = true
38 break
39 }
40 }
41 assert.True(t, found, "expected subcommand %q to be registered", name)
42 }
43}
44
45func TestNewTrysshCommand_DisableDefaultCompletion(t *testing.T) {
46 rootCmd := NewTrysshCommand()

Callers

nothing calls this directly

Calls 1

NewTrysshCommandFunction · 0.85

Tested by

no test coverage detected