Bug 908821

Summary: CLI client does not check passed options correctly
Product: [Other] RHQ Project Reporter: Filip Brychta <fbrychta>
Component: CLIAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filip Brychta 2013-02-07 15:33:20 UTC
Description of problem:
I accidentally run 
./rhq-cli.sh -s 10.16.23.170 -r rhqadmin -p rhqadmin
instead of 
./rhq-cli.sh -s 10.16.23.170 -u rhqadmin -p rhqadmin 
and no error message was displayed.
When you run 
./rhq-cli.sh -s 10.16.23.170 -z rhqadmin -p rhqadmin
error message is displayed correclty.

Version-Release number of selected component (if applicable):
Version: 4.6.0-SNAPSHOT
Build Number: 73a33d5

How reproducible:
Always

Steps to Reproduce:
1. run ./rhq-cli.sh -s 10.16.23.170 -r rhqadmin -p rhqadmin

  
Actual results:
no error

Expected results:
Cli: invalid option -- r
rhq-cli.sh [-h] [-u user] [-p pass] [-P] [-s host] [-t port] [-v] [-f file]|[-c command]
Exception in thread "main" java.lang.IllegalArgumentException: Bad arguments specified on command line
	at org.rhq.enterprise.client.ClientMain$StartupConfiguration.process(ClientMain.java:124)
	at org.rhq.enterprise.client.ClientMain.main(ClientMain.java:177)