Skip to content

TLS CA certificate bundle, invalid path: True #304

@kr87nikhil

Description

@kr87nikhil

name: Bug report
about: Create a report to help us improve
title: 'rp_verify_ssl config value is parsed as string type'
labels: bug
assignees: ''


Describe the bug
As per README file, rp_verify_ssl can have value True or False. But as it is parsed as str instead of bool.

Error is raised from pytest_reportportal/plugin.py file in check_connection method.
153> resp = requests.get(url, headers=headers,
154> verify=agent_config.rp_verify_ssl)

It happens because rp_verify_ssl is defined with no type, defaults to str in pytest_addoption method:
393> parser.addini(
394> 'rp_verify_ssl',
395> default='True',
396> help='True/False - verify HTTPS calls, or path to a CA_BUNDLE or '
397> 'directory with certificates of trusted CAs.')

Steps to Reproduce
Steps to reproduce the behavior:

  1. https://github.com/reportportal/examples-python/tree/master/pytest
  2. Execute test cases with report portal flag

Expected behavior
Launch should be created on successful validation of token in Report Portal.

Actual behavior
Upon executing tests with reportportal, it raises below error:
INTERNALERROR> raise IOError("Could not find a suitable TLS CA certificate bundle, "
INTERNALERROR> OSError: Could not find a suitable TLS CA certificate bundle, invalid path: True

Package versions
requests==2.27.1
reportportal-client==5.2.0,
pytest-reportportal==5.1.0

Additional context
Conditional type conversion would be good, as verify attribute of post method takes any string value as path to TLS CA certificate bundle.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions