terraform/internal/cloud/testdata
Nick Fagerlund 7f6b827987 Modify tfe client mocks to meet some new requirements
- Add plausible unredacted plan json for `plan-json-{basic,full}` testdata --
  Created by just running the relevant terraform commands locally.

- Add plan-json-no-changes testdata --
  The unredacted json was organically grown, but I edited the log and redacted
  json by hand to match what I observed from a real but unrelated
  planned-and-finished run in TFC.

- Add plan-json-basic-no-unredacted testdata --
  This mimics a lack of admin permissions, resulting in a 404.

- Hook up `MockPlans.ReadJSONOutput` to test fixtures, when present.
  This method has been implemented for ages, and has had a backing store for
  unredacted plan json, but has been effectively a no-op since nothing ever
  fills that backing store. So, when creating a mock plan, make an attempt to
  read unredacted json and stow it in the mocks on success.

- Make it possible to get the entire MockClient for a test backend
  In order to test some things, I'm going to need to mess with the internal
  state of runs and plans beyond what the go-tfe client API allows. I could add
  magic special-casing to the mock API methods, or I could locate the
  shenanigans next to the test that actually exploits it. The latter seems more
  comprehensible, but I need access to the full mock client struct in order to
  mess with its interior.

- Fill in some missing expectations around HasChanges when retrieving a run +
  plan.
2023-07-24 14:12:44 -04:00
..
apply Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-destroy Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-json Initial implementation of structured logging in cloud backend (#32504) 2023-02-09 13:35:48 +01:00
apply-json-with-error Initial implementation of structured logging in cloud backend (#32504) 2023-02-09 13:35:48 +01:00
apply-json-with-outputs Initial implementation of structured logging in cloud backend (#32504) 2023-02-09 13:35:48 +01:00
apply-json-with-provisioner Handle provisioner log types in renderer 2023-02-16 10:54:58 -05:00
apply-json-with-provisioner-error Handle provisioner log types in renderer 2023-02-16 10:54:58 -05:00
apply-no-changes Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-policy-hard-failed Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-policy-passed Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-policy-soft-failed Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-variables Add missing log mocks 2021-10-28 19:29:10 -05:00
apply-with-error Add missing log mocks 2021-10-28 19:29:10 -05:00
empty Initial commit of 'cloud' package 2021-10-28 19:29:09 -05:00
plan Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-bookmark Add error handling and tests for saved plan bookmark load/save (#33268) 2023-07-24 14:07:16 -04:00
plan-cost-estimation Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-import-config-gen tests for cloud backend config generation 2023-05-29 22:34:30 -07:00
plan-import-config-gen-exists tests for cloud backend config generation 2023-05-29 22:34:30 -07:00
plan-import-config-gen-validation-error tests for cloud backend config generation 2023-05-29 22:34:30 -07:00
plan-json-basic Modify tfe client mocks to meet some new requirements 2023-07-24 14:12:44 -04:00
plan-json-basic-no-unredacted Modify tfe client mocks to meet some new requirements 2023-07-24 14:12:44 -04:00
plan-json-error Initial implementation of structured logging in cloud backend (#32504) 2023-02-09 13:35:48 +01:00
plan-json-full Modify tfe client mocks to meet some new requirements 2023-07-24 14:12:44 -04:00
plan-json-no-changes Modify tfe client mocks to meet some new requirements 2023-07-24 14:12:44 -04:00
plan-long-line Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-no-changes Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-policy-hard-failed Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-policy-passed Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-policy-soft-failed Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-variables Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-with-error Add missing log mocks 2021-10-28 19:29:10 -05:00
plan-with-working-directory/terraform Add missing log mocks 2021-10-28 19:29:10 -05:00
refresh Run apply -refresh-state instead of refresh 2021-10-28 19:29:12 -05:00
variables fix: local variables should not be overridden by remote variables during terraform import (#29972) 2022-03-15 14:42:11 -07:00
.gitignore cloud: Don't ignore .log golden files 2021-10-28 19:29:10 -05:00