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

Function TestNewCachesCommand_Flags

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

Source from the content-addressed store, hash-verified

212}
213
214func TestNewCachesCommand_Flags(t *testing.T) {
215 cmd := NewCachesCommand()
216
217 expectedFlags := []struct {
218 name string
219 shorthand string
220 }{
221 {"ip", "i"},
222 {"user", "u"},
223 {"port", "P"},
224 {"pwd", "p"},
225 {"alias", "a"},
226 }
227
228 for _, f := range expectedFlags {
229 flag := cmd.Flags().Lookup(f.name)
230 assert.NotNil(t, flag, "flag %q should exist", f.name)
231 assert.Equal(t, f.shorthand, flag.Shorthand, "flag %q shorthand mismatch", f.name)
232 }
233}
234
235func TestNewCachesCommand_RequiredFlags(t *testing.T) {
236 cmd := NewCachesCommand()

Callers

nothing calls this directly

Calls 1

NewCachesCommandFunction · 0.70

Tested by

no test coverage detected