Skip to content

Commit

Permalink
Removed -no-... command-line options.
Browse files Browse the repository at this point in the history
They didn't make sense in this context.
  • Loading branch information
matejak committed Mar 15, 2021
1 parent 880fb03 commit 3cce56c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/test_rule_in_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ _arg_dry_run="off"
print_help()
{
printf '%s\n' "Test a rule using the container backend."
printf 'Usage: %s [-n|--name <arg>] [-s|--scenarios <arg>] [-d|--datastream <arg>] [-r|--remediate-using <REMEDIATION>] [--(no-)dontclean] [--(no-)dry-run] [-h|--help] <rule>\n' "$0"
printf 'Usage: %s [-n|--name <arg>] [-s|--scenarios <arg>] [-d|--datastream <arg>] [-r|--remediate-using <REMEDIATION>] [--dontclean] [--dry-run] [-h|--help] <rule>\n' "$0"
printf '\t%s\n' "<rule>: The short rule ID. Wildcards are supported."
printf '\t%s\n' "-n, --name: Name of the test image (default: 'ssg_test_suite')"
printf '\t%s\n' "-s, --scenarios: Regex to reduce selection of tested scenarios (default: '.*')"
printf '\t%s\n' "-d, --datastream: Path to the datastream to use in tests. Autodetected by default. (no default)"
printf '\t%s\n' "-r, --remediate-using: What to remediate with. Can be one of: 'oscap', 'bash' and 'ansible' (default: 'oscap')"
printf '\t%s\n' "--dontclean, --no-dontclean: Dont remove HTML reports from the log directory. (off by default)"
printf '\t%s\n' "--dry-run, --no-dry-run: Just print the test suite command-line. (off by default)"
printf '\t%s\n' "--dontclean: Dont remove HTML reports from the log directory."
printf '\t%s\n' "--dry-run: Just print the test suite command-line."
printf '\t%s\n' "-h, --help: Prints help"
}

Expand Down Expand Up @@ -125,13 +125,11 @@ parse_commandline()
-r*)
_arg_remediate_using="$(remediations "${_key##-r}" "remediate-using")" || exit 1
;;
--no-dontclean|--dontclean)
--dontclean)
_arg_dontclean="on"
test "${1:0:5}" = "--no-" && _arg_dontclean="off"
;;
--no-dry-run|--dry-run)
--dry-run)
_arg_dry_run="on"
test "${1:0:5}" = "--no-" && _arg_dry_run="off"
;;
-h|--help)
print_help
Expand Down

0 comments on commit 3cce56c

Please sign in to comment.