Merge "Add a 'generic' release-type."
This commit is contained in:
commit
f27b4f805c
@ -54,7 +54,7 @@ properties:
|
|||||||
type: "string"
|
type: "string"
|
||||||
enum: [ "python-service", "python-pypi", "xstatic", "fuel",
|
enum: [ "python-service", "python-pypi", "xstatic", "fuel",
|
||||||
"nodejs", "puppet", "neutron", "horizon", "openstack-manuals",
|
"nodejs", "puppet", "neutron", "horizon", "openstack-manuals",
|
||||||
"manila-image-elements" ]
|
"manila-image-elements", "generic" ]
|
||||||
stable-branch-type:
|
stable-branch-type:
|
||||||
type: "string"
|
type: "string"
|
||||||
enum: [ "std", "tagless", "upstream" ]
|
enum: [ "std", "tagless", "upstream" ]
|
||||||
|
@ -1134,6 +1134,34 @@ class TestValidateVersionNumbers(base.BaseTestCase):
|
|||||||
self.assertEqual(0, len(self.ctx.warnings))
|
self.assertEqual(0, len(self.ctx.warnings))
|
||||||
self.assertEqual(1, len(self.ctx.errors))
|
self.assertEqual(1, len(self.ctx.errors))
|
||||||
|
|
||||||
|
@mock.patch('openstack_releases.requirements.find_bad_lower_bound_increases')
|
||||||
|
def test_generic_model(self, mock_lower_bound):
|
||||||
|
deliv = deliverable.Deliverable(
|
||||||
|
team='team',
|
||||||
|
series='ocata',
|
||||||
|
name='name',
|
||||||
|
data={
|
||||||
|
'release-type': 'generic',
|
||||||
|
'releases': [
|
||||||
|
{'version': '0.9.0',
|
||||||
|
'projects': [
|
||||||
|
{'repo': 'openstack/release-test',
|
||||||
|
'hash': '04ee20f0bfe8774935de33b75e87fb3b858d0733'},
|
||||||
|
]},
|
||||||
|
{'version': '0.9.1',
|
||||||
|
'projects': [
|
||||||
|
{'repo': 'openstack/release-test',
|
||||||
|
'hash': 'a26e6a2e8a5e321b2e3517dbb01a7b9a56a8bfd5'},
|
||||||
|
]}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
validate.validate_version_numbers(deliv, self.ctx)
|
||||||
|
self.ctx.show_summary()
|
||||||
|
self.assertEqual(0, len(self.ctx.warnings))
|
||||||
|
self.assertEqual(0, len(self.ctx.errors))
|
||||||
|
self.assertFalse(mock_lower_bound.called)
|
||||||
|
|
||||||
def test_valid_version(self):
|
def test_valid_version(self):
|
||||||
deliv = deliverable.Deliverable(
|
deliv = deliverable.Deliverable(
|
||||||
team='team',
|
team='team',
|
||||||
|
@ -40,6 +40,10 @@ _VALIDATORS['nodejs'] = _VALIDATORS['python-service']
|
|||||||
_VALIDATORS['neutron'] = _VALIDATORS['python-service']
|
_VALIDATORS['neutron'] = _VALIDATORS['python-service']
|
||||||
_VALIDATORS['horizon'] = _VALIDATORS['python-service']
|
_VALIDATORS['horizon'] = _VALIDATORS['python-service']
|
||||||
_VALIDATORS['python-pypi'] = _VALIDATORS['python-service']
|
_VALIDATORS['python-pypi'] = _VALIDATORS['python-service']
|
||||||
|
# This release-type uses the same version validation as python-service and
|
||||||
|
# has no language specific validation like nodejs or xstatic.
|
||||||
|
# It's used to bypass and python specific checks (like requirements validation)
|
||||||
|
_VALIDATORS['generic'] = _VALIDATORS['python-service']
|
||||||
|
|
||||||
|
|
||||||
def validate_version(versionstr, release_type='python-service', pre_ok=True):
|
def validate_version(versionstr, release_type='python-service', pre_ok=True):
|
||||||
|
Loading…
Reference in New Issue
Block a user