(t *testing.T)
| 212 | } |
| 213 | |
| 214 | func 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 | |
| 235 | func TestNewCachesCommand_RequiredFlags(t *testing.T) { |
| 236 | cmd := NewCachesCommand() |
nothing calls this directly
no test coverage detected