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:
Doug Hellmann
2018-02-07 14:12:34 -05:00
committed by Sean McGinnis
parent 64c1d37c9c
commit 1305c6a975
2 changed files with 3 additions and 5 deletions

View File

@@ -793,9 +793,7 @@ def validate_new_releases(deliverable_info, deliverable_name,
repository_settings = deliverable_info.get('repository-settings', {})
for repo in actual_repos:
if repo not in repository_settings:
# TODO(dhellmann): Turn this into a warning after the T
# series is open.
mk_warning(
mk_error(
'release %s includes repository %s '
'that is not in the repository-settings section' %
(final_release['version'], repo)

View File

@@ -1340,8 +1340,8 @@ class TestValidateNewReleases(base.BaseTestCase):
errors.append,
)
print(warnings, errors)
self.assertEqual(1, len(warnings))
self.assertEqual(0, len(errors))
self.assertEqual(0, len(warnings))
self.assertEqual(1, len(errors))
def test_missing_repo_info(self):
# The tag is missing a repository that is in