Skip to content

Commit 6da15cf

Browse files
committed
feat: --dont-check-status-code and --dont-check-content-type options
1 parent c3a8576 commit 6da15cf

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

doc/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Changelog
77
Added
88
^^^^^
99
- The :ref:`test` command returns 1 in case of errors.
10+
- Added :ref:`test` ``--dont-check-content-type`` and ``--dont-check-status-code`` options.
1011

1112
[0.2.1] - 2024-12-04
1213
--------------------

scim2_cli/test.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,28 @@
1212
@click.command(cls=make_rst_to_ansi_formatter(DOC_URL), name="test")
1313
@click.pass_context
1414
@click.option("-v", "--verbose", is_flag=True, help="Enables verbose mode")
15-
def test_cli(ctx, verbose):
15+
@click.option(
16+
"--check-status-code/--dont-check-status-code",
17+
is_flag=True,
18+
default=True,
19+
help="Fail on unexpected return codes.",
20+
)
21+
@click.option(
22+
"--check-content-type/--dont-check-content-type",
23+
is_flag=True,
24+
default=True,
25+
help="Fail on unexpected content types.",
26+
)
27+
def test_cli(ctx, verbose, check_status_code, check_content_type):
1628
"""Perform a server SCIM compliance check using :doc:`scim2-tester <scim2_tester:index>`.
1729
1830
.. code-block:: bash
1931
2032
test
2133
"""
2234
client = ctx.obj["client"]
35+
client.check_status_code = check_status_code
36+
client.check_content_type = check_content_type
2337
results = check_server(client)
2438
click.echo(f"Performing a SCIM compliance check on {client.client.base_url} ...")
2539
success = True

0 commit comments

Comments
 (0)