From f9e502678128337e02286290eb916170df2d2c56 Mon Sep 17 00:00:00 2001 From: makkalot Date: Mon, 30 Jun 2008 18:41:52 +0300 Subject: adding tests for sample method that tests the rendering things --- test/unittest/test_client.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unittest/test_client.py b/test/unittest/test_client.py index 1a3f7cd..1c81b64 100644 --- a/test/unittest/test_client.py +++ b/test/unittest/test_client.py @@ -14,7 +14,8 @@ import socket class BaseTest: # assume we are talking to localhost # th = socket.gethostname() - th = socket.getfqdn() + minion = "acervirtual.evlan.com" + th = socket.getfqdn(minion) nforks=1 async=False @@ -358,8 +359,40 @@ class TestIptablesPort(BaseTest): # doesnt have an inventory, so er... -akl +class TestEchoTest(BaseTest): + module = "echo" + + def test_run_string(self): + result=self.overlord.echo.run_string("heyman") + self.assert_on_fault(result) + + def test_run_int(self): + result=self.overlord.echo.run_int(12) + self.assert_on_fault(result) + def test_run_float(self): + result=self.overlord.echo.run_float(12.0) + self.assert_on_fault(result) + def test_run_options(self): + result=self.overlord.echo.run_options("hehehh") + self.assert_on_fault(result) + + def test_run_list(self): + result=self.overlord.echo.run_list(['one','two','three']) + self.assert_on_fault(result) + + def test_run_hash(self): + result=self.overlord.echo.run_hash({'one':1,'two':2}) + self.assert_on_fault(result) + + def test_run_boolean(self): + result=self.overlord.echo.run_hash(True) + self.assert_on_fault(result) + + + + class TestSystem(BaseTest): module = "system" -- cgit From e86c3def00d719032a62352ca4f9fc5e88b7cbd1 Mon Sep 17 00:00:00 2001 From: makkalot Date: Mon, 30 Jun 2008 22:45:13 +0300 Subject: remove my minion so others may test it --- test/unittest/test_client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/test/unittest/test_client.py b/test/unittest/test_client.py index 1c81b64..5c4ab21 100644 --- a/test/unittest/test_client.py +++ b/test/unittest/test_client.py @@ -14,8 +14,7 @@ import socket class BaseTest: # assume we are talking to localhost # th = socket.gethostname() - minion = "acervirtual.evlan.com" - th = socket.getfqdn(minion) + th = socket.getfqdn() nforks=1 async=False -- cgit