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

Function TestUpdateCommand_NoMergeFlag

pkg/cli/update_integration_test.go:160–175  ·  view source on GitHub ↗

--- Update Command Integration Tests --- TestUpdateCommand_NoMergeFlag verifies that --no-merge flag is recognized.

(t *testing.T)

Source from the content-addressed store, hash-verified

158
159// TestUpdateCommand_NoMergeFlag verifies that --no-merge flag is recognized.
160func TestUpdateCommand_NoMergeFlag(t *testing.T) {
161 setup := setupUpdateIntegrationTest(t)
162 defer setup.cleanup()
163
164 // Run the update command with --no-merge flag — should be accepted
165 cmd := exec.Command(setup.binaryPath, "update", "--no-merge", "--verbose")
166 cmd.Dir = setup.tempDir
167 output, err := cmd.CombinedOutput()
168 outputStr := string(output)
169
170 // The --no-merge flag should be recognized (not "unknown flag").
171 // When no source workflows exist, the command succeeds with an info message.
172 assert.NoError(t, err, "Should succeed (no source workflows = info message, not error), output: %s", outputStr)
173 assert.NotContains(t, outputStr, "unknown flag", "The --no-merge flag should be recognized")
174 assert.Contains(t, outputStr, "no workflows found", "Should report no workflows found")
175}
176
177// TestUpdateCommand_NoRedirectFlag verifies that --no-redirect flag is recognized.
178func TestUpdateCommand_NoRedirectFlag(t *testing.T) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected