Skip to content

ValueError message is returned when attempting to format a behave report using a FIPS compliant system #834

@Logan-L

Description

@Logan-L

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Running the following command returns a ValueError and points to hashlib.md5() references within the project.

behave -f allure_behave.formatter:AllureFormatter -o allure-results
Exception ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
Traceback (most recent call last):
  File "/usr/local/bin/behave", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/behave/__main__.py", line 183, in main
    return run_behave(config)
  File "/usr/local/lib/python3.10/site-packages/behave/__main__.py", line 127, in run_behave
    failed = runner.run()
  File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 804, in run
    return self.run_with_paths()
  File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 824, in run_with_paths
    return self.run_model()
  File "/usr/local/lib/python3.10/site-packages/behave/runner.py", line 626, in run_model
    failed = feature.run(self)
  File "/usr/local/lib/python3.10/site-packages/behave/model.py", line 321, in run
    failed = scenario.run(runner)
  File "/usr/local/lib/python3.10/site-packages/allure_commons/_allure.py", line 248, in __call__
    with self:
  File "/usr/local/lib/python3.10/site-packages/allure_commons/_allure.py", line 252, in __enter__
    plugin_manager.hook.start_test(parent_uuid=None,
  File "/usr/local/lib/python3.10/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/usr/local/lib/python3.10/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/local/lib/python3.10/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/local/lib/python3.10/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/usr/local/lib/python3.10/site-packages/allure_behave/listener.py", line 71, in start_test
    self.start_scenario(context['scenario'])
  File "/usr/local/lib/python3.10/site-packages/allure_behave/listener.py", line 80, in start_scenario
    test_case.historyId = scenario_history_id(scenario)
  File "/usr/local/lib/python3.10/site-packages/allure_behave/utils.py", line 33, in scenario_history_id
    return md5(*parts)
  File "/usr/local/lib/python3.10/site-packages/allure_commons/utils.py", line 19, in md5
    m = hashlib.md5()
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS

What is the expected behavior?

Behave results should be generated in a Allure compatible format in the allure-results directory of the project.

What is the motivation / use case for changing the behavior?

To ensure FIPS compliant/restricted systems utilizing this project are able to format output using any of the Allure adapters.

Please tell us about your environment:

  • Allure version: 2.32.0
  • Test framework: behave@1.2.6
  • Allure adapter: allure-behave@2.13.5

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions