Skip to content

Conversation

carlydf
Copy link
Collaborator

@carlydf carlydf commented Jun 27, 2025

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

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@carlydf carlydf requested a review from jlegrone as a code owner June 27, 2025 21:34
@carlydf carlydf marked this pull request as draft June 27, 2025 21:34
@carlydf carlydf force-pushed the integration-test branch from 58f61f6 to e6eb04b Compare July 4, 2025 05:23
@carlydf carlydf marked this pull request as ready for review July 4, 2025 05:32
@jlegrone jlegrone requested a review from Copilot July 14, 2025 19:52
Copilot

This comment was marked as outdated.

@carlydf carlydf requested a review from a team as a code owner July 15, 2025 18:46
@carlydf carlydf force-pushed the integration-test branch from 3a9f91c to aec3ac6 Compare July 24, 2025 21:03
@jlegrone jlegrone requested a review from Copilot July 28, 2025 15:25
Copy link
Contributor

@Copilot Copilot AI left a 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

@carlydf carlydf merged commit 1c5f057 into temporalio:main Jul 28, 2025
11 checks passed
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