summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2007-12-18 15:48:49 -0500
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2007-12-18 15:48:49 -0500
commita69b9ac3430bedc198d164cb753754bcc925db11 (patch)
treeaed935de9f91342f12afef42bd46111e9f1b3688 /test
parent8761c8e217659b68ba3c2b266bef1fab3e73e30a (diff)
downloadthird_party-func-a69b9ac3430bedc198d164cb753754bcc925db11.tar.gz
third_party-func-a69b9ac3430bedc198d164cb753754bcc925db11.tar.xz
third_party-func-a69b9ac3430bedc198d164cb753754bcc925db11.zip
some rudimentary "poke at the server bits"
we could use some unit tests for the modules, and run them from here
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-it.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/test-it.sh b/test/test-it.sh
index e90b1f1..76c3cf2 100755
--- a/test/test-it.sh
+++ b/test/test-it.sh
@@ -1,4 +1,14 @@
#!/bin/bash
+# Copyright 2007, Red Hat, Inc
+# Adrian Likins <alikins@redhat.com>
+#
+# This software may be freely redistributed under the terms of the GNU
+# general public license.
+#
+
+# this is pretty Red Hat distro specific at the moment
+# I'll try to make it a bit more portable if there is
+# interest
# where do we build stuff
BUILD_PATH="/tmp/func-build"
@@ -44,6 +54,7 @@ check_out_code()
}
+
build_rpm()
{
PKG=$1
@@ -160,6 +171,23 @@ sign_the_certmaster_certs()
}
+# just some random "poke at func and make sure it works stuff"
+test_funcd()
+{
+ # it seems to take a second for the signed certs to be
+ # ready, so this is here
+ sleep 10
+
+ func "*" list_minions
+
+ for i in $MINION_CERTS
+ do
+ func $i call system listMethods
+ func $i call test add "23" "45"
+ done
+
+}
+
if [ "$BUILD" == "Y" ] ; then
if [ "$BUILD_FROM_FRESH_CHECKOUT" == "Y" ] ; then
@@ -169,6 +197,7 @@ if [ "$BUILD" == "Y" ] ; then
BUILD_PATH="`pwd`/../../"
fi
+ # FIXME: red hat specifc
build_rpm func $BUILD_PATH
#if we are building, then we should remove the installed
@@ -192,18 +221,26 @@ no_more_secrets
# test start up of init scripts
start_the_func
+#we seem to need to wait a bit for certmaster to create the certs and whatnot
sleep 5
find_certmaster_certs
sign_the_certmaster_certs
+
+test_funcd
+
+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
+
+
+
### probably do some stuff to test bad/no/malformed/unauthed certs as well
# see if we can connect to funcd with the overloard