Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#2112 from pwittrock/master
Browse files Browse the repository at this point in the history
drop short-hand flags from `config run` command
  • Loading branch information
k8s-ci-robot authored Jan 16, 2020
2 parents 32c959c + 35e2406 commit 18d3b9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions cmd/config/internal/commands/run-fns.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func GetRunFnRunner(name string) *RunFnRunner {
&r.DryRun, "dry-run", false, "print results to stdout")
r.Command.Flags().BoolVar(
&r.GlobalScope, "global-scope", false, "set global scope for functions.")
r.Command.Flags().StringSliceVarP(
&r.FnPaths, "fn-path", "p", []string{},
r.Command.Flags().StringSliceVar(
&r.FnPaths, "fn-path", []string{},
"read functions from these directories instead of the configuration directory.")
r.Command.Flags().StringVarP(
&r.Image, "image", "i", "",
r.Command.Flags().StringVar(
&r.Image, "image", "",
"run this image as a function instead of discovering them.")
return r
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/config/internal/commands/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ apiVersion: v1
},
{
name: "custom kind",
args: []string{"run", "dir", "-i", "foo:bar", "--", "Foo", "g=h"},
args: []string{"run", "dir", "--image", "foo:bar", "--", "Foo", "g=h"},
path: "dir",
expected: `
metadata:
Expand All @@ -105,7 +105,7 @@ apiVersion: v1
},
{
name: "custom kind '=' in data",
args: []string{"run", "dir", "-i", "foo:bar", "--", "Foo", "g=h", "i=j=k"},
args: []string{"run", "dir", "--image", "foo:bar", "--", "Foo", "g=h", "i=j=k"},
path: "dir",
expected: `
metadata:
Expand All @@ -120,14 +120,14 @@ apiVersion: v1
},
{
name: "function paths",
args: []string{"run", "dir", "-p", "path1", "--fn-path", "path2"},
args: []string{"run", "dir", "--fn-path", "path1", "--fn-path", "path2"},
path: "dir",
functionPaths: []string{"path1", "path2"},
},
{
name: "custom kind with function paths",
args: []string{
"run", "dir", "-p", "path", "-i", "foo:bar", "--", "Foo", "g=h", "i=j=k"},
"run", "dir", "--fn-path", "path", "--image", "foo:bar", "--", "Foo", "g=h", "i=j=k"},
path: "dir",
functionPaths: []string{"path"},
expected: `
Expand Down

0 comments on commit 18d3b9a

Please sign in to comment.