MCPcopy Create free account
hub / github.com/github/gh-aw / TestUpdateCommand_RepoFlag

Function TestUpdateCommand_RepoFlag

pkg/cli/update_integration_test.go:243–255  ·  view source on GitHub ↗

TestUpdateCommand_RepoFlag verifies that --repo is recognized.

(t *testing.T)

Source from the content-addressed store, hash-verified

241
242// TestUpdateCommand_RepoFlag verifies that --repo is recognized.
243func 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.

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.45

Tested by

no test coverage detected