cheroot icon indicating copy to clipboard operation
cheroot copied to clipboard

handle openssl3 error in ssl tests

Open radez opened this issue 1 year ago β€’ 6 comments

Using OpenSSL 3, the expected error string caught in ssl tests has changed. E AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1000)'

This is already handled for OpenSSL pre-1.1 and gte-1.1, adding handling for OpenSSL 3+

Fixes: #645

❓ What kind of change does this PR introduce?

  • [ ] 🐞 bug fix
  • [ ] 🐣 feature
  • [ ] πŸ“‹ docs update
  • [x] πŸ“‹ tests/coverage improvement
  • [ ] πŸ“‹ refactoring
  • [ ] πŸ’₯ other

πŸ“‹ Contribution checklist:

(If you're a first-timer, check out this guide on making great pull requests)

  • [x] I wrote descriptive pull request text above
  • [x] I think the code is well written
  • [x] I wrote good commit messages
  • [x] I have squashed related commits together after the changes have been approved
  • [x] Unit tests for the changes exist
  • [x] Integration tests for the changes exist (if applicable)
  • [x] I used the same coding conventions as the rest of the project
  • [x] The new code doesn't generate linter offenses
  • [x] Documentation reflects the changes
  • [x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences

This change is Reviewable

radez avatar Apr 02 '24 15:04 radez

Codecov Report

Merging #655 (b7e089b) into main (41584b8) will decrease coverage by 0.02%. Report is 2 commits behind head on main. The diff coverage is 66.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #655      +/-   ##
==========================================
- Coverage   83.58%   83.56%   -0.02%     
==========================================
  Files          28       28              
  Lines        4172     4174       +2     
==========================================
+ Hits         3487     3488       +1     
- Misses        685      686       +1     

codecov[bot] avatar Apr 02 '24 15:04 codecov[bot]

Hm, test results suggest maybe I'm not making the correct check here to resolve this. I'll do some more research to see if I can clarify.

radez avatar Apr 02 '24 16:04 radez

Any ideas on how to test both variants in CI?

webknjaz avatar Apr 02 '24 16:04 webknjaz

Any ideas on how to test both variants in CI?

I believe this was a change in openssl 3.2. You can see in fedora where F40 and rawhide are 3.2 and are the builds that are failing. https://packages.fedoraproject.org/pkgs/openssl/openssl/ I've update the patch to check for openssl 3.2 and I believe this has resolved testing for the correct variants in the correct cases.

radez avatar Apr 02 '24 16:04 radez

Perhaps, it's time to integrate Packit..

webknjaz avatar Apr 02 '24 16:04 webknjaz

Yup, probably not a bad idea.

radez avatar Apr 02 '24 16:04 radez