summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_handler/test_handler_bootcmd.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unittests/test_handler/test_handler_bootcmd.py b/tests/unittests/test_handler/test_handler_bootcmd.py
index dbf43e0d..09d4c681 100644
--- a/tests/unittests/test_handler/test_handler_bootcmd.py
+++ b/tests/unittests/test_handler/test_handler_bootcmd.py
@@ -69,7 +69,7 @@ class TestBootcmd(CiTestCase):
cc_bootcmd.handle('cc_bootcmd', invalid_config, cc, LOG, [])
self.assertIn('Failed to shellify bootcmd', self.logs.getvalue())
self.assertEqual(
- "'int' object is not iterable",
+ "Input to shellify was type 'int'. Expected list or tuple.",
str(context_manager.exception))
@skipIf(_missing_jsonschema_dep, "No python-jsonschema dependency")
@@ -98,7 +98,7 @@ class TestBootcmd(CiTestCase):
invalid_config = {
'bootcmd': ['ls /', 20, ['wget', 'http://stuff/blah'], {'a': 'n'}]}
cc = self._get_cloud('ubuntu')
- with self.assertRaises(RuntimeError) as context_manager:
+ with self.assertRaises(TypeError) as context_manager:
cc_bootcmd.handle('cc_bootcmd', invalid_config, cc, LOG, [])
expected_warnings = [
'bootcmd.1: 20 is not valid under any of the given schemas',
@@ -110,7 +110,8 @@ class TestBootcmd(CiTestCase):
self.assertIn(warning, logs)
self.assertIn('Failed to shellify', logs)
self.assertEqual(
- 'Unable to shellify type int which is not a list or string',
+ ("Unable to shellify type 'int'. Expected list, string, tuple. "
+ "Got: 20"),
str(context_manager.exception))
def test_handler_creates_and_runs_bootcmd_script_with_instance_id(self):