@@ -27,6 +27,8 @@ def setUp(self, docker_api):
2727 self .fs .create_dir ('/tmp/images/9.0.x/8.1-apache' )
2828 self .fs .create_dir ('/tmp/images/9.0.x/8.2-fpm' )
2929 self .fs .create_dir ('/tmp/images/9.0.x/8.2-apache' )
30+ self .fs .create_dir ('/tmp/images/9.0.x/8.3-fpm' )
31+ self .fs .create_dir ('/tmp/images/9.0.x/8.3-apache' )
3032 self .fs .create_dir ('/tmp/images/nightly/7.1-fpm' )
3133 self .fs .create_dir ('/tmp/images/nightly/7.1-apache' )
3234 self .version_manager = self .create_instance ()
@@ -186,6 +188,11 @@ def test_get_version_from_string_with_container_version(self):
186188 {'ps_version' : '8.0.0' , 'branch_version' : '8.0.x' , 'php_versions' : ('7.2' ,), 'container_version' : None },
187189 result
188190 )
191+ result = self .version_manager .get_version_from_string ('9.0.x-8.2' )
192+ self .assertEqual (
193+ {'ps_version' : '9.0.0' , 'branch_version' : '9.0.x' , 'php_versions' : ('8.2' ,), 'container_version' : None },
194+ result
195+ )
189196
190197 @patch ('prestashop_docker.version_manager.VERSIONS' , all_versions )
191198 def test_get_version_from_string_with_container_version_and_type (self ):
@@ -199,6 +206,11 @@ def test_get_version_from_string_with_container_version_and_type(self):
199206 {'ps_version' : '8.0.0' , 'branch_version' : '8.0.x' , 'php_versions' : ('7.2' ,), 'container_version' : 'fpm' },
200207 result
201208 )
209+ result = self .version_manager .get_version_from_string ('9.0.x-8.2-fpm' )
210+ self .assertEqual (
211+ {'ps_version' : '9.0.0' , 'branch_version' : '9.0.x' , 'php_versions' : ('8.2' ,), 'container_version' : 'fpm' },
212+ result
213+ )
202214
203215 @patch ('prestashop_docker.version_manager.VERSIONS' , all_versions )
204216 def test_get_version_from_string_with_pre_release_and_without_container_version_and_type (self ):
@@ -264,6 +276,17 @@ def test_parse_version_with_valid_version(self):
264276 },
265277 self .version_manager .parse_version ('8.0.0' )
266278 )
279+ self .assertEqual (
280+ {
281+ '9.0.x-8.1-apache' : '/tmp/images/9.0.x/8.1-apache' ,
282+ '9.0.x-8.1-fpm' : '/tmp/images/9.0.x/8.1-fpm' ,
283+ '9.0.x-8.2-apache' : '/tmp/images/9.0.x/8.2-apache' ,
284+ '9.0.x-8.2-fpm' : '/tmp/images/9.0.x/8.2-fpm' ,
285+ '9.0.x-8.3-apache' : '/tmp/images/9.0.x/8.3-apache' ,
286+ '9.0.x-8.3-fpm' : '/tmp/images/9.0.x/8.3-fpm' ,
287+ },
288+ self .version_manager .parse_version ('9.0.x' )
289+ )
267290
268291 @patch ('prestashop_docker.version_manager.VERSIONS' , all_versions )
269292 def test_parse_version_with_valid_version_and_php_version (self ):
@@ -281,6 +304,13 @@ def test_parse_version_with_valid_version_and_php_version(self):
281304 },
282305 self .version_manager .parse_version ('8.1.0-7.2' )
283306 )
307+ self .assertEqual (
308+ {
309+ '9.0.x-8.2-apache' : '/tmp/images/9.0.x/8.2-apache' ,
310+ '9.0.x-8.2-fpm' : '/tmp/images/9.0.x/8.2-fpm' ,
311+ },
312+ self .version_manager .parse_version ('9.0.x-8.2' )
313+ )
284314
285315 @patch ('prestashop_docker.version_manager.VERSIONS' , all_versions )
286316 def test_parse_version_with_valid_version_php_version_and_container (self ):
@@ -296,6 +326,12 @@ def test_parse_version_with_valid_version_php_version_and_container(self):
296326 },
297327 self .version_manager .parse_version ('8.1.3-7.2-apache' )
298328 )
329+ self .assertEqual (
330+ {
331+ '9.0.x-8.2-apache' : '/tmp/images/9.0.x/8.2-apache' ,
332+ },
333+ self .version_manager .parse_version ('9.0.x-8.2-apache' )
334+ )
299335
300336 @patch ('prestashop_docker.version_manager.VERSIONS' , all_versions )
301337 def test_get_versions (self ):
0 commit comments