Skip to content

Add comprehensive integration tests against shared Conductor cluster#137

Open
manan164 wants to merge 12 commits intomainfrom
sdk-integration-tests
Open

Add comprehensive integration tests against shared Conductor cluster#137
manan164 wants to merge 12 commits intomainfrom
sdk-integration-tests

Conversation

@manan164
Copy link
Copy Markdown
Collaborator

@manan164 manan164 commented Mar 24, 2026

Summary

  • Add integration tests covering all major SDK APIs against a shared Conductor cluster (v5)
  • Add ConductorFixture and TestPrefix helpers — reads cluster config from env vars, generates unique per-run resource names to avoid cross-run conflicts
  • Update CI pipeline with a dedicated v5 integration test job using secrets (CONDUCTOR_SERVER_URL, CONDUCTOR_AUTH_KEY, CONDUCTOR_AUTH_SECRET)
  • Add [Trait("Version", "V5Only")] for version-specific tests
  • Replace Docker-based unit test with direct dotnet test

Coverage

Area Tests
Workflow lifecycle start, pause, resume, terminate, restart, retry, delete, getStatus
Workflow bulk ops pause, resume, terminate, restart, retry
Workflow search by correlationId, by status, getRunning
Task poll single poll, batch poll, empty queue, getPollData
Task update complete, fail, in-progress, getTask
Workflow definitions register, update, getAll, delete
Task definitions register, update, getAll, delete
Scheduler save, get, list, pause, resume, delete
Secrets put, get, list, delete
Tags add/delete on workflows and tasks
Environment variables create, get, list, delete
Event handlers skipped — SDK Actions field is typed as System.Action (delegate), not serializable

Known gaps (follow-up)

  • EventResourceApi tests blocked by SDK bug: EventHandler.Actions is typed as List<System.Action> instead of a proper model class
  • No coverage for ApplicationResourceApi, AuthorizationResourceApi, GroupResourceApi, UserResourceApi, TokenResourceApi (require special cluster permissions)
  • No negative/error case tests (non-existent resource, invalid input)
  • Missing methods: ExecuteWorkflow, GetNextFewSchedules, PauseAllSchedules, UpdateWorkflowVariables, SecretExists, SetTaskTags/SetWorkflowTags

Test plan

  • integration_tests_v5 passes against sdkdev.orkesconductor.io
  • unit_tests passes
  • lint passes
  • Add CONDUCTOR_SERVER_URL_V4, CONDUCTOR_AUTH_KEY_V4, CONDUCTOR_AUTH_SECRET_V4 secrets once v4 cluster is provisioned to re-enable v4 job

manan164 added 10 commits March 24, 2026 15:18
- Add integration tests covering all major SDK APIs:
  workflows (lifecycle, search, bulk operations), tasks (poll, update),
  metadata (workflow/task definitions), scheduler, event handlers,
  environment variables, secrets, and tags
- Add ConductorFixture and TestPrefix helpers for cluster-based testing
- Update CI pipeline with dedicated v4 and v5 integration test jobs
- Update Dockerfile to run unit tests only
- Add V5Only trait for version-specific tests (e.g. TaskUpdateV2)
…t test

- Use constructor params for SaveScheduleRequest and EventHandler (bypass null validation)
- Set ResponseTimeoutSeconds=300 on TaskDef to match TimeoutSeconds
- Poll for workflow status after task update (timing fix)
- Add Value to TagString to fix server NPE on DeleteTaskTag
- Replace Docker-based unit test job with direct dotnet test
- Exclude Tests.Worker.* from unit test filter (pre-existing tests require live server)
- Fix Scheduler cron to 6-field format (0 0 * * * *)
- Fix TagString delete to pass matching value
- Skip EventHandler tests (SDK Actions field typed as System.Action, not serializable)
- Trim JSON quotes from env variable API response
- Add indexing delay to WorkflowSearch_ByStatus test
- Simplify MarkTaskInProgress to not assert task status (server timing)
- Create Action model in Conductor.Client.Models to fix EventHandler.Actions
  serialization (was incorrectly resolving to System.Action delegate)
- Remove Skip from all EventHandler tests
- Add SecretExists test and negative test for non-existent secret
- Add SetWorkflowTags and SetTaskTags tests (bulk tag replace)
- Add GetNextFewSchedules test
- Add UpdateWorkflowVariables test
- Add negative tests: GetExecutionStatus and GetTaskDef for non-existent resources
}
return _workflowClient.GetExecutionStatus(id).Status;
}
}
Copy link
Copy Markdown

@chrishagglund-ship-it chrishagglund-ship-it Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a cleanup down here and call it from the tests?

manan164 and others added 2 commits March 30, 2026 22:50
- Tag all legacy cloud-requiring tests with [Trait("Category", "CloudIntegration")]
  so the unit test filter properly excludes them
- Remove || true from unit test run — failures now surface correctly
- Restore coverage collection (--collect:"XPlat Code Coverage"), Cobertura
  artifact upload, and Codecov upload steps removed during Docker→dotnet migration
- Add Cleanup() to TaskUpdateV2Tests and call it after each test assertion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Missed this class in the previous pass — TestWorkflowExecution was
failing with connection refused against localhost:8080.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Conductor/Client/Models/Action.cs 0.00% 2 Missing ⚠️
Flag Coverage Δ
unittests 0.40% <0.00%> (-19.55%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Conductor/Client/Models/Action.cs 0.00% <0.00%> (ø)

... and 69 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants