-
Notifications
You must be signed in to change notification settings - Fork 6
Integration test framework #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…own field 'spec.template.metadata.creationTimestamp' error
3a9f91c
to
aec3ac6
Compare
…t fix JSON unmarshall warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive integration test framework that validates the temporal worker controller's behavior end-to-end by testing against both Kubernetes and Temporal deployments. The framework includes helper utilities for creating test scenarios and setting up the test environment.
- Adds an integration test framework using Go's native testing package with real Temporal and Kubernetes environments
- Creates builder patterns for constructing test scenarios with temporal worker deployments and expected status
- Provides utilities for environment setup, worker simulation, and status verification
Reviewed Changes
Copilot reviewed 40 out of 42 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
internal/tests/internal/integration_test.go | Main integration test logic with test scenarios for rollout strategies |
internal/tests/internal/test_helpers.go | Helper functions for status verification and temporal deployment operations |
internal/tests/internal/workers.go | Worker simulation code that mimics real temporal workers for testing |
internal/tests/internal/env_helpers.go | Environment setup utilities for Kubernetes and controller initialization |
internal/testhelpers/test_builder.go | Builder pattern utilities for constructing test cases and expected statuses |
internal/testhelpers/make.go | Factory functions for creating test objects with proper configurations |
internal/tests/go.mod | Go module definition for the integration tests |
internal/tests/README.md | Comprehensive documentation for running and extending the integration tests |
Comments suppressed due to low confidence (2)
internal/tests/go.mod:3
- Go version 1.24.1 does not exist. The latest stable Go version is 1.21.x as of my knowledge cutoff. This appears to be a future version that doesn't exist yet.
go 1.24.1
internal/tests/go.mod:5
- Go toolchain version 1.24.3 does not exist. This appears to be a future version that doesn't exist yet.
toolchain go1.24.3
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
What was changed
Add integration tests
Add CI job running linters, unit tests, and integration tests
There is one TODO left in the test setup for creating a draining version. Not all possible pre-existing version statuses are tested right now, but this is ready for review while I concurrently add a few more test cases.
Why?
So that we don't break things
Checklist
Closes
How was this tested: