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

Function TestReadWorkflowFileNonExistent

pkg/cli/workflows_path_test.go:120–133  ·  view source on GitHub ↗

TestReadWorkflowFileNonExistent tests error handling for non-existent files

(t *testing.T)

Source from the content-addressed store, hash-verified

118
119// TestReadWorkflowFileNonExistent tests error handling for non-existent files
120func TestReadWorkflowFileNonExistent(t *testing.T) {
121 // Create a temporary directory structure
122 tempDir := testutil.TempDir(t, "test-*")
123 workflowsDir := filepath.Join(tempDir, ".github", "workflows")
124 if err := os.MkdirAll(workflowsDir, 0755); err != nil {
125 t.Fatalf("Failed to create workflows directory: %v", err)
126 }
127
128 // Try to read a non-existent file
129 _, _, err := readWorkflowFile("non-existent.md", workflowsDir)
130 if err == nil {
131 t.Error("Expected error for non-existent file, got nil")
132 }
133}
134
135// TestWorkflowResolutionWindowsCompatibility tests the complete workflow resolution flow
136// This test specifically addresses the issue reported in GitHub where Windows users

Callers

nothing calls this directly

Calls 3

TempDirFunction · 0.92
readWorkflowFileFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected