mirror of https://github.com/databricks/cli.git
added flags are not parsed check
This commit is contained in:
parent
58d28a9c92
commit
993956294a
|
@ -4,3 +4,6 @@ hello, world
|
||||||
|
|
||||||
>>> [CLI] bundle exec -- pwd
|
>>> [CLI] bundle exec -- pwd
|
||||||
[TMPDIR]
|
[TMPDIR]
|
||||||
|
|
||||||
|
>>> [CLI] bundle exec -- echo --help
|
||||||
|
--help
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
trace $CLI bundle exec -- echo "hello, world"
|
trace $CLI bundle exec -- echo "hello, world"
|
||||||
|
|
||||||
trace $CLI bundle exec -- pwd
|
trace $CLI bundle exec -- pwd
|
||||||
|
|
||||||
|
# The CLI should not parse the --help flag and should pass it as is to echo.
|
||||||
|
trace $CLI bundle exec -- echo --help
|
||||||
|
|
|
@ -13,29 +13,6 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: test that -- works with flags as well.
|
|
||||||
|
|
||||||
// TODO: Can bundle auth be resolved twice? What about:
|
|
||||||
// databricks bundle exec -t foo -- databricks jobs list -t bar?
|
|
||||||
// OR
|
|
||||||
// databricks bundle exec -- databricks jobs list -t bar?
|
|
||||||
// OR
|
|
||||||
// databricks bundle exec -- databricks jobs list?
|
|
||||||
// OR
|
|
||||||
// databricks bundle exec -t foo -- databricks jobs list?
|
|
||||||
//
|
|
||||||
// For the first two, undefined behavior is fine. For the latter two we need to ensure
|
|
||||||
// that the target from exec is respected.
|
|
||||||
//
|
|
||||||
// Add tests for all four of these cases.
|
|
||||||
// --> Do I need similar tests for --profile as well?
|
|
||||||
// --> Also add test for what happens with a default target?
|
|
||||||
|
|
||||||
// TODO: Add acceptance test that flags are indeed not parsed by the exec command and
|
|
||||||
// instead are parsed by the child command.
|
|
||||||
|
|
||||||
// # TODO: Table test casing the profile flag permutations
|
|
||||||
|
|
||||||
func newExecCommand() *cobra.Command {
|
func newExecCommand() *cobra.Command {
|
||||||
execCmd := &cobra.Command{
|
execCmd := &cobra.Command{
|
||||||
Use: "exec",
|
Use: "exec",
|
||||||
|
@ -150,8 +127,5 @@ Examples:
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Is this needed to make -- work with flags? What does this option do?
|
|
||||||
// execCmd.Flags().SetInterspersed(false)
|
|
||||||
|
|
||||||
return execCmd
|
return execCmd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue