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

Function TestReadSourceRepoFromFile_NoSource

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

Source from the content-addressed store, hash-verified

1566}
1567
1568func TestReadSourceRepoFromFile_NoSource(t *testing.T) {
1569 dir := t.TempDir()
1570 f := filepath.Join(dir, "wf.md")
1571 content := "---\non: push\n---\n# No source\n"
1572 require.NoError(t, os.WriteFile(f, []byte(content), 0644))
1573 assert.Empty(t, readSourceRepoFromFile(f), "should return empty string when no source field")
1574}
1575
1576func TestReadSourceRepoFromFile_MissingFile(t *testing.T) {
1577 assert.Empty(t, readSourceRepoFromFile("/nonexistent/file.md"), "should return empty string for missing file")

Callers

nothing calls this directly

Calls 1

readSourceRepoFromFileFunction · 0.85

Tested by

no test coverage detected