cli/pkg/cmd/workflow/shared
Tyler McGoffin a18c54e824 Fix unhandled panic in FindWorkflow and add tests
FindWorkflow had a code path that could error without handling that error
that was introduced in #10328. I previously called out the lack of tests
in this part of the code in my review, and punting them then bit us here:
https://github.com/cli/cli/pull/10328#pullrequestreview-2597266783.

As such, this fixes the panic, but also adds tests to cover the relevant
code paths through FindWorkflow, including some tests for getWorkflowByID,
getWorkflowsByName, and GetWorkflows.

This does NOT seek to refactor the existing code, just cover the existing
behavior and validate that we are resolving this panic (covered by
TestFindWorkflow_nonHTTPError).
2025-02-28 15:11:53 -08:00
..
shared.go Fix unhandled panic in FindWorkflow and add tests 2025-02-28 15:11:53 -08:00
shared_test.go Fix unhandled panic in FindWorkflow and add tests 2025-02-28 15:11:53 -08:00
test.go Add tests to enable a workflow in the disabled_inactivity state 2022-01-16 22:22:08 +09:00