mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
kubectl: rename Run() -> RunRun() to clarify purpose
Run() is too overloaded in the codebase already. The other commands have a pattern of RunExpose, RunScale, and so on. Since the command name is "run", the associated function should be called RunRun.
This commit is contained in:
@@ -181,7 +181,7 @@ func TestRunArgsFollowDashRules(t *testing.T) {
|
||||
cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr)
|
||||
cmd.Flags().Set("image", "nginx")
|
||||
cmd.Flags().Set("generator", "run/v1")
|
||||
err := Run(f, os.Stdin, os.Stdout, os.Stderr, cmd, test.args, test.argsLenAtDash)
|
||||
err := RunRun(f, os.Stdin, os.Stdout, os.Stderr, cmd, test.args, test.argsLenAtDash)
|
||||
if test.expectError && err == nil {
|
||||
t.Errorf("unexpected non-error (%s)", test.name)
|
||||
}
|
||||
@@ -438,7 +438,7 @@ func TestRunValidations(t *testing.T) {
|
||||
for flagName, flagValue := range test.flags {
|
||||
cmd.Flags().Set(flagName, flagValue)
|
||||
}
|
||||
err := Run(f, inBuf, outBuf, errBuf, cmd, test.args, cmd.ArgsLenAtDash())
|
||||
err := RunRun(f, inBuf, outBuf, errBuf, cmd, test.args, cmd.ArgsLenAtDash())
|
||||
if err != nil && len(test.expectedErr) > 0 {
|
||||
if !strings.Contains(err.Error(), test.expectedErr) {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user