terraform/internal/command
Martin Atkins 01b22f4b76 command/e2etest: TestProviderTampering
We have various mechanisms that aim to ensure that the installed provider
plugins are consistent with the lock file and that the lock file is
consistent with the provider requirements, and we do have existing unit
tests for them, but all of those cases mock our fake out at least part of
the process and in the past that's caused us to miss usability
regressions, where we still catch the error but do so at the wrong layer
and thus generate error message lacking useful additional context.

Here we'll add some new end-to-end tests to supplement the existing unit
tests, making sure things work as expected when we assemble the system
together as we would in a release. These tests cover a number of different
ways in which the plugin selections can grow inconsistent.

These new tests all run only when we're in a context where we're allowed
to access the network, because they exercise the real plugin installer
codepath. We could technically build this to use a local filesystem mirror
or other such override to avoid that, but the point here is to make sure
we see the expected behavior in the main case, and so it's worth the
small additional cost of downloading the null provider from the real
registry.
2021-10-05 10:59:59 -07:00
..
arguments commands: `terraform add` (#28874) 2021-06-17 12:08:37 -04:00
cliconfig cliconfig: Fix error message about invalid credentials helper type 2021-09-29 13:36:59 -07:00
clistate Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
e2etest command/e2etest: TestProviderTampering 2021-10-05 10:59:59 -07:00
format command/format: Include deletion reasons in plan report 2021-09-23 14:37:08 -07:00
jsonconfig allow json output to marshal ConfigModeAttr blocks 2021-09-03 13:53:52 -04:00
jsonplan core: Report ActionReasons when we plan to delete "orphans" 2021-09-23 14:37:08 -07:00
jsonprovider Revert "json-output: Release format version 1.0" 2021-09-09 11:25:35 -04:00
jsonstate Revert "json-output: Release format version 1.0" 2021-09-09 11:25:35 -04:00
testdata LoadModule now always returns the module 2021-09-28 17:58:40 -04:00
views json-output: Add change reasons to explain deletes 2021-09-24 13:17:49 -04:00
webbrowser Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
workdir workdir: Start of a new package for working directory state management 2021-09-10 14:56:49 -07:00
add.go Merge pull request #29235 from magodo/terraform_add_output_append 2021-09-17 11:19:55 -04:00
add_test.go Fix terraform add test failure due to bad merge 2021-09-17 14:46:44 -04:00
apply.go de-linting 2021-09-01 11:36:21 -04:00
apply_destroy_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
apply_test.go de-linting 2021-09-01 11:36:21 -04:00
autocomplete.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
autocomplete_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
cli_ui.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
cli_ui_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
command.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
command_test.go backend/local: Check dependency lock consistency before any operations 2021-10-01 14:43:58 -07:00
console.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
console_interactive.go Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
console_interactive_solaris.go Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
console_test.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
flag_kv.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
flag_kv_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
fmt.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
fmt_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
get.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
get_test.go fix temp directory handling in some tests 2021-09-13 13:45:04 -04:00
graph.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
graph_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
hook_module_install.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
import.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
import_test.go backend/local: Check dependency lock consistency before any operations 2021-10-01 14:43:58 -07:00
init.go LoadModule now always returns the module 2021-09-28 17:58:40 -04:00
init_test.go LoadModule now always returns the module 2021-09-28 17:58:40 -04:00
login.go de-linting 2021-09-01 11:36:21 -04:00
login_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
logout.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
logout_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
meta.go command: Early error message for missing cache entries of locked providers 2021-10-05 10:59:59 -07:00
meta_backend.go command: Early error message for missing cache entries of locked providers 2021-10-05 10:59:59 -07:00
meta_backend_migrate.go command: Suppress prompt for init -force-copy 2021-08-20 14:46:09 -04:00
meta_backend_test.go command: Auto-select single workspace if necessary 2021-09-22 16:03:11 -05:00
meta_config.go workdir: Start of a new package for working directory state management 2021-09-10 14:56:49 -07:00
meta_dependencies.go backend/local: Check dependency lock consistency before any operations 2021-10-01 14:43:58 -07:00
meta_new.go Move plans/ to internal/plans/ 2021-05-17 14:09:07 -07:00
meta_providers.go command: Early error message for missing cache entries of locked providers 2021-10-05 10:59:59 -07:00
meta_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
meta_vars.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
output.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
output_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
plan.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
plan_test.go backend/local: Check dependency lock consistency before any operations 2021-10-01 14:43:58 -07:00
plugins.go workdir: Start of a new package for working directory state management 2021-09-10 14:56:49 -07:00
plugins_lock.go core: Simplify and centralize plugin availability checks 2021-10-01 14:43:58 -07:00
plugins_lock_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
plugins_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
providers.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
providers_lock.go providers subcommand tests (#28744) 2021-05-19 12:56:16 -04:00
providers_lock_test.go providers subcommand tests (#28744) 2021-05-19 12:56:16 -04:00
providers_mirror.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
providers_mirror_test.go providers subcommand tests (#28744) 2021-05-19 12:56:16 -04:00
providers_schema.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
providers_schema_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
providers_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
push.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
refresh.go de-linting 2021-09-01 11:36:21 -04:00
refresh_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
show.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
show_test.go remove debugging println 2021-09-28 17:58:40 -04:00
state_command.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
state_list.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_list_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
state_meta.go de-linting 2021-09-01 11:36:21 -04:00
state_mv.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_mv_test.go de-linting 2021-09-01 11:36:21 -04:00
state_pull.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_pull_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
state_push.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_push_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_replace_provider.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_replace_provider_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_rm.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
state_rm_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_show.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
state_show_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
state_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
taint.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
taint_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
test.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
test_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
ui_input.go command: Ensure all answers were used in command.testInputResponseMap 2021-09-21 22:26:16 -05:00
ui_input_test.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
unlock.go Move terraform/ to internal/terraform/ 2021-05-17 14:09:07 -07:00
unlock_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
untaint.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
untaint_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
validate.go core: Functional-style API for terraform.Context 2021-08-30 13:59:14 -07:00
validate_test.go Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
version.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
version_test.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
workspace_command.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
workspace_command_test.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
workspace_delete.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
workspace_list.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
workspace_new.go Move states/ to internal/states/ 2021-05-17 14:09:07 -07:00
workspace_select.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00
workspace_show.go Move command/ to internal/command/ 2021-05-17 14:09:07 -07:00