New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[policy/new] make pulumi policy new <template-name>
runnable in non-interactive mode
#13902
[policy/new] make pulumi policy new <template-name>
runnable in non-interactive mode
#13902
Conversation
Changelog[uncommitted] (2023-09-09)Bug Fixes
|
Fixes #13901 `pulumi policy new <template-name>` would fail requiring a `--yes` argument that did not exist when being run non-interactively. This changes `pulumi policy new <template-name>` to not require `--yes` when a template-name is provided.
21cd301
to
7cd3fda
Compare
pulumi policy new <template-name>
runnable in non-interactive modepulumi policy new <template-name>
runnable in non-interactive mode
tests/remote_test.go
Outdated
@@ -154,3 +154,10 @@ func TestRemoteLifecycle(t *testing.T) { | |||
|
|||
e.RunCommand("pulumi", "stack", "rm", "--stack", fullyQualifiedStack, "--yes") | |||
} | |||
|
|||
func TestPolicyNewNonInteractive(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Seems a little odd to put this test in this file. Why not a new tests/policy_new_test.go
or tests/policy_test.go
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I didn't notice this was with the remote tests, that's a good point. Make a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and pushed a commit that moves it to a new file.
Description
Fixes #13901
pulumi policy new <template-name>
would fail requiring a--yes
argument that did not exist when being run non-interactively.This changes
pulumi policy new <template-name>
to not require--yes
when a template-name is provided.Checklist
make tidy
to update any new dependenciesmake lint
to verify my code passes the lint checkgofumpt
make changelog
and committed thechangelog/pending/<file>
documenting my change