Summary
Add unit and integration tests for the GitLab trigger source implementations, covering API response parsing, task mapping, error handling, pagination, and configuration resolution.
Context
The existing GitHub implementation has unit tests for JSON parsing (parse_gh_issues, parse_gh_pull_requests) that verify the response-to-Task mapping. The GitLab implementation needs equivalent coverage plus tests for the config resolution (following the pattern from linear.rs).
Acceptance Criteria
Unit Tests (in crates/orchestrator/src/scheduler/gitlab.rs)
Integration Tests
Key Files
crates/orchestrator/src/scheduler/gitlab.rs - unit tests module
crates/cli/src/commands/apply.rs - SourceTemplate parsing tests
Blocked By
- The GitlabIssueSource implementation issue
- The GitlabMergeRequestSource implementation issue
Stack Base
Branch off: feature/autonomous-pipeline
Blocked by: #1181, #1182
Summary
Add unit and integration tests for the GitLab trigger source implementations, covering API response parsing, task mapping, error handling, pagination, and configuration resolution.
Context
The existing GitHub implementation has unit tests for JSON parsing (
parse_gh_issues,parse_gh_pull_requests) that verify the response-to-Task mapping. The GitLab implementation needs equivalent coverage plus tests for the config resolution (following the pattern fromlinear.rs).Acceptance Criteria
Unit Tests (in
crates/orchestrator/src/scheduler/gitlab.rs)parse_gitlab_issues()helper:parse_gitlab_merge_requests()helper:draft: true)source_branch,target_branch,merge_status,draftGitlabConfig::resolve():AGENTD_GITLAB_URLoverrides defaultis_configured()returns correct booleanTriggerConfigdeserialization:gitlab_issuesYAML parses correctly with defaultsgitlab_merge_requestsYAML parses correctly"opened"when omittedassigneeandassigneesfields are optionalIntegration Tests
TriggerConfiground-trip: serialize to JSON, deserialize back, verify fieldstrigger_type()returns correct stringsSourceTemplateparsing from YAML (inapply.rstest module)Key Files
crates/orchestrator/src/scheduler/gitlab.rs- unit tests modulecrates/cli/src/commands/apply.rs- SourceTemplate parsing testsBlocked By
Stack Base
Branch off:
feature/autonomous-pipelineBlocked by: #1181, #1182