Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: fix test_certauthority_root.py #10762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

weizhouapache
Copy link
Member

Description

This PR fixes the simulator CI test test_certauthority_root.py

it does not work with python3

2025-04-18T10:43:58.5235913Z 2025-04-18 10:32:20,503 - CRITICAL - EXCEPTION: Failure:: ['Traceback (most recent call last):\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 59, in testPartExecutor\n    yield\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 591, in run\n    self._callTestMethod(testMethod)\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 549, in _callTestMethod\n    method()\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/failure.py", line 35, in runTest\n    raise self.exc_val.with_traceback(self.tb)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/loader.py", line 335, in loadTestsFromName\n    module = self.importer.importFromPath(\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 162, in importFromPath\n    return self.importFromDir(dir_path, fqname)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 198, in importFromDir\n    mod = load_module(part_fqname, fh, filename, desc)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 128, in load_module\n    spec.loader.exec_module(mod)\n', '  File "<frozen importlib._bootstrap_external>", line 883, in exec_module\n', '  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n', '  File "/home/runner/work/cloudstack/cloudstack/test/integration/smoke/test_certauthority_root.py", line 27, in <module>\n    from OpenSSL.crypto import FILETYPE_PEM, verify, X509\n', "ImportError: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location)\n"]

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

it does not work with python3
```
2025-04-18T10:43:58.5235913Z 2025-04-18 10:32:20,503 - CRITICAL - EXCEPTION: Failure:: ['Traceback (most recent call last):\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 59, in testPartExecutor\n    yield\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 591, in run\n    self._callTestMethod(testMethod)\n', '  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/unittest/case.py", line 549, in _callTestMethod\n    method()\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/failure.py", line 35, in runTest\n    raise self.exc_val.with_traceback(self.tb)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/loader.py", line 335, in loadTestsFromName\n    module = self.importer.importFromPath(\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 162, in importFromPath\n    return self.importFromDir(dir_path, fqname)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 198, in importFromDir\n    mod = load_module(part_fqname, fh, filename, desc)\n', '  File "/home/runner/.local/lib/python3.10/site-packages/nose/importer.py", line 128, in load_module\n    spec.loader.exec_module(mod)\n', '  File "<frozen importlib._bootstrap_external>", line 883, in exec_module\n', '  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed\n', '  File "/home/runner/work/cloudstack/cloudstack/test/integration/smoke/test_certauthority_root.py", line 27, in <module>\n    from OpenSSL.crypto import FILETYPE_PEM, verify, X509\n', "ImportError: cannot import name 'verify' from 'OpenSSL.crypto' (unknown location)\n"]
```
@weizhouapache weizhouapache changed the base branch from main to 4.19 April 22, 2025 09:31
@boring-cyborg boring-cyborg bot added component:integration-test Python Warning... Python code Ahead! labels Apr 22, 2025
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.17%. Comparing base (431e4f9) to head (563b2fd).
Report is 3 commits behind head on 4.19.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10762   +/-   ##
=========================================
  Coverage     15.17%   15.17%           
+ Complexity    11332    11331    -1     
=========================================
  Files          5415     5415           
  Lines        474929   474929           
  Branches      57926    57926           
=========================================
+ Hits          72047    72054    +7     
+ Misses       394828   394819    -9     
- Partials       8054     8056    +2     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.89% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@weizhouapache weizhouapache marked this pull request as ready for review April 23, 2025 12:33
@weizhouapache
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13154

@weizhouapache
Copy link
Member Author

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13113)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 46513 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10762-t13113-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

@Pearl1594 , can you merge this?

Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pearl1594 Pearl1594 merged commit 55c8138 into apache:4.19 Apr 24, 2025
25 of 26 checks passed
@DaanHoogland DaanHoogland deleted the 4.19-fix-ci-test_certauthority_root branch April 24, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:integration-test Python Warning... Python code Ahead!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants