use deliverable type service to derive python-server release type
Avoid having to set the release type for things that are python service but that have npm-based components. Change-Id: Ia600753b4090939ab07745847d39200bd3fad6c3 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
722e8789c8
commit
76b89d0466
@ -359,6 +359,9 @@ def get_release_type(deliverable_info, project, workdir):
|
||||
if deliverable_info.get('type') == 'library':
|
||||
return ('python-pypi', False)
|
||||
|
||||
if deliverable_info.get('type') == 'service':
|
||||
return ('python-server', False)
|
||||
|
||||
if deliverable_info.get('include-pypi-link', False):
|
||||
return ('python-pypi', False)
|
||||
|
||||
|
@ -823,6 +823,25 @@ class TestGetReleaseType(base.BaseTestCase):
|
||||
)
|
||||
self.assertEqual(('python-pypi', False), (release_type, explicit))
|
||||
|
||||
def test_server(self):
|
||||
deliverable_info = {
|
||||
'artifact-link-mode': 'none',
|
||||
'type': 'server',
|
||||
'releases': [
|
||||
{'version': '99.1.0',
|
||||
'projects': [
|
||||
{'repo': 'openstack/puppet-watcher',
|
||||
'hash': '1e7baef27139f69a83e1fe28686bb72ee7e1d6fa'},
|
||||
]}
|
||||
],
|
||||
}
|
||||
release_type, explicit = validate.get_release_type(
|
||||
deliverable_info,
|
||||
deliverable_info['releases'][0]['projects'][0],
|
||||
self.tmpdir,
|
||||
)
|
||||
self.assertEqual(('python-server', False), (release_type, explicit))
|
||||
|
||||
def test_implicit_pypi(self):
|
||||
deliverable_info = {
|
||||
'artifact-link-mode': 'none',
|
||||
|
Loading…
x
Reference in New Issue
Block a user