From 19bd10aa4ed3ae25d18d141882eb5365a74077c2 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Tue, 2 Sep 2008 15:46:11 -0400 Subject: func-transmit now has some ways of handling exceptions raised from the Overlord() api class. It will catch them, and then marshall them into a dict of {'name':"?", 'error':1, 'message':"?". 'info':{dict of whatever}} It will also exit the process with status 1 instead of 0. Also, some refactoring to make the error handling a little easier. --- test/unittest/test_func_transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/unittest/test_func_transmit.py b/test/unittest/test_func_transmit.py index 7a5473d..90fe598 100644 --- a/test/unittest/test_func_transmit.py +++ b/test/unittest/test_func_transmit.py @@ -123,13 +123,14 @@ class ListMinion(object): def test_list_minions(self): out = self.call({'clients': '*', 'module':'local', - 'method': 'utils.list_minions'}) + 'method':'utils.list_minions'}) def test_list_minions_no_match(self): out = self.call({'clients': 'somerandom-name-that-shouldnt-be-a_real_host_name', 'module':'local', 'method':'utils.list_minions'}) - assert out == [] + assert out['error'] == 1 + assert out['name'] == "Func Client Exception" # def test_list_minions_group_name(self): # out = self.call({'clients': '@test', -- cgit