Closed johnpmitsch closed 7 years ago
Issues: #20805
To test
spin up a katello 3.4 production box and run:
yum install -y git vim
cd ~
git clone https://github.com/Katello/katello-packaging
cd katello-packaging
git remote add fork https://github.com/johnpmitsch/katello-packaging
git fetch fork
git checkout fork/opt_parser_bug
cd ~
ln -s katello-packaging/katello/katello-change-hostname katello-change-hostname
chmod a+x katello-change-hostname
try excluding options and make sure you get an error message and printout of the options. i.e.
katello-change-hostname newname
(exclude -u and -p options)
then make sure proper input works as well, test any other edge cases you can think of
optparser isn't recognized inside of functions, so its changed to an instance variable here, and then the prechecks are changed to run before the warning message