File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,24 @@ class KyuubiCtlArgumentsSuite extends KyuubiFunSuite {
6565 assert(opArgs.version == KYUUBI_VERSION )
6666 }
6767
68- test(" prints usage on empty input" ) {
69- testPrematureExit(Array .empty[String ], " Usage: kyuubi-ctl" )
68+ test(" treat --help as action" ) {
69+ val args = Seq (" --help" )
70+ val opArgs = new KyuubiCtlArguments (args)
71+ assert(opArgs.action == KyuubiCtlAction .HELP )
72+
73+ val args2 = Seq (
74+ " create" , " server" ,
75+ " --help" ,
76+ " --user" , user,
77+ " --host" , host,
78+ " --port" , port
79+ )
80+ val opArgs2 = new KyuubiCtlArguments (args2)
81+ assert(opArgs2.action == KyuubiCtlAction .HELP )
7082 }
7183
72- test(" prints usage with only --help " ) {
73- testPrematureExit(Array ( " --help " ) , " Usage: kyuubi-ctl" )
84+ test(" prints usage on empty input " ) {
85+ testPrematureExit(Array .empty[ String ] , " Usage: kyuubi-ctl" )
7486 }
7587
7688 test(" prints error with unrecognized options" ) {
You can’t perform that action at this time.
0 commit comments