Skip to content

Conversation

@tamas-jozsa
Copy link
Collaborator

Go-Based E2E Test Runner

Replaces bash-based e2e tests with a robust Go CLI tool for testing v4→v5
migrations.

Key Features

CLI Commands:

  • e2e run - Full e2e test suite with drift detection
  • e2e init - Initialize test resources from integration testdata
  • e2e migrate - Run migration with tf-migrate
  • e2e bootstrap - Migrate local state to R2 backend
  • e2e clean - Remove modules from remote state

Improvements:

  • ✅ Credential sanitization - Prevents API keys/secrets from leaking in logs
  • ✅ Drift detection with configurable exemptions (e2e/drift-exemptions.yaml)
  • ✅ Colored output with clear success/failure indicators
  • ✅ Resource filtering - Test specific resources: --resources custom_pages,load_balancer_monitor
  • ✅ 88 unit tests with comprehensive coverage

Project Structure

cmd/
├── tf-migrate/ # Main binary
└── e2e-runner/ # E2E test runner
internal/
└── e2e-runner/ # E2E implementation + tests
e2e/
├── drift-exemptions.yaml
└── tf/v4/ # Test fixtures
bin/ # Built binaries

Usage

# Run full e2e test suite
./scripts/run-e2e-tests --apply-exemptions

# Or use binary directly
make build-all
./bin/e2e-runner run --resources custom_pages

# Clean up state
./bin/e2e-runner clean --modules load_balancer_monitor

Testing

make test          # tf-migrate tests
make test-e2e      # e2e-runner tests (88 tests)
make build-all     # Build both binaries

@tamas-jozsa tamas-jozsa force-pushed the migrate-single-resource branch 7 times, most recently from 45a01cb to 1096b28 Compare December 25, 2025 18:08
@tamas-jozsa tamas-jozsa force-pushed the migrate-single-resource branch 7 times, most recently from c9f2606 to 110fb96 Compare December 25, 2025 19:00
@tamas-jozsa tamas-jozsa force-pushed the migrate-single-resource branch from 110fb96 to 2ecb171 Compare December 25, 2025 19:11
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.

1 participant