Skip to content
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

test: Fix deprecated --dry-run parameter #95540

Merged
merged 1 commit into from Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion staging/src/k8s.io/kubectl/pkg/cmd/apply/apply_test.go
Expand Up @@ -314,7 +314,7 @@ func TestRunApplyPrintsValidObjectList(t *testing.T) {
cmd := NewCmdApply("kubectl", tf, ioStreams)
cmd.Flags().Set("filename", filenameCM)
cmd.Flags().Set("output", "json")
cmd.Flags().Set("dry-run", "true")
cmd.Flags().Set("dry-run", "client")
cmd.Run(cmd, []string{})

// ensure that returned list can be unmarshaled back into a configmap list
Expand Down
Expand Up @@ -151,7 +151,7 @@ func TestCreateClusterRole(t *testing.T) {
for name, test := range tests {
ioStreams, _, buf, _ := genericclioptions.NewTestIOStreams()
cmd := NewCmdCreateClusterRole(tf, ioStreams)
cmd.Flags().Set("dry-run", "true")
cmd.Flags().Set("dry-run", "client")
cmd.Flags().Set("output", "yaml")
cmd.Flags().Set("verb", test.verbs)
cmd.Flags().Set("resource", test.resources)
Expand Down
Expand Up @@ -55,7 +55,7 @@ func TestCreatePdb(t *testing.T) {
cmd := NewCmdCreatePodDisruptionBudget(tf, ioStreams)
cmd.Flags().Set("min-available", "1")
cmd.Flags().Set("selector", "app=rails")
cmd.Flags().Set("dry-run", "true")
cmd.Flags().Set("dry-run", "client")
cmd.Flags().Set("output", outputFormat)

printFlags := genericclioptions.NewPrintFlags("created").WithTypeSetter(scheme.Scheme)
Expand Down
Expand Up @@ -56,7 +56,7 @@ func TestCreatePriorityClass(t *testing.T) {
cmd.Flags().Set("value", "1000")
cmd.Flags().Set("global-default", "true")
cmd.Flags().Set("description", "my priority")
cmd.Flags().Set("dry-run", "true")
cmd.Flags().Set("dry-run", "client")
cmd.Flags().Set("output", outputFormat)
cmd.Flags().Set("preemption-policy", "Never")

Expand Down
Expand Up @@ -134,7 +134,7 @@ func TestCreateRole(t *testing.T) {
t.Run(name, func(t *testing.T) {
ioStreams, _, buf, _ := genericclioptions.NewTestIOStreams()
cmd := NewCmdCreateRole(tf, ioStreams)
cmd.Flags().Set("dry-run", "true")
cmd.Flags().Set("dry-run", "client")
cmd.Flags().Set("output", "yaml")
cmd.Flags().Set("verb", test.verbs)
cmd.Flags().Set("resource", test.resources)
Expand Down