Merge "Validate membership of EOL tag on unmaintained branch"
This commit is contained in:
commit
dae5b17b5a
@ -41,6 +41,19 @@ def get_stable_branch_id(series):
|
||||
return series_status_data[series].release_id
|
||||
|
||||
|
||||
def get_full_branch_name(series):
|
||||
"""Retrieve the full branch name for the series.
|
||||
|
||||
Returns stable/<release-id> if the series is still maintained
|
||||
or returns unmaintained/<release-id> if the series already went
|
||||
to Unmaintained.
|
||||
"""
|
||||
series_status_data = series_status.SeriesStatus.default()
|
||||
return '%s/%s' % (
|
||||
'unmaintained' if series_status_data[series].is_eom else 'stable',
|
||||
series_status_data[series].release_id)
|
||||
|
||||
|
||||
def find_modified_deliverable_files():
|
||||
"Return a list of files modified by the most recent commit."
|
||||
results = processutils.check_output(
|
||||
@ -260,7 +273,7 @@ def check_branch_sha(workdir, repo, series, sha):
|
||||
if stable/N exists we could not create stable/N-1).
|
||||
|
||||
"""
|
||||
remote_match = 'remotes/origin/stable/%s' % get_stable_branch_id(series)
|
||||
remote_match = 'remotes/origin/%s' % get_full_branch_name(series)
|
||||
try:
|
||||
containing_branches = _filter_branches(
|
||||
processutils.check_output(
|
||||
|
@ -875,10 +875,10 @@ class TestValidateReleaseBranchMembership(base.BaseTestCase):
|
||||
self.assertEqual(0, len(self.ctx.warnings))
|
||||
self.assertEqual(0, len(self.ctx.errors))
|
||||
|
||||
@mock.patch('openstack_releases.gitutils.get_stable_branch_id')
|
||||
def test_not_descendent(self, get_stable_branch_id):
|
||||
get_stable_branch_id.configure_mock(
|
||||
return_value='meiji',
|
||||
@mock.patch('openstack_releases.gitutils.get_full_branch_name')
|
||||
def test_not_descendent(self, get_full_branch_name):
|
||||
get_full_branch_name.configure_mock(
|
||||
return_value='stable/meiji',
|
||||
)
|
||||
deliv = deliverable.Deliverable(
|
||||
team='team',
|
||||
|
Loading…
x
Reference in New Issue
Block a user