summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-01-23 18:51:49 -0500
committerMichael DeHaan <mdehaan@redhat.com>2008-01-23 18:51:49 -0500
commit86c80167b3df69cb7b21574c36f512bf3f16daf1 (patch)
tree213ab0285858affadf84c193b99ad39cc0291cbc /test
parent33c6e4013874878f05eec593d69e8afdeaae212b (diff)
parentd5d7f89d147798cc6374fc4c16b0dd23a717fb57 (diff)
downloadthird_party-func-86c80167b3df69cb7b21574c36f512bf3f16daf1.tar.gz
third_party-func-86c80167b3df69cb7b21574c36f512bf3f16daf1.tar.xz
third_party-func-86c80167b3df69cb7b21574c36f512bf3f16daf1.zip
Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/func
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-it.sh18
-rw-r--r--test/unittest/test_client.py26
2 files changed, 28 insertions, 16 deletions
diff --git a/test/test-it.sh b/test/test-it.sh
index 72f3224..fd93d62 100755
--- a/test/test-it.sh
+++ b/test/test-it.sh
@@ -273,25 +273,13 @@ run_unittests
run_async_test
stop_the_func
-# see if funcd is running
-# see if certmaster is installed
-# see if cermtasterd is running
-
-# setup certs
-## see if we have certs set up properly
+# leaving the test cases with func not running is kind of
+# annoying, so restart it
+start_the_func
### probably do some stuff to test bad/no/malformed/unauthed certs as well
-# see if we can connect to funcd with the overloard
-
-# see what modules we have available
-# for each module, call the info stuff on them
-
-# / start walking over the modules, doing commandliney stuff to each, and
-# trying to check return data and return code as much as possible
-
-# test shut down of init scripts
diff --git a/test/unittest/test_client.py b/test/unittest/test_client.py
index b7c5e7b..f4d56cc 100644
--- a/test/unittest/test_client.py
+++ b/test/unittest/test_client.py
@@ -13,11 +13,16 @@ import socket
class BaseTest:
# assume we are talking to localhost
th = socket.gethostname()
+ nforks=1
+ async=False
+
def __init__(self):
pass
def setUp(self):
- self.client = fc.Client(self.th)
+ self.client = fc.Client(self.th,
+ nforks=self.nforks,
+ async=self.async)
def test_module_version(self):
mod = getattr(self.client, self.module)
@@ -284,3 +289,22 @@ class TestSystem(BaseTest):
+class TestAsyncTest(BaseTest):
+ module = "async.test"
+ nforks=4
+ async=True
+ def test_sleep_async(self):
+ job_id = self.client.test.sleep(5)
+ print "job_id", job_id
+ (return_code, results) = self.client.job_status(job_id)
+# self.assert_on_fault(results)
+ print "return_code", return_code
+ print "results", results
+
+ def test_add_async(self):
+ job_id = self.client.test.add(1,5)
+ print "job_id", job_id
+ (return_code, results) = self.client.job_status(job_id)
+# self.assert_on_fault(results)
+ print "return_code", return_code
+ print "results", results