mirror of https://github.com/pulumi/pulumi.git
53e927dc08
11952: cmd/stack output: Inject requireStack and test output r=abhinav a=abhinav `pulumi stack output`'s core behavior stems from acquiring the current stack and inspecting its outputs. To test this logic sufficiently, we need to be able to inject an alternative stack value. This change adds a `requireStack` field to stackOutputCmd. This, if set, specifies an alternative to the requireStack function that we use to acquire the current stack. As a demonstration of what this unlocks, this change also includes tests for the core functionality of `pulumi stack outputs`: print plain and secret outputs together or separately with and without --json with and without --show-secrets Note that to test the output of the command, we have to temporarily replace `os.Stdout`. This is indicative of debt -- there are too many functions that print to stdout directly intsead of an io.Writer. That should be reduced in future changes. Change made in preparation for #2632 Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> |
||
---|---|---|
.. | ||
authhelpers | ||
backend | ||
cmd/pulumi | ||
codegen | ||
engine | ||
graph | ||
operations | ||
resource | ||
secrets | ||
testing/integration | ||
util | ||
version | ||
README.md | ||
go.mod | ||
go.sum |
README.md
pulumi/pkg
While pulumi/sdk maintains strict backwards compatibility guarantees, code under pkg/ is handled more informally: while breaking changes are still discouraged they may happen when they make sense.