1212
1313
1414CONTAINERS = {
15- 'centos-8' : {
16- 'name' : 'cephadm-build-test:centos8-py36' ,
17- 'base_image' : 'quay.io/centos/centos:stream8' ,
18- 'script' : 'dnf install -y python36' ,
19- },
2015 'centos-9' : {
2116 'name' : 'cephadm-build-test:centos9-py3' ,
2217 'base_image' : 'quay.io/centos/centos:stream9' ,
2318 'script' : 'dnf install -y python3' ,
2419 },
25- 'centos-8-plusdeps ' : {
26- 'name' : 'cephadm-build-test:centos8-py36-deps ' ,
27- 'base_image' : 'quay.io/centos/centos:stream8 ' ,
28- 'script' : 'dnf install -y python36 python3-jinja2 python3-pyyaml ' ,
20+ 'centos-10 ' : {
21+ 'name' : 'cephadm-build-test:centos10-py3 ' ,
22+ 'base_image' : 'quay.io/centos/centos:stream10 ' ,
23+ 'script' : 'dnf install -y python3' ,
2924 },
3025 'centos-9-plusdeps' : {
3126 'name' : 'cephadm-build-test:centos9-py3-deps' ,
3227 'base_image' : 'quay.io/centos/centos:stream9' ,
3328 'script' : 'dnf install -y python3 python3-jinja2 python3-pyyaml' ,
3429 },
30+ 'centos-10-plusdeps' : {
31+ 'name' : 'cephadm-build-test:centos10-py3-deps' ,
32+ 'base_image' : 'quay.io/centos/centos:stream10' ,
33+ 'script' : 'dnf install -y python3 python3-jinja2 python3-pyyaml' ,
34+ },
3535 'ubuntu-20.04' : {
3636 'name' : 'cephadm-build-test:ubuntu-20-04-py3' ,
37- 'base_image' : 'quay .io/library/ubuntu:20.04' ,
37+ 'base_image' : 'docker .io/library/ubuntu:20.04' ,
3838 'script' : 'apt update && apt install -y python3-venv' ,
3939 },
4040 'ubuntu-22.04' : {
4141 'name' : 'cephadm-build-test:ubuntu-22-04-py3' ,
42- 'base_image' : 'quay.io/library/ubuntu:22.04' ,
42+ 'base_image' : 'docker.io/library/ubuntu:22.04' ,
43+ 'script' : 'apt update && apt install -y python3-venv' ,
44+ },
45+ 'ubuntu-24.04' : {
46+ 'name' : 'cephadm-build-test:ubuntu-24-04-py3' ,
47+ 'base_image' : 'docker.io/library/ubuntu:24.04' ,
4348 'script' : 'apt update && apt install -y python3-venv' ,
4449 },
4550}
@@ -95,10 +100,11 @@ def source_dir():
95100@pytest .mark .parametrize (
96101 'env' ,
97102 [
98- 'centos-8' ,
99103 'centos-9' ,
104+ 'centos-10' ,
100105 'ubuntu-20.04' ,
101106 'ubuntu-22.04' ,
107+ 'ubuntu-24.04' ,
102108 ],
103109)
104110def test_cephadm_build (env , source_dir , tmp_path ):
@@ -128,8 +134,8 @@ def test_cephadm_build(env, source_dir, tmp_path):
128134 assert all ('requirements_entry' in v for v in data ['bundled_packages' ])
129135 assert 'zip_root_entries' in data
130136 zre = data ['zip_root_entries' ]
131- assert any (e . startswith ( 'Jinja2' ) for e in zre )
132- assert any (e . startswith ( 'MarkupSafe' ) for e in zre )
137+ assert any (_dist_info ( e , 'Jinja2' ) for e in zre )
138+ assert any (_dist_info ( e , 'MarkupSafe' ) for e in zre )
133139 assert any (e .startswith ('jinja2' ) for e in zre )
134140 assert any (e .startswith ('markupsafe' ) for e in zre )
135141 assert any (e .startswith ('cephadmlib' ) for e in zre )
@@ -139,8 +145,8 @@ def test_cephadm_build(env, source_dir, tmp_path):
139145@pytest .mark .parametrize (
140146 'env' ,
141147 [
142- 'centos-8-plusdeps' ,
143148 'centos-9-plusdeps' ,
149+ 'centos-10-plusdeps' ,
144150 'centos-9' ,
145151 ],
146152)
@@ -155,11 +161,6 @@ def test_cephadm_build_from_rpms(env, source_dir, tmp_path):
155161 assert res .returncode != 0
156162 return
157163 binary = tmp_path / 'cephadm'
158- if 'centos-8' in env and sys .version_info [:2 ] >= (3 , 10 ):
159- # The version of markupsafe in centos 8 is incompatible with
160- # python>=3.10 due to changes in the stdlib therefore we can't execute
161- # the cephadm binary, so we quit the test early.
162- return
163164 assert binary .is_file ()
164165 res = subprocess .run (
165166 [sys .executable , str (binary ), 'version' ],
@@ -184,9 +185,15 @@ def test_cephadm_build_from_rpms(env, source_dir, tmp_path):
184185 assert all ('requirements_entry' in v for v in data ['bundled_packages' ])
185186 assert 'zip_root_entries' in data
186187 zre = data ['zip_root_entries' ]
187- assert any (e . startswith ( 'Jinja2' ) for e in zre )
188- assert any (e . startswith ( 'MarkupSafe' ) for e in zre )
188+ assert any (_dist_info ( e , 'Jinja2' ) for e in zre )
189+ assert any (_dist_info ( e , 'MarkupSafe' ) for e in zre )
189190 assert any (e .startswith ('jinja2' ) for e in zre )
190191 assert any (e .startswith ('markupsafe' ) for e in zre )
191192 assert any (e .startswith ('cephadmlib' ) for e in zre )
192193 assert any (e .startswith ('_cephadmmeta' ) for e in zre )
194+
195+
196+ def _dist_info (entry , name ):
197+ return (
198+ entry .startswith (entry ) or entry .startswith (entry .lower ())
199+ ) and (entry .endswith ('.dist-info' ) or entry .endswith ('.egg-info' ))
0 commit comments