Handling unknown option + test
Goal
Do not print fake errors if the unsupported option was given.
Example:
./check --psql-binary 'sudo psql' --dbname prod -h db2 -U super --force -e 1 --project prod
ERROR:
mandatory option '--epoch' is not set
mandatory option '--project' is not set
Hint: option --force
is unsupported.
TODO
-
correctly process unknown option with no argument -
correctly process unknown option with argument -
write tests for options
How to implement
- Fix
./check
- Write gitlab-ci tests
Acceptance Criteria
-
The error is shown if an option is unknown for both types of options (with or without argument). -
Test is written and work.
Edited by Victor Yagofarov