(t *testing.T)
| 16 | } |
| 17 | |
| 18 | func 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 | |
| 45 | func TestNewTrysshCommand_DisableDefaultCompletion(t *testing.T) { |
| 46 | rootCmd := NewTrysshCommand() |
nothing calls this directly
no test coverage detected