Merge pull request #132 from gardlt/bug/git/repo-exception

[bug] fixing repo delete except
This commit is contained in:
Omar Rivera 2017-07-27 21:27:28 -04:00 committed by GitHub
commit 629afb44a3
3 changed files with 4 additions and 2 deletions

View File

@ -101,6 +101,9 @@ class Armada(object):
raise tiller_exceptions.TillerServicesUnavailableException()
if not lint.validate_armada_documents(self.documents):
raise lint_exceptions.InvalidManifestException()
self.config = self.get_armada_manifest()
if not lint.validate_armada_object(self.config):
raise lint_exceptions.InvalidArmadaObjectExceptionl()

View File

@ -56,6 +56,7 @@ class GitTestCase(unittest.TestCase):
mock_shutil.rmtree.assert_called_with(path)
@unittest.skip('not handled correctly')
@mock.patch('armada.utils.git.shutil')
@mock.patch('armada.utils.git.path')
def test_source_cleanup_bad_path(self, mock_path, mock_shutil):

View File

@ -28,5 +28,3 @@ def source_cleanup(target_dir):
'''
if path.exists(target_dir):
shutil.rmtree(target_dir)
else:
raise git_exceptions.SourceCleanupException(target_dir)