Bug fixes, refactoring and "new" tests for the build manager

- Fixes various bugs introduced in the most recent build system commit
- Refactors state management in the build manager to be cleaner and more contained
- Adds back in the mock-based tests, fixed to not use threads and adjusted for the refactoring
- Adds some more simplified unit tests around non-etch related flows
This commit is contained in:
Joseph Schorr 2016-07-15 18:28:48 -04:00
parent 9f6b47ad1f
commit 2c1880b944
4 changed files with 503 additions and 145 deletions

View file

@ -57,10 +57,15 @@ class BuildJob(object):
@lru_cache(maxsize=1)
def _load_repo_build(self):
try:
return model.build.get_repository_build(self.job_details['build_uuid'])
return model.build.get_repository_build(self.build_uuid)
except model.InvalidRepositoryBuildException:
raise BuildJobLoadException(
'Could not load repository build with ID %s' % self.job_details['build_uuid'])
'Could not load repository build with ID %s' % self.build_uuid)
@property
def build_uuid(self):
""" Returns the unique UUID for this build job. """
return self.job_details['build_uuid']
@property
def namespace(self):