Print resource name when patch is done
This commit is contained in:
@@ -209,7 +209,7 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
if options.OutputFormat == "name" || len(options.OutputFormat) == 0 {
|
if options.OutputFormat == "name" || len(options.OutputFormat) == 0 {
|
||||||
cmdutil.PrintSuccess(mapper, options.OutputFormat == "name", out, "", name, false, dataChangedMsg)
|
cmdutil.PrintSuccess(mapper, options.OutputFormat == "name", out, info.Mapping.Resource, info.Name, false, dataChangedMsg)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ func TestPatchObject(t *testing.T) {
|
|||||||
cmd.Run(cmd, []string{"services/frontend"})
|
cmd.Run(cmd, []string{"services/frontend"})
|
||||||
|
|
||||||
// uses the name from the file, not the response
|
// uses the name from the file, not the response
|
||||||
if buf.String() != "frontend\n" {
|
if buf.String() != "service/frontend\n" {
|
||||||
t.Errorf("unexpected output: %s", buf.String())
|
t.Errorf("unexpected output: %s", buf.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ func TestPatchObjectFromFile(t *testing.T) {
|
|||||||
cmd.Run(cmd, []string{})
|
cmd.Run(cmd, []string{})
|
||||||
|
|
||||||
// uses the name from the file, not the response
|
// uses the name from the file, not the response
|
||||||
if buf.String() != "frontend\n" {
|
if buf.String() != "service/frontend\n" {
|
||||||
t.Errorf("unexpected output: %s", buf.String())
|
t.Errorf("unexpected output: %s", buf.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user