terraform/internal/command/testdata/provider-schemas-state-store
Sarah French f88d09544e
PSS: Add tests showing provider commands being used with PSS (#37959)
* test: Add E2E test for using pluggable state storage with the `providers` command

Note: I've excluded the `terraform providers locks` and `terraform providers mirror` commands as they don't interact with backends.

* test: Add integration test for using pluggable state storage with the `providers` command

* refactor: Change ioutil.ReadDir to os.ReadDir

* test: Add integration test for using pluggable state storage with the `providers schema` command

* feat: Allow state store schema's to be included when schemas are marshalled into JSON output

* test: Assert that state stores are present in provider schemas returned from `providers schema`.

* test: Update existing tests to accommodate state stores being in provider schema output

* test: Update E2E test for `providers` commands to be better scoped to testing use of a state store to access and use state when generating output.

This complements TestProvidersSchema that tests that state stores in a provider are reflected in the JSON representations of the schemas that the command returns.

* chore: Replace `io/ioutil` with `io` in `providers schema` tests
2025-12-17 19:44:36 +00:00
..
.terraform PSS: Add tests showing provider commands being used with PSS (#37959) 2025-12-17 19:44:36 +00:00
.terraform.lock.hcl PSS: Add tests showing provider commands being used with PSS (#37959) 2025-12-17 19:44:36 +00:00
main.tf PSS: Add tests showing provider commands being used with PSS (#37959) 2025-12-17 19:44:36 +00:00
output.json PSS: Add tests showing provider commands being used with PSS (#37959) 2025-12-17 19:44:36 +00:00
README.md PSS: Add tests showing provider commands being used with PSS (#37959) 2025-12-17 19:44:36 +00:00

This test fixture is a working directory that contains a state_store block that matches the backend state file and dependency lock file. Any test using this fixture will need to set up a mock provider that describes a state store in its schema that matches this config.