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

Function TestGetLockFilePath

pkg/cli/run_workflow_validation_test.go:15–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestGetLockFilePath(t *testing.T) {
16 tests := []struct {
17 name string
18 markdownPath string
19 expected string
20 }{
21 {
22 name: "regular workflow",
23 markdownPath: "/path/to/workflow.md",
24 expected: "/path/to/workflow.lock.yml",
25 },
26 {
27 name: "workflow in nested directory",
28 markdownPath: "/path/to/workflows/nested/workflow.md",
29 expected: "/path/to/workflows/nested/workflow.lock.yml",
30 },
31 }
32
33 for _, tt := range tests {
34 t.Run(tt.name, func(t *testing.T) {
35 result := getLockFilePath(tt.markdownPath)
36 assert.Equal(t, tt.expected, result)
37 })
38 }
39}
40
41func TestIsRunnable_WithLockFile(t *testing.T) {
42 tests := []struct {

Callers

nothing calls this directly

Calls 2

getLockFilePathFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected