Skip upstream check if we have already imported upstream
Update our testing to only check upstream if we haven't imported the repo into openstack. This will address test failues when users deleted the upstream repo before removing it from gerrit/projects.yaml. Change-Id: I6bd9fe9841dee8be352ed17af44b4cf9cea397fd Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
b18ceeaf33
commit
536cec4fec
@ -31,7 +31,7 @@ def tempdir():
|
||||
reqroot = tempfile.mkdtemp()
|
||||
yield reqroot
|
||||
finally:
|
||||
shutil.rmtree(reqroot)
|
||||
shutil.rmtree(reqroot, ignore_errors=True)
|
||||
|
||||
|
||||
def check_repo(repo_path):
|
||||
@ -140,6 +140,14 @@ def main():
|
||||
# but not git@
|
||||
upstream = p.get('upstream')
|
||||
if upstream and 'track-upstream' not in p.get('options', []):
|
||||
openstack_repo = 'https://git.openstack.org/%s' % name
|
||||
try:
|
||||
# Check to see if we have already imported the project into
|
||||
# OpenStack, if so skip checking upstream.
|
||||
check_repo(openstack_repo)
|
||||
except git.exc.GitCommandError:
|
||||
# We haven't imported the repo yet, make sure upstream is
|
||||
# valid.
|
||||
found_errors += check_repo(upstream)
|
||||
if upstream:
|
||||
for prefix in VALID_SCHEMES:
|
||||
|
Loading…
Reference in New Issue
Block a user