Skip to content

Commit 85a9b77

Browse files
committed
add option to print control updates
Signed-off-by: Sophia Wang <huiwang@redhat.com>
1 parent 9006a8a commit 85a9b77

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

content_test_filtering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
if options.output == "json":
6565
logs.print_json(list_of_tests)
6666
logger.debug(f"The updated controls: {controls_files}")
67-
if controls_files:
67+
if controls_files and options.control_output:
6868
controls_updates = [{"controls": controls_files}]
6969
logs.print_json(controls_updates)
7070
else:

ctf/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ def parse_args():
3737
action="store_true", help="Print only profile tests.")
3838
common_parser.add_argument("--rule", dest="rule_output", default=False,
3939
action="store_true", help="Print only rule tests.")
40+
common_parser.add_argument("--control", dest="control_output", default=False,
41+
action="store_true", help="Print control updates.")
4042

4143
parser.set_defaults(pr_number=None, branch=None)
4244

43-
subparsers = parser.add_subparsers(dest="subcommand",
45+
subparsers = parser.add_subparsers(dest="subcommand"
4446
help="Subcommands: pr, branch")
4547
subparsers.required = True
4648

0 commit comments

Comments
 (0)