mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-21 18:10:30 -04:00
* Add ability to parse backend blocks present in a test file's run blocks, validate configuration (#36541)
* Add ability to parse backend blocks from a run block
* Add validation to avoid multiple backend blocks across run blocks that use the same internal state file. Update tests.
* Add validation to avoid multiple backend blocks within a single run block. Update tests.
* Remove use of quotes in diagnostic messages
* Add validation to avoid backend blocks being used in plan run blocks. Update tests.
* Correct local backend blocks in new test fixtures
* Add test to show that different test files can use same backend block for same state key.
* Add validation to enforce state-storage backend types are used
* Remove TODO comment
We only need to consider one file at a time when checking if a state_key already has a backend associated with it; parallelism in `terraform test` is scoped down to individual files.
* Add validation to assert that the backend block must be in the first apply command for an internal state
* Consolidate backend block validation inside a single if statement
* Add initial version of validation that ensures a backend isn't re-used within a file
* Explicitly set the state_key at the point of parsing the config
TODO: What should be done with method (moduletest.Run).GetStateKey?
* Update test fixture now that reusing backend configs has been made invalid
* Add automated test showing validation of reused configuration blocks
* Skip test due to flakiness, minor change to test config naming
* Update test so it tolerates non-deterministic order run blocks are evaluated in
* Remove unnecessary value assignment to r.StateKey
* Replace use of GetStateKey() with accessing the state key that's now set during test config parsing
* Fix bug so that run blocks using child modules get the correct state key set at parsing time
* Update acceptance test to also cover scenario where root and child module state keys are in use
* Update test name
* Add newline to regex
* Ensure consistent place where repeat backend error is raised from
* Write leftover test state(s) to file (#36614)
* Add additional validation that the backend used in a run is a supported type (#36648)
* Prevent test run when leftover state data is present (#36685)
* `test`: Set the initial state for a state files from a backend, allow the run that defines a backend to write state to the backend (#36646)
* Allow use of backend block to set initial state for a state key
* Note about alternative place to keep 'backend factories'
* Allow the run block defining the backend to write state to it
* Fix rebase
* Change to accessing backend init functions via ContextOpts
* Add tests demonstrating how runs containing backend blocks use and update persisted state
* Fix test fixture
* Address test failure due to trouble opening the state file
This problem doesn't happen on MacOS, so I assume is due to the Linux environment of GitHub runners.
* Fix issue with paths properly
I hope
* Fix defect in test assertion
* Pivot back to approach introduced in
|
||
|---|---|---|
| .. | ||
| backend_block_in_plan_run.tftest.hcl | ||
| backend_block_in_second_apply_run.tftest.hcl | ||
| duplicate_backend_blocks_in_run.tftest.hcl | ||
| duplicate_backend_blocks_in_test.tftest.hcl | ||
| duplicate_data_overrides.tftest.hcl | ||
| duplicate_file_config.tftest.hcl | ||
| duplicate_mixed_providers.tftest.hcl | ||
| duplicate_mock_data_sources.tftest.hcl | ||
| duplicate_mock_providers.tftest.hcl | ||
| duplicate_mock_resources.tftest.hcl | ||
| duplicate_module_overrides.tftest.hcl | ||
| duplicate_providers.tftest.hcl | ||
| duplicate_resource_overrides.tftest.hcl | ||
| invalid_data_override.tftest.hcl | ||
| invalid_data_override_target.tftest.hcl | ||
| invalid_mock_data_sources.tftest.hcl | ||
| invalid_mock_resources.tftest.hcl | ||
| invalid_module_override.tftest.hcl | ||
| invalid_module_override_target.tftest.hcl | ||
| invalid_resource_override.tftest.hcl | ||
| invalid_resource_override_target.tftest.hcl | ||
| non_state_storage_backend_in_test.tftest.hcl | ||
| skip_cleanup_after_backend.tftest.hcl | ||