mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
b3c661a9f6
commit
b8ecb1671b
3 changed files with 104 additions and 90 deletions
|
@ -173,8 +173,8 @@ stages:
|
||||||
targets:
|
targets:
|
||||||
- name: Alpine 3.18
|
- name: Alpine 3.18
|
||||||
test: alpine/3.18
|
test: alpine/3.18
|
||||||
# - name: Fedora 38
|
# - name: Fedora 39
|
||||||
# test: fedora/38
|
# test: fedora/39
|
||||||
- name: Ubuntu 22.04
|
- name: Ubuntu 22.04
|
||||||
test: ubuntu/22.04
|
test: ubuntu/22.04
|
||||||
groups:
|
groups:
|
||||||
|
@ -267,8 +267,8 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
testFormat: devel/linux/{0}
|
testFormat: devel/linux/{0}
|
||||||
targets:
|
targets:
|
||||||
- name: Fedora 38
|
- name: Fedora 39
|
||||||
test: fedora38
|
test: fedora39
|
||||||
- name: Ubuntu 20.04
|
- name: Ubuntu 20.04
|
||||||
test: ubuntu2004
|
test: ubuntu2004
|
||||||
- name: Ubuntu 22.04
|
- name: Ubuntu 22.04
|
||||||
|
@ -287,6 +287,8 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
testFormat: 2.16/linux/{0}
|
testFormat: 2.16/linux/{0}
|
||||||
targets:
|
targets:
|
||||||
|
- name: Fedora 38
|
||||||
|
test: fedora38
|
||||||
- name: openSUSE 15
|
- name: openSUSE 15
|
||||||
test: opensuse15
|
test: opensuse15
|
||||||
groups:
|
groups:
|
||||||
|
|
|
@ -18,7 +18,14 @@ except ModuleNotFoundError:
|
||||||
from http.server import HTTPServer, SimpleHTTPRequestHandler
|
from http.server import HTTPServer, SimpleHTTPRequestHandler
|
||||||
|
|
||||||
httpd = HTTPServer(('localhost', port), SimpleHTTPRequestHandler)
|
httpd = HTTPServer(('localhost', port), SimpleHTTPRequestHandler)
|
||||||
|
try:
|
||||||
httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True,
|
httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True,
|
||||||
certfile=os.path.join(root_dir, 'cert.pem'),
|
certfile=os.path.join(root_dir, 'cert.pem'),
|
||||||
keyfile=os.path.join(root_dir, 'key.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()
|
httpd.handle_request()
|
||||||
|
|
|
@ -10,6 +10,11 @@
|
||||||
|
|
||||||
# TODO: Our current implementation does not handle SMTP authentication
|
# 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
|
# NOTE: If the system does not support smtpd-tls (python 2.6 and older) we do basic tests
|
||||||
- name: Attempt to install smtpd-tls
|
- name: Attempt to install smtpd-tls
|
||||||
pip:
|
pip:
|
||||||
|
|
Loading…
Reference in a new issue