Skip minor version increment validation for branchless
Tempest plugins do not branch, therefore we do not need to enforce that the minor version is incremented to leave room for stable releases. Change-Id: I22ba5cb42070b5a450617872de2da337b327de1c Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
4295322c49
commit
e5362d5d2c
@ -252,6 +252,10 @@ def validate_series_open(deliv, context):
|
||||
def validate_series_first(deliv, context):
|
||||
"The first release in a series needs to end with '.0'."
|
||||
|
||||
if deliv.type == 'tempest-plugin':
|
||||
print('this rule does not apply to branchless tempest plugins')
|
||||
return
|
||||
|
||||
releases = deliv.releases
|
||||
if len(releases) != 1:
|
||||
# We only have to check this when the first release is being
|
||||
|
@ -2746,6 +2746,35 @@ class TestValidateSeriesFirst(base.BaseTestCase):
|
||||
self.assertEqual(0, len(self.ctx.warnings))
|
||||
self.assertEqual(0, len(self.ctx.errors))
|
||||
|
||||
def test_branchless(self):
|
||||
series_a_dir = self.tmpdir + '/a'
|
||||
series_a_filename = series_a_dir + '/sahara-tests.yaml'
|
||||
os.makedirs(series_a_dir)
|
||||
deliverable_data = textwrap.dedent('''
|
||||
---
|
||||
type: tempest-plugin
|
||||
releases:
|
||||
- version: 0.9.1
|
||||
projects:
|
||||
- repo: openstack/sahara-tests
|
||||
hash: 1e016405f8dbdf265374700d2fb8f8e2a9460805
|
||||
''')
|
||||
with open(series_a_filename, 'w') as f:
|
||||
f.write(deliverable_data)
|
||||
deliv = deliverable.Deliverable(
|
||||
team='team',
|
||||
series='a',
|
||||
name='name',
|
||||
data=yamlutils.loads(deliverable_data),
|
||||
)
|
||||
validate.validate_series_first(
|
||||
deliv,
|
||||
self.ctx,
|
||||
)
|
||||
self.ctx.show_summary()
|
||||
self.assertEqual(0, len(self.ctx.warnings))
|
||||
self.assertEqual(0, len(self.ctx.errors))
|
||||
|
||||
|
||||
class TestValidateSeriesFinal(base.BaseTestCase):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user