(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestNewDeployCommand_RegistersCoreFlags(t *testing.T) { |
| 34 | cmd := NewDeployCommand(func(string) error { return nil }) |
| 35 | require.NotNil(t, cmd) |
| 36 | |
| 37 | expectedFlags := []string{ |
| 38 | "repo", |
| 39 | "org", |
| 40 | "repos", |
| 41 | "yes", |
| 42 | "name", |
| 43 | "engine", |
| 44 | "force", |
| 45 | "append", |
| 46 | "no-gitattributes", |
| 47 | "dir", |
| 48 | "no-stop-after", |
| 49 | "stop-after", |
| 50 | "no-security-scanner", |
| 51 | "cool-down", |
| 52 | } |
| 53 | |
| 54 | for _, flagName := range expectedFlags { |
| 55 | t.Run(flagName, func(t *testing.T) { |
| 56 | flag := cmd.Flags().Lookup(flagName) |
| 57 | require.NotNil(t, flag, "expected flag %q to be registered", flagName) |
| 58 | }) |
| 59 | } |
| 60 | |
| 61 | repoFlag := cmd.Flags().Lookup("repo") |
| 62 | require.NotNil(t, repoFlag, "expected --repo flag to be registered") |
| 63 | assert.Contains(t, repoFlag.Usage, "required unless --org is provided") |
| 64 | } |
| 65 | |
| 66 | func TestNewDeployCommand_CoolDownFlagUsageMatchesUpdate(t *testing.T) { |
| 67 | cmd := NewDeployCommand(func(string) error { return nil }) |
nothing calls this directly
no test coverage detected