summaryrefslogtreecommitdiffstats
path: root/test/unittest
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-06-30 18:41:52 +0300
committermakkalot <makkalot@gmail.com>2008-06-30 18:41:52 +0300
commitf9e502678128337e02286290eb916170df2d2c56 (patch)
treef6f7c941a34d42b732143d43dcb55c5d6781ab58 /test/unittest
parent4b5dd860f9db31bc20865ce1ddb41fb910e64be9 (diff)
downloadfunc-f9e502678128337e02286290eb916170df2d2c56.tar.gz
func-f9e502678128337e02286290eb916170df2d2c56.tar.xz
func-f9e502678128337e02286290eb916170df2d2c56.zip
adding tests for sample method that tests the rendering things
Diffstat (limited to 'test/unittest')
-rw-r--r--test/unittest/test_client.py35
1 files changed, 34 insertions, 1 deletions
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"