-
Notifications
You must be signed in to change notification settings - Fork 768
cloudflare_healthcheck migration tests
#6496
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
Draft
musa-cf
wants to merge
13
commits into
next
Choose a base branch
from
feat/healthcheck-migration-tests
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updates `cloudflare_zone` migration tests to use `tf-migrate` instead of `cmd/migrate`.
…ess config (prod) * feat: BOTS-7562 add bot management feedback endpoints to stainless config (prod)
* chore: point Terraform to Go 'next'
* fix(zone): make datasource's zone ID computed optional Resolves #6129 * test(zone): fix datasource model/schema parity Updates the `ZonesAccountDataSourceModel` type be useful for both filters and decerilization.
* adding a simple CRUD test fo account tokens * add a test file
* test: Add acceptance tests for cloudflare_api_shield_operation * chore: Add CI acceptance tests for api_shield_operation
Adds comprehensive provider integration tests for the cloudflare_healthcheck v4 to v5 migration. These tests validate the migration with the actual Terraform provider. **Test Coverage:** 1. **TestMigrateHealthcheck_V4ToV5_BasicHTTP** - Minimal HTTP healthcheck with only required fields - Validates http_config creation for basic case 2. **TestMigrateHealthcheck_V4ToV5_FullHTTP** - Complete HTTP healthcheck with all optional fields - Validates all HTTP fields move into http_config - Tests header Set → Map transformation - Verifies numeric type conversions (Int → Float64) 3. **TestMigrateHealthcheck_V4ToV5_HTTPS** - HTTPS healthcheck with SSL options - Confirms HTTPS uses http_config (same as HTTP) 4. **TestMigrateHealthcheck_V4ToV5_BasicTCP** - TCP healthcheck with connection_established method - Validates tcp_config creation - Tests TCP-specific field migrations 5. **TestMigrateHealthcheck_V4ToV5_MultipleHeaders** - Focused test for header transformation - Multiple headers with multiple values - Validates Set → Map structure conversion **Test Pattern:** - Uses MigrationV2TestStep (new migration system) - Tests with v4.52.1 provider - Validates state transformations using statecheck - Verifies correct field placement (root vs nested) **Requirements:** - CLOUDFLARE_ZONE_ID environment variable - Built tf-migrate binary at TF_MIGRATE_BINARY_PATH - TF_ACC=1 for acceptance tests **Related PR:** terraform-devstack/tf-migrate#<number> Co-Authored-By: Claude <noreply@anthropic.com>
b026b4d to
262c3dd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds comprehensive provider integration tests for the cloudflare_healthcheck v4 to v5 migration. These tests validate the migration with the actual Terraform provider.
Test Coverage:
TestMigrateHealthcheck_V4ToV5_BasicHTTP
TestMigrateHealthcheck_V4ToV5_FullHTTP
TestMigrateHealthcheck_V4ToV5_HTTPS
TestMigrateHealthcheck_V4ToV5_BasicTCP
TestMigrateHealthcheck_V4ToV5_MultipleHeaders
Test Pattern:
Requirements:
Related PR: terraform-devstack/tf-migrate#
Changes being requested
Acceptance test run results
Steps to run acceptance tests
Test output
Additional context & links