(t *testing.T)
| 160 | } |
| 161 | |
| 162 | func 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" |
| 176 | on: |
| 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 |
| 187 | permissions: |
| 188 | contents: read |
| 189 | jobs: |
| 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" |
| 206 | on: |
| 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 |
| 218 | permissions: |
| 219 | contents: read |
nothing calls this directly
no test coverage detected