pulumi/tests
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
..
examples Use `provider.MainWithOptions` to reduce boilerplate in integration tests (#7684) 2021-07-30 06:31:17 -07:00
integration Fix passphrase secrets provider prompting (#8986) 2022-02-16 13:39:08 -08:00
testprovider Replace the use of pipenv with Python's venv (#8548) 2021-12-07 07:59:07 -08:00
README.md Update tests and add integration test 2021-08-24 14:29:27 -07:00
about_test.go Whitespace and grammer 2021-08-30 18:56:02 -07:00
config_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
go.mod Update pkg -> sdk dependency (#8934) 2022-02-04 20:07:35 +01:00
go.sum reverted 8ffac5c (#8858) (#8888) (#8911) 2022-02-02 14:59:01 -08:00
history_test.go [cli] Removing the deprecated pulumi history command (#6724) 2021-04-14 19:32:18 +01:00
login_test.go fixup linting errors after rebase of master -> feature-3.0 (#6766) 2021-04-14 19:32:18 +01:00
main_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
stack_test.go [backend/filestate] Allow preview on locked stack (#8642) 2021-12-29 08:28:15 -08:00

README.md

Integration Tests

This module provides integration tests for the Pulumi CLI.

The tests can be run via:

make test_all