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

Function TestRunFix_DisabledCodemodSkipsMatchingFix

pkg/cli/fix_command_test.go:529–552  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

527}
528
529func TestRunFix_DisabledCodemodSkipsMatchingFix(t *testing.T) {
530 tmpDir := t.TempDir()
531 workflowFile := filepath.Join(tmpDir, "test.md")
532
533 content := `---
534on: workflow_dispatch
535timeout_minutes: 30
536---
537# Test Workflow
538`
539 require.NoError(t, os.WriteFile(workflowFile, []byte(content), 0644))
540
541 err := RunFix(FixConfig{
542 Write: true,
543 WorkflowDir: tmpDir,
544 DisabledCodemodIDs: []string{"timeout-minutes-migration"},
545 })
546 require.NoError(t, err)
547
548 updatedContent, err := os.ReadFile(workflowFile)
549 require.NoError(t, err)
550 assert.Contains(t, string(updatedContent), "timeout_minutes: 30")
551 assert.NotContains(t, string(updatedContent), "timeout-minutes: 30")
552}
553
554func TestFixCommand_CommandToSlashCommandMigration(t *testing.T) {
555 // Create a temporary directory for test files

Callers

nothing calls this directly

Calls 1

RunFixFunction · 0.85

Tested by

no test coverage detected