mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-30 15:02:23 +00:00
use of --local should completely eliminate communication with API server
fix testcase use of --local should completely eliminate communication with API server
This commit is contained in:
parent
fcd9b7f7ba
commit
05131c627f
@ -121,6 +121,7 @@ func (o *ImageOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st
|
||||
o.Record = cmdutil.GetRecordFlag(cmd)
|
||||
o.ChangeCause = f.Command(cmd, false)
|
||||
o.PrintObject = f.PrintObject
|
||||
o.Local = cmdutil.GetFlagBool(cmd, "local")
|
||||
o.DryRun = cmdutil.GetDryRunFlag(cmd)
|
||||
o.Output = cmdutil.GetFlagString(cmd, "output")
|
||||
o.ResolveImage = f.ResolveImage
|
||||
|
@ -48,6 +48,7 @@ func TestImageLocal(t *testing.T) {
|
||||
cmd := NewCmdImage(f, buf, buf)
|
||||
cmd.SetOutput(buf)
|
||||
cmd.Flags().Set("output", "name")
|
||||
cmd.Flags().Set("local", "true")
|
||||
mapper, typer := f.Object()
|
||||
tf.Printer = &printers.NamePrinter{Decoders: []runtime.Decoder{codec}, Typer: typer, Mapper: mapper}
|
||||
|
||||
|
@ -131,6 +131,7 @@ func (o *ResourcesOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args
|
||||
o.Encoder = f.JSONEncoder()
|
||||
o.ShortOutput = cmdutil.GetFlagString(cmd, "output") == "name"
|
||||
o.Record = cmdutil.GetRecordFlag(cmd)
|
||||
o.Local = cmdutil.GetFlagBool(cmd, "local")
|
||||
o.ChangeCause = f.Command(cmd, false)
|
||||
o.PrintObject = f.PrintObject
|
||||
o.Cmd = cmd
|
||||
|
Loading…
Reference in New Issue
Block a user