Author: justi9
Date: 2009-04-01 15:08:41 -0400 (Wed, 01 Apr 2009)
New Revision: 3247
Added:
mgmt/trunk/cumin/bin/cumin-admin-test
Log:
Add a test to exercise the cumin-admin command
Added: mgmt/trunk/cumin/bin/cumin-admin-test
===================================================================
--- mgmt/trunk/cumin/bin/cumin-admin-test (rev 0)
+++ mgmt/trunk/cumin/bin/cumin-admin-test 2009-04-01 19:08:41 UTC (rev 3247)
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+id="$RANDOM"
+code=0
+tmpdir=$(mktemp -d)
+trap "rm -rf ${tmpdir}" EXIT
+
+while read command; do
+ echo -n "Testing command '$command'..."
+
+ $command &> "${tmpdir}/output"
+
+ if [[ $? == 0 ]]; then
+ echo " OK"
+ else
+ echo
+ echo "Command failed with exit code $?"
+ echo "Output:"
+ cat "${tmpdir}/output"
+ code=1
+ fi
+done <<EOF
+cumin-admin --help
+cumin-admin add-user "$id" changeme
+cumin-admin assign "$id" admin
+cumin-admin unassign "$id" admin
+cumin-admin list-users
+cumin-admin remove-user "$id" --force
+cumin-admin add-qmf-server "$id" "$id"
+cumin-admin list-qmf-servers
+cumin-admin remove-qmf-server "$id"
+cumin-admin list-roles
+EOF
+
+exit "$code"
Property changes on: mgmt/trunk/cumin/bin/cumin-admin-test
___________________________________________________________________
Name: svn:executable
+ *