-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2922 from JordonPhillips/zero-rc-deploy
Add option to return zero rc for empty deploy changeset
- Loading branch information
Showing
7 changed files
with
120 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
import tempfile | ||
import shutil | ||
import codecs | ||
|
||
from awscli.testutils import unittest | ||
from awscli.utils import write_exception | ||
|
||
|
||
class TestWriteException(unittest.TestCase): | ||
def setUp(self): | ||
self.tempdir = tempfile.mkdtemp() | ||
self.outfile = os.path.join(self.tempdir, 'stdout') | ||
|
||
def tearDown(self): | ||
shutil.rmtree(self.tempdir) | ||
|
||
def test_write_exception(self): | ||
error_message = "Some error message." | ||
ex = Exception(error_message) | ||
with codecs.open(self.outfile, 'w+', encoding='utf-8') as outfile: | ||
write_exception(ex, outfile) | ||
outfile.seek(0) | ||
|
||
expected_output = ( | ||
"\n%s\n" % error_message | ||
) | ||
self.assertEqual(outfile.read(), expected_output) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters