summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2007-12-17 16:23:44 -0500
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2007-12-17 16:23:44 -0500
commitcaf1eb0a4f77a81556a2d8c54fd5b7984a2817cd (patch)
treedb990fa8cebcb1b4734940fa017c0b915e087acd /test
parentf127e353c6820b5737a5e9ffc7904fb5fc3cdd8e (diff)
downloadthird_party-func-caf1eb0a4f77a81556a2d8c54fd5b7984a2817cd.tar.gz
third_party-func-caf1eb0a4f77a81556a2d8c54fd5b7984a2817cd.tar.xz
third_party-func-caf1eb0a4f77a81556a2d8c54fd5b7984a2817cd.zip
added some more testing, starting to test certmaster/certmaster-ca/funcd
which doesn't actually work in the test script at the moment, not sure why
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-it.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/test/test-it.sh b/test/test-it.sh
index f79d64e..fd2051b 100755
--- a/test/test-it.sh
+++ b/test/test-it.sh
@@ -14,6 +14,10 @@ BUILD=Y
# do we do a fresh pull from git to build
BUILD_FROM_FRESH_CHECKOUT=Y
+# should we backup existing func pki setup, since
+# we are going to be deleting it from the normal spot?
+BACKUP_FUNC_PKI="N"
+
rm -rf $RPM_PATH/rpms
rm -rf $RPM_PATH/srpms
rm -rf $RPM_PATH/tars
@@ -116,6 +120,42 @@ start_the_func()
}
+backup_the_secret_of_the_func()
+{
+ # whatever, this should probably be some standard date format
+ # but I just wanted something sans spaces
+ DATE=`date "+%F_%R"`
+ tar -c /etc/pki/func/* > func-pki-backup-$DATE.tar
+
+}
+
+#yes, I'm in a funny variable naming mood, I'll change them
+#later
+no_more_secrets()
+{
+ rm -rf /etc/pki/func/*
+}
+
+find_certmaster_certs()
+{
+ MINION_CERTS=`certmaster-ca --list`
+ STATUS=$?
+ echo "certmaster found the following certs:"
+ echo $MINION_CERTS
+}
+
+sign_the_certmaster_certs()
+{
+ echo
+ echo $MINION_CERTS
+ for i in $MINION_CERTS
+ do
+ echo /usr/bin/certmaster-ca -s $i
+ /usr/bin/certmaster-ca -s $i
+ done
+
+}
+
if [ "$BUILD" == "Y" ] ; then
if [ "$BUILD_FROM_FRESH_CHECKOUT" == "Y" ] ; then
@@ -138,10 +178,20 @@ fi
# see if funcd is install
find_the_func
+if [ "$BACKUP_FUNC_PKI" == "Y" ] ; then
+ backup_the_secret_of_the_func
+fi
+
+# remove any existing keys
+#no_more_secrets
# test start up of init scripts
start_the_func
+find_certmaster_certs
+
+sign_the_certmaster_certs
+
# see if funcd is running
# see if certmaster is installed
# see if cermtasterd is running