Browse Source

Adding 'ceph' and 'opstools' repos to validate tripleo_ci_testinig

Change [1] started affacting and making promotion blocker.
This patch fixes the issue.

[1] https://review.opendev.org/#/c/724193/54/roles/tripleo-repos/tasks/main.yml

Closes-Bug: #1883119
Change-Id: Ia563e2cf960403c6fdaaf5dbc6d1f058ece89aff
changes/95/735195/2
Pooja Jadhav 4 weeks ago
parent
commit
ecf6206508
2 changed files with 9 additions and 3 deletions
  1. +5
    -3
      tripleo_repos/main.py
  2. +4
    -0
      tripleo_repos/tests/test_main.py

+ 5
- 3
tripleo_repos/main.py View File

@@ -241,14 +241,16 @@ def _validate_tripleo_ci_testing(repos):
"""Validate tripleo-ci-testing

With tripleo-ci-testing for repo (currently only periodic container build)
no other repos expected except optionally deps which is enabled regardless.
no other repos expected except optionally deps|ceph|opstools
which is enabled regardless.
"""
if 'tripleo-ci-testing' in repos and len(repos) > 1:
if 'deps' in repos and len(repos) == 2:
if 'deps' in repos or 'ceph' in repos or 'opstools' in repos:
return True
else:
raise InvalidArguments('Cannot use tripleo-ci-testing at the '
'same time as other repos, except deps.')
'same time as other repos, except '
'deps|ceph|opstools.')
return True




+ 4
- 0
tripleo_repos/tests/test_main.py View File

@@ -538,6 +538,10 @@ class TestValidate(testtools.TestCase):
self.assertRaises(main.InvalidArguments, main._validate_args,
self.args)

def test_tripleo_ci_testing_and_ceph_opstools_allowed(self):
self.args.repos = ['ceph', 'opstools', 'tripleo-ci-testing']
main._validate_args(self.args)

def test_tripleo_ci_testing_and_deps_allowed(self):
self.args.repos = ['deps', 'tripleo-ci-testing']
main._validate_args(self.args)


Loading…
Cancel
Save