diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2008-09-02 15:46:11 -0400 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2008-09-02 15:46:11 -0400 |
commit | 19bd10aa4ed3ae25d18d141882eb5365a74077c2 (patch) | |
tree | 7c4726be5ccb59da5058fcaac82248fb3e1516e2 /test | |
parent | 00bdaf4f60f2b5d11de87179a4671674f37d0767 (diff) | |
download | func-19bd10aa4ed3ae25d18d141882eb5365a74077c2.tar.gz func-19bd10aa4ed3ae25d18d141882eb5365a74077c2.tar.xz func-19bd10aa4ed3ae25d18d141882eb5365a74077c2.zip |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest/test_func_transmit.py | 5 |
1 files changed, 3 insertions, 2 deletions
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', |