Skip to content

Commit 93863b8

Browse files
author
Dzmitry Humianiuk
authored
Merge pull request #90 from JMoravec/master
Add ignore ssl rules
2 parents c5789e6 + 64c43a5 commit 93863b8

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The following parameters are optional:
6868
- :code:`rp_hierarchy_class = True` - Enables hierarchy for class, default `True`. Doesn't support 'xdist' plugin.
6969
- :code:`rp_hierarchy_parametrize = True` - Enables hierarchy parametrized tests, default `False`. Doesn't support 'xdist' plugin.
7070
- :code:`rp_hierarchy_dirs_level = 0` - Directory starting hierarchy level (from pytest.ini level) (default `0`)
71+
- :code:`rp_verify_ssl = True` - Verify SSL when connecting to the server
7172

7273

7374
Examples

pytest_reportportal/plugin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def pytest_sessionstart(session):
5454
log_batch_size=int(session.config.getini('rp_log_batch_size')),
5555
ignore_errors=bool(session.config.getini('rp_ignore_errors')),
5656
ignored_tags=session.config.getini('rp_ignore_tags'),
57+
verify_ssl=session.config.getini('rp_verify_ssl')
5758
)
5859

5960
session.config.py_test_service.start_launch(
@@ -279,3 +280,9 @@ def pytest_addoption(parser):
279280
default=False,
280281
type='bool',
281282
help='Enables hierarchy for parametrized tests')
283+
284+
parser.addini(
285+
'rp_verify_ssl',
286+
default=True,
287+
type='bool',
288+
help='Verify HTTPS calls')

pytest_reportportal/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self):
7777
self._item_parts = {}
7878

7979
def init_service(self, endpoint, project, uuid, log_batch_size,
80-
ignore_errors, ignored_tags):
80+
ignore_errors, ignored_tags, verify_ssl=True):
8181
self._errors = queue.Queue()
8282
if self.RP is None:
8383
self.ignore_errors = ignore_errors
@@ -92,7 +92,8 @@ def init_service(self, endpoint, project, uuid, log_batch_size,
9292
project=project,
9393
token=uuid,
9494
error_handler=self.async_error_handler,
95-
log_batch_size=log_batch_size
95+
log_batch_size=log_batch_size,
96+
verify_ssl=verify_ssl
9697
)
9798
else:
9899
log.debug('The pytest is already initialized')

0 commit comments

Comments
 (0)