1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #7541/b8ecb167 backport][stable-7] CI: devel supports Fedora 39, and no longer Fedora 38 (#7547)

CI: devel supports Fedora 39, and no longer Fedora 38 (#7541)

* devel supports Fedora 39, and no longer Fedora 38.

* Disable 'mail' tests for Python 3.12+.

Ref: https://github.com/ansible-collections/community.general/issues/4656

* Fix setupSSLServer to work with Python 3.12.

(cherry picked from commit b8ecb1671b)

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3ce83dcf6a)
This commit is contained in:
patchback[bot] 2023-11-18 14:34:11 +01:00 committed by Felix Fontein
parent ec5e4919eb
commit 820d067c29
2 changed files with 98 additions and 86 deletions

View file

@ -18,7 +18,14 @@ except ModuleNotFoundError:
from http.server import HTTPServer, SimpleHTTPRequestHandler
httpd = HTTPServer(('localhost', port), SimpleHTTPRequestHandler)
try:
httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True,
certfile=os.path.join(root_dir, 'cert.pem'),
keyfile=os.path.join(root_dir, 'key.pem'))
except AttributeError:
# Python 3.12 or newer:
context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH)
context.load_cert_chain(certfile=os.path.join(root_dir, 'cert.pem'),
keyfile=os.path.join(root_dir, 'key.pem'))
httpd.socket = context.wrap_socket(httpd.socket)
httpd.handle_request()

View file

@ -10,6 +10,11 @@
# TODO: Our current implementation does not handle SMTP authentication
- when:
# TODO: https://github.com/ansible-collections/community.general/issues/4656
- ansible_python.version.major != 3 or ansible_python.version.minor < 12
block:
# NOTE: If the system does not support smtpd-tls (python 2.6 and older) we do basic tests
- name: Attempt to install smtpd-tls
pip: