simplify kubectl testing factory

This commit is contained in:
David Eads
2018-02-22 09:52:10 -05:00
parent 82eeda0885
commit 6047ead2e5
50 changed files with 508 additions and 781 deletions

View File

@@ -466,7 +466,7 @@ func TestRunExposeService(t *testing.T) {
}
for _, test := range tests {
f, tf := cmdtesting.NewAPIFactory()
tf := cmdtesting.NewTestFactory()
codec := legacyscheme.Codecs.LegacyCodec(scheme.Versions...)
ns := legacyscheme.Codecs
@@ -488,7 +488,7 @@ func TestRunExposeService(t *testing.T) {
tf.Namespace = test.ns
buf := bytes.NewBuffer([]byte{})
cmd := NewCmdExposeService(f, buf)
cmd := NewCmdExposeService(tf, buf)
cmd.SetOutput(buf)
for flag, value := range test.flags {
cmd.Flags().Set(flag, value)