treat extra repos as errors
Require all repositories in a release to be listed in the repository-settings section of the deliverable file. Change-Id: I80c3763d62dd776af0912f92d20353d94d0e6d91 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
committed by
Sean McGinnis
parent
64c1d37c9c
commit
1305c6a975
@@ -793,9 +793,7 @@ def validate_new_releases(deliverable_info, deliverable_name,
|
|||||||
repository_settings = deliverable_info.get('repository-settings', {})
|
repository_settings = deliverable_info.get('repository-settings', {})
|
||||||
for repo in actual_repos:
|
for repo in actual_repos:
|
||||||
if repo not in repository_settings:
|
if repo not in repository_settings:
|
||||||
# TODO(dhellmann): Turn this into a warning after the T
|
mk_error(
|
||||||
# series is open.
|
|
||||||
mk_warning(
|
|
||||||
'release %s includes repository %s '
|
'release %s includes repository %s '
|
||||||
'that is not in the repository-settings section' %
|
'that is not in the repository-settings section' %
|
||||||
(final_release['version'], repo)
|
(final_release['version'], repo)
|
||||||
|
|||||||
@@ -1340,8 +1340,8 @@ class TestValidateNewReleases(base.BaseTestCase):
|
|||||||
errors.append,
|
errors.append,
|
||||||
)
|
)
|
||||||
print(warnings, errors)
|
print(warnings, errors)
|
||||||
self.assertEqual(1, len(warnings))
|
self.assertEqual(0, len(warnings))
|
||||||
self.assertEqual(0, len(errors))
|
self.assertEqual(1, len(errors))
|
||||||
|
|
||||||
def test_missing_repo_info(self):
|
def test_missing_repo_info(self):
|
||||||
# The tag is missing a repository that is in
|
# The tag is missing a repository that is in
|
||||||
|
|||||||
Reference in New Issue
Block a user