Skip to content

Conversation

@musa-cf
Copy link
Contributor

@musa-cf musa-cf commented Nov 26, 2025

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#

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Acceptance test run results

  • I have added or updated acceptance tests for my changes
  • I have run acceptance tests for my changes and included the results below

Steps to run acceptance tests

Test output

Additional context & links

stainless-app bot and others added 13 commits November 26, 2025 18:31
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>
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.

4 participants