TestUpdateCommand_RepoFlag verifies that --repo is recognized.
(t *testing.T)
| 241 | |
| 242 | // TestUpdateCommand_RepoFlag verifies that --repo is recognized. |
| 243 | func TestUpdateCommand_RepoFlag(t *testing.T) { |
| 244 | setup := setupUpdateIntegrationTest(t) |
| 245 | defer setup.cleanup() |
| 246 | |
| 247 | // Use an invalid repo slug to avoid network calls while still validating flag parsing. |
| 248 | cmd := exec.Command(setup.binaryPath, "update", "--repo", "not-a-valid-slug", "--verbose") |
| 249 | cmd.Dir = setup.tempDir |
| 250 | output, err := cmd.CombinedOutput() |
| 251 | outputStr := string(output) |
| 252 | |
| 253 | assert.Error(t, err, "Command should fail for invalid repo slug") |
| 254 | assert.NotContains(t, outputStr, "unknown flag", "The --repo flag should be recognized") |
| 255 | } |
| 256 | |
| 257 | // TestUpdateCommand_AfterManifestAddIntegration verifies a manifest package can be |
| 258 | // added and then updated in place. |
nothing calls this directly
no test coverage detected