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

Function TestFetchLocalWorkflow_NonExistentFile

pkg/cli/remote_workflow_test.go:83–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestFetchLocalWorkflow_NonExistentFile(t *testing.T) {
84 spec := &WorkflowSpec{
85 WorkflowPath: "/nonexistent/path/to/workflow.md",
86 WorkflowName: "nonexistent-workflow",
87 }
88
89 result, err := fetchLocalWorkflow(spec, false)
90
91 require.Error(t, err, "should error for non-existent file")
92 assert.Nil(t, result, "result should be nil on error")
93 assert.Contains(t, err.Error(), "not found", "error should mention file not found")
94}
95
96func TestFetchLocalWorkflow_DirectoryInsteadOfFile(t *testing.T) {
97 tempDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

fetchLocalWorkflowFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected