pulumi/tests/integration
Justin Van Patten 6c7a330051
Fix passphrase secrets provider prompting (#8986)
In #2736, caching was introduced inside the passphrase secrets provider to avoid prompting the user for a password multiple times in the same `pulumi` command. However, the cache is not used in all cases, which leads to double prompting and/or erroring if the passphrase is not set in the `PULUMI_CONFIG_PASSPHRASE` envvar. In some cases, the user is prompted for their passphrase and then the command fails because the passphrase wasn't set via the envvar.

This change addresses these issues. The net effect is that when using the passphrase secrets provider, you'll be prompted for your passphrase up-front once (if interactive and the envvar isn't set), and subsequent uses will use the cached value and won't prompt or error if the envvar isn't set.

Implementation note: This moves the prompting code inside the `passphrase` package. I was originally trying to avoid this, to avoid the package depending on `cmdutil.ReadConsoleNoEcho` and `cmdutil.Interactive`, but this lead to unnatural contortions elsewhere. It ended up being much cleaner to have the prompting happen inside the passphrase implementation. Functions that may prompt (when interactive and the envvar isn't set) include "Prompt" in their name.
2022-02-16 13:39:08 -08:00
..
about Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
aliases Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
cloud_secrets_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
component_provider_schema Replace the use of pipenv with Python's venv (#8548) 2021-12-07 07:59:07 -08:00
config_basic Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
config_capture_e2e/nodejs Changing build.proj to run all languages and tests on windows 2020-01-27 21:16:37 +02:00
config_secrets_warn Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_error_apply Fix a hang in nodejs remote components when an error is thrown within an apply (#7365) 2021-06-25 18:41:54 -07:00
construct_component_methods Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_methods_errors Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_methods_resources Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_methods_unknown Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_output_values Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_plain Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_provider Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
construct_component_slow [deps] Ensuring pulumi/pulumi pkg references pulumi sdk v3.0.0-beta.1 2021-04-14 19:32:18 +01:00
construct_component_unknown Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
custom_timeouts [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
delete_before_create [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
dependency_steps [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
double_pending_delete [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
duplicate_urns [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
dynamic Lower the BrokenDynamicProvider regression test from integration to mock (#7951) 2021-09-10 17:25:48 -04:00
ee_perf Use prefered `new pulumi.Config()` form 2019-01-31 16:11:57 -08:00
empty Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
enums Updating requirements.txt to use 3.x series of pulumi (#8337) 2021-11-02 15:25:26 -07:00
exclude_protected Implement the --exclude-protected feature (#8359) 2021-11-15 11:45:14 -08:00
explicit_provider Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
gather_plugin [sdk/dotnet] add plugin download url (#8739) 2022-01-13 16:10:17 -08:00
get_created Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
get_resource Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
invalid_package_json Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
large_resource Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
nodejs [sdk/nodejs] Support top-level default exports in ESM (#8766) 2022-01-22 18:33:28 -08:00
partial_state [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
partial_values Propagate inputs to outputs during preview. (#3327) 2019-11-11 12:09:34 -08:00
policy Use ESlint instead of TSlint (#7719) 2021-08-10 11:31:59 -07:00
printf Fix duplicate go module name (#8688) 2022-01-05 13:33:28 -08:00
project_main Remove existing lock files 2018-11-12 15:33:58 -08:00
project_main_abs Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
project_main_parent/foo Enable absolute and relative parent paths for pulumi main (#6734) 2021-04-08 21:39:52 -07:00
protect_resources [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
provider_secret_config Enable full strict mode. (#3218) 2019-09-11 16:21:35 -07:00
python Make virtualenv paths relative to root when main points elsewhere (#6966) 2021-05-14 13:41:55 -04:00
python_await [sdk/python] - Await all async tasks (#6606) 2021-03-30 10:56:17 -07:00
query [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
read [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
recreate_resource_check [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
rotate_passphrase Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
secret_outputs [sdk/python] Fix secret regression (#5496) 2020-10-01 14:57:51 -07:00
single_resource Suppress JSON outputs in preview correctly (#2771) 2019-05-25 12:10:38 +02:00
stack_bad_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_component Enable creation of TStack using IServiceProvider (#5723) 2020-11-30 16:43:18 +01:00
stack_dependencies Remove existing lock files 2018-11-12 15:33:58 -08:00
stack_outputs Bump to .NET Core 3.1 (#4400) 2020-04-15 16:31:18 +02:00
stack_parenting Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_project_name Consistent dependencies (#2517) 2019-03-05 20:34:51 -08:00
stack_reference Add `make tidy` command to apply `go mod tidy` on every go.mod (#8635) 2021-12-23 17:37:39 -05:00
stack_reference_multi/python Regression tests for StackReference in the Python SDK (#3913) 2020-02-17 10:40:46 -08:00
stack_reference_secrets Bump to .NET Core 3.1 (#4400) 2020-04-15 16:31:18 +02:00
steps [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
targets Skip flaky tests for now (#8420) 2021-11-15 15:17:20 -05:00
transformations [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
tsconfig Add tsconfig option to specify tsconfig path (#8452) 2021-11-22 11:42:39 -08:00
types [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
appdash_test.go Add trace proxying to fix sub-process trace collection into files (#7248) 2021-06-10 22:57:18 -04:00
integration_dotnet_test.go Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00
integration_go_test.go [sdk/go] Add PluginDownloadURL resource option (#8555) 2022-01-05 12:04:39 -08:00
integration_nodejs_test.go Fix passphrase secrets provider prompting (#8986) 2022-02-16 13:39:08 -08:00
integration_python_test.go Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00
integration_test.go Fix passphrase secrets provider prompting (#8986) 2022-02-16 13:39:08 -08:00