Merge pull request #95540 from masap/fix_dry_run_param

test: Fix deprecated --dry-run parameter

Kubernetes-commit: 7b11de20a9f6149236a22b4d42203ebc1191bac5
This commit is contained in:
Kubernetes Publisher 2020-10-18 17:10:13 -07:00
commit 535038a36d
8 changed files with 9 additions and 9 deletions

2
Godeps/Godeps.json generated
View File

@ -796,7 +796,7 @@
},
{
"ImportPath": "k8s.io/metrics",
"Rev": "029a41d5e49d"
"Rev": "f36b9d74ccd1"
},
{
"ImportPath": "k8s.io/utils",

4
go.mod
View File

@ -41,7 +41,7 @@ require (
k8s.io/component-base v0.0.0-20201004000625-609bde980a40
k8s.io/klog/v2 v2.2.0
k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488
k8s.io/metrics v0.0.0-20201004001828-029a41d5e49d
k8s.io/metrics v0.0.0-20201020111038-f36b9d74ccd1
k8s.io/utils v0.0.0-20200729134348-d5654de09c73
sigs.k8s.io/kustomize v2.0.3+incompatible
sigs.k8s.io/yaml v1.2.0
@ -54,5 +54,5 @@ replace (
k8s.io/client-go => k8s.io/client-go v0.0.0-20201020102008-67b0d2026ae5
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20201003235514-f6667ec3dafb
k8s.io/component-base => k8s.io/component-base v0.0.0-20201004000625-609bde980a40
k8s.io/metrics => k8s.io/metrics v0.0.0-20201004001828-029a41d5e49d
k8s.io/metrics => k8s.io/metrics v0.0.0-20201020111038-f36b9d74ccd1
)

2
go.sum
View File

@ -516,7 +516,7 @@ k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488 h1:mNpvQf4lkIHNOXCoM+Veu/UXwA56Yx1J7hY1Tvcs/oM=
k8s.io/kube-openapi v0.0.0-20200923155610-8b5066479488/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
k8s.io/metrics v0.0.0-20201004001828-029a41d5e49d/go.mod h1:mIKmmr5uc4QJeHCCnB4RiKo0uOZEhAam+I/TYTn0nYI=
k8s.io/metrics v0.0.0-20201020111038-f36b9d74ccd1/go.mod h1:YHwAPKQYVT/d+uH14TpHn46qCjR1irjHrdAqfZl9Swk=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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")

View File

@ -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)