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

Function TestFindRunnableWorkflows_NoWorkflowsDir

pkg/cli/run_interactive_test.go:272–291  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

270}
271
272func TestFindRunnableWorkflows_NoWorkflowsDir(t *testing.T) {
273 // Create a temporary directory without .github/workflows
274 tempDir := t.TempDir()
275
276 // Change to temp directory
277 oldWd, err := os.Getwd()
278 require.NoError(t, err)
279 defer func() { _ = os.Chdir(oldWd) }()
280 require.NoError(t, os.Chdir(tempDir))
281
282 // Should handle missing directory gracefully
283 workflows, err := findRunnableWorkflows(false)
284
285 // Should return error or empty list
286 if err != nil {
287 assert.Error(t, err)
288 } else {
289 assert.Empty(t, workflows)
290 }
291}
292
293func TestFindRunnableWorkflows_WithInputs(t *testing.T) {
294 // Create a temporary directory for test workflows

Callers

nothing calls this directly

Calls 2

findRunnableWorkflowsFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected