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

Function TestGetWorkflowInputs_WithLockFile

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

Source from the content-addressed store, hash-verified

160}
161
162func TestGetWorkflowInputs_WithLockFile(t *testing.T) {
163 tests := []struct {
164 name string
165 markdownFile string
166 lockFileYAML string
167 expectedCount int
168 expectedReq map[string]bool // map of input name to required status
169 expectError bool
170 errorContains string
171 }{
172 {
173 name: "workflow with required and optional inputs",
174 markdownFile: "test-workflow.md",
175 lockFileYAML: `name: "Test Workflow"
176on:
177 workflow_dispatch:
178 inputs:
179 issue_url:
180 description: 'Issue URL'
181 required: true
182 type: string
183 debug_mode:
184 description: 'Enable debug mode'
185 required: false
186 type: boolean
187permissions:
188 contents: read
189jobs:
190 test:
191 runs-on: ubuntu-latest
192 steps:
193 - run: echo "test"
194`,
195 expectedCount: 2,
196 expectedReq: map[string]bool{
197 "issue_url": true,
198 "debug_mode": false,
199 },
200 expectError: false,
201 },
202 {
203 name: "workflow with aw_context input is filtered out",
204 markdownFile: "compiled-workflow.md",
205 lockFileYAML: `name: "Compiled Workflow"
206on:
207 workflow_dispatch:
208 inputs:
209 aw_context:
210 default: ""
211 description: Agent caller context (used internally by Agentic Workflows).
212 required: false
213 type: string
214 task:
215 description: 'Task description'
216 required: true
217 type: string
218permissions:
219 contents: read

Callers

nothing calls this directly

Calls 4

getLockFilePathFunction · 0.85
getWorkflowInputsFunction · 0.85
RunMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected