TestReadWorkflowFileNonExistent tests error handling for non-existent files
(t *testing.T)
| 118 | |
| 119 | // TestReadWorkflowFileNonExistent tests error handling for non-existent files |
| 120 | func 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 |
nothing calls this directly
no test coverage detected