Merge pull request #63561 from juanvallejo/jvallejo/make-opinionated-print-flags-constructor

Automatic merge from submit-queue (batch tested with PRs 63669, 63511, 63561, 63289). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove legacyscheme dep from printFlags

**Release note**:
```release-note
NONE
```

Breaks PrintFlags dependency on legacyscheme
Prerequisite to https://github.com/kubernetes/kubernetes/pull/63402

cc @deads2k @soltysh
This commit is contained in:
Kubernetes Submit Queue
2018-05-10 14:25:16 -07:00
committed by GitHub
53 changed files with 135 additions and 103 deletions

View File

@@ -72,8 +72,8 @@ func TestResourcesLocal(t *testing.T) {
opts := SetResourcesOptions{
PrintFlags: &printers.PrintFlags{
JSONYamlPrintFlags: printers.NewJSONYamlPrintFlags(),
NamePrintFlags: printers.NewNamePrintFlags(""),
JSONYamlPrintFlags: printers.NewJSONYamlPrintFlags(legacyscheme.Scheme),
NamePrintFlags: printers.NewNamePrintFlags("", legacyscheme.Scheme),
OutputFormat: &outputFormat,
},
@@ -127,8 +127,8 @@ func TestSetMultiResourcesLimitsLocal(t *testing.T) {
opts := SetResourcesOptions{
PrintFlags: &printers.PrintFlags{
JSONYamlPrintFlags: printers.NewJSONYamlPrintFlags(),
NamePrintFlags: printers.NewNamePrintFlags(""),
JSONYamlPrintFlags: printers.NewJSONYamlPrintFlags(legacyscheme.Scheme),
NamePrintFlags: printers.NewNamePrintFlags("", legacyscheme.Scheme),
OutputFormat: &outputFormat,
},
@@ -508,8 +508,8 @@ func TestSetResourcesRemote(t *testing.T) {
cmd.Flags().Set("output", outputFormat)
opts := SetResourcesOptions{
PrintFlags: &printers.PrintFlags{
JSONYamlPrintFlags: printers.NewJSONYamlPrintFlags(),
NamePrintFlags: printers.NewNamePrintFlags(""),
JSONYamlPrintFlags: printers.NewJSONYamlPrintFlags(legacyscheme.Scheme),
NamePrintFlags: printers.NewNamePrintFlags("", legacyscheme.Scheme),
OutputFormat: &outputFormat,
},