From a69b9ac3430bedc198d164cb753754bcc925db11 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Tue, 18 Dec 2007 15:48:49 -0500 Subject: some rudimentary "poke at the server bits" we could use some unit tests for the modules, and run them from here --- test/test-it.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'test/test-it.sh') 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 +# +# 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 -- cgit