Tighten the horizon plugin rule a bit more
There was another corner case not found by unit tests. Add testcase and skip re-expanding the -ui/-dashboard renaming for the python- subpackage. Change-Id: Ifa08bc8da8524e15e90bafbb40d6a3ca1acbb615
This commit is contained in:
parent
adefeddaa5
commit
d8c52f2621
|
@ -243,11 +243,11 @@ RDO_PKG_MAP = [
|
|||
'Tempest', 'tripleo-common', 'trove', 'tuskar',
|
||||
'vitrage', 'watcher', 'zaqar', 'zun'],
|
||||
pkgfun=openstack_prefix_tr),
|
||||
# Horizon plugins (normalized to openstack-<project>-ui)
|
||||
RegexRule(pattern=r'^[\w-]+-(dashboard|ui)',
|
||||
pkgfun=rdo_horizon_plugins_tr),
|
||||
# XStatic projects (name is python-pypi_name, no lowercase conversion)
|
||||
RegexRule(pattern=r'^XStatic.*', pkgfun=rdo_xstatic_tr),
|
||||
# Horizon plugins (normalized to openstack-<project>-ui)
|
||||
RegexRule(pattern=r'^(neutron-)?\w+-(dashboard|ui)',
|
||||
pkgfun=rdo_horizon_plugins_tr),
|
||||
# Tempest plugins (normalized to python-<project>-tests-tempest)
|
||||
RegexRule(pattern=r'\w+-tempest-plugin', pkgfun=rdo_tempest_plugins_tr)
|
||||
]
|
||||
|
@ -295,7 +295,7 @@ SUSE_PKG_MAP = [
|
|||
SingleRule('monasca-ui', 'openstack-horizon-plugin-monasca-ui'),
|
||||
SingleRule('murano-dashboard', 'openstack-horizon-plugin-murano-ui'),
|
||||
SingleRule('networking-vsphere', 'openstack-neutron-vsphere'),
|
||||
RegexRule(pattern=r'^[\w-]+-(dashboard|ui)',
|
||||
RegexRule(pattern=r'^(neutron-)?\w+-(dashboard|ui)',
|
||||
pkgfun=suse_horizon_plugins_tr),
|
||||
]
|
||||
|
||||
|
|
5
tests.py
5
tests.py
|
@ -102,8 +102,13 @@ class Pymod2PkgTests(unittest.TestCase):
|
|||
self.assertEqual(pymod2pkg.module2package(
|
||||
'neutron-fwaas-dashboard', 'suse'),
|
||||
'openstack-horizon-plugin-neutron-fwaas-ui')
|
||||
self.assertEqual(pymod2pkg.module2package(
|
||||
'horizon-plugin-neutron-fwaas-ui', 'suse'),
|
||||
'python-horizon-plugin-neutron-fwaas-ui')
|
||||
self.assertEqual(pymod2pkg.module2package('zomg-dashboard', 'suse'),
|
||||
'openstack-horizon-plugin-zomg-ui')
|
||||
self.assertEqual(pymod2pkg.module2package('XStatic-jquery-ui', 'suse'),
|
||||
'python-XStatic-jquery-ui')
|
||||
|
||||
def test_translation_tempest_plugins(self):
|
||||
self.assertEqual(pymod2pkg.module2package('keystone-tempest-plugin',
|
||||
|
|
Loading…
Reference in New Issue