Skip to content

Add unit tests for workflow creation and execution#3

Draft
vikstrous wants to merge 3 commits into
masterfrom
add-workflow-tests
Draft

Add unit tests for workflow creation and execution#3
vikstrous wants to merge 3 commits into
masterfrom
add-workflow-tests

Conversation

@vikstrous
Copy link
Copy Markdown
Owner

This PR adds unit tests for creating and executing temporal workflows with tempts. The tests cover:

  1. Basic workflow creation and execution with an activity
  2. Parent-child workflow interaction

These tests increase the test coverage of the repository and provide examples of how to use the package for creating workflows and activities. They follow the patterns established in the example directory but are placed in the root package for better visibility and to ensure core functionality is tested.

sean-george-anchor added a commit to sean-george-anchor/tempts that referenced this pull request Feb 19, 2026
Remediate all HIGH/MEDIUM/LOW findings from the security audit:

- Add sync.Mutex to Queue for concurrent map access safety (vikstrous#1)
- Remove hardcoded 10s activity timeout from WithImplementation (vikstrous#2)
- Remove debug fmt.Println leaking workflow IDs (vikstrous#3)
- Add validateName to all constructors, panic on empty names (vikstrous#4)
- Add nil client check in NewFromSDK (vikstrous#5)
- Fix %s to %w for proper error wrapping in replaytest (vikstrous#6)
- Fix "activtity" typo and wrong noun in error messages (vikstrous#7)
- Fix goroutine leak in Worker.Run with done channel pattern (vikstrous#8)
- Change mock stubs from panic to error return (vikstrous#19)

Add 39 tests across 8 files bringing root package from 0% to 49%
coverage. Remaining uncovered code requires a live Temporal server.
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