collapse printing paths

This commit is contained in:
David Eads
2018-02-20 20:14:21 -05:00
parent 799a0bf410
commit be04e7c1b1
95 changed files with 594 additions and 1055 deletions

View File

@@ -31,7 +31,6 @@ func TestCreateNamespace(t *testing.T) {
namespaceObject := &v1.Namespace{}
namespaceObject.Name = "my-namespace"
f, tf, codec, ns := cmdtesting.NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Client = &fake.RESTClient{
GroupVersion: schema.GroupVersion{Version: "v1"},
NegotiatedSerializer: ns,
@@ -49,7 +48,7 @@ func TestCreateNamespace(t *testing.T) {
cmd := NewCmdCreateNamespace(f, buf)
cmd.Flags().Set("output", "name")
cmd.Run(cmd, []string{namespaceObject.Name})
expectedOutput := "namespaces/" + namespaceObject.Name + "\n"
expectedOutput := "namespace/" + namespaceObject.Name + "\n"
if buf.String() != expectedOutput {
t.Errorf("expected output: %s, but got: %s", expectedOutput, buf.String())
}