summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThiago da Silva <thiago@redhat.com>2013-10-31 14:17:22 -0400
committerLuis Pabon <lpabon@redhat.com>2013-11-04 10:51:41 -0800
commit0c34fa6085f96666429cc1835f6d69854a70530b (patch)
tree1820d3cd8a217c8a89a96feea1d2c9fbb5c5e3c7 /tools
parent9f8d2e61a79defd22fb4aa064ff5a5b936730b53 (diff)
additional gswauth functional tests
These tests cover account registration and de-registration user creation/delete, and listing of both account and user Change-Id: Ie622daccfc8e2d2fb45565952a99d7d832ce1189 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6212 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gswauth_functional_tests.sh47
1 files changed, 26 insertions, 21 deletions
diff --git a/tools/gswauth_functional_tests.sh b/tools/gswauth_functional_tests.sh
index f0d44dd..1fe5a87 100755
--- a/tools/gswauth_functional_tests.sh
+++ b/tools/gswauth_functional_tests.sh
@@ -53,6 +53,31 @@ fail()
quit "$1"
}
+run_generic_tests()
+{
+ # clean up gsmetadata dir
+ gswauth_cleanup
+
+ #swauth-prep
+ sudo_env swauth-prep -K swauthkey || fail "Unable to prep gswauth"
+ sudo_env swauth-add-user -K swauthkey -a test tester testing || fail "Unable to add user test"
+ sudo_env swauth-add-user -K swauthkey -a test2 tester2 testing2 || fail "Unable to add user test2"
+ sudo_env swauth-add-user -K swauthkey test tester3 testing3 || fail "Unable to add user test3"
+
+ nosetests -v --exe \
+ --with-xunit \
+ --xunit-file functional_tests/gluster-swift-gswauth-generic-functional-TC-report.xml \
+ --with-html-output \
+ --html-out-file functional_tests/gluster-swift-gswauth-generic-functional-result.html \
+ test/functional || fail "Functional tests failed"
+ nosetests -v --exe \
+ --with-xunit \
+ --xunit-file functional_tests/gluster-swift-gswauth-functionalnosetests-TC-report.xml \
+ --with-html-output \
+ --html-out-file functional_tests/gluster-swift-gswauth-functionalnosetests-result.html \
+ test/functionalnosetests || fail "Functional-nose tests failed"
+}
+
### MAIN ###
# Only run if there is no configuration in the system
@@ -90,27 +115,7 @@ nosetests -v --exe \
--html-out-file functional_tests/gluster-swift-gswauth-functional-result.html \
test/functional_auth/gswauth || fail "Functional gswauth test failed"
-# clean up gsmetadata dir
-gswauth_cleanup
-
-#swauth-prep
-sudo_env swauth-prep -K swauthkey || fail "Unable to prep gswauth"
-sudo_env swauth-add-user -K swauthkey -a test tester testing || fail "Unable to add user test"
-sudo_env swauth-add-user -K swauthkey -a test2 tester2 testing2 || fail "Unable to add user test2"
-sudo_env swauth-add-user -K swauthkey test tester3 testing3 || fail "Unable to add user test3"
-
-nosetests -v --exe \
- --with-xunit \
- --xunit-file functional_tests/gluster-swift-gswauth-generic-functional-TC-report.xml \
- --with-html-output \
- --html-out-file functional_tests/gluster-swift-gswauth-generic-functional-result.html \
- test/functional || fail "Functional tests failed"
-nosetests -v --exe \
- --with-xunit \
- --xunit-file functional_tests/gluster-swift-gswauth-functionalnosetests-TC-report.xml \
- --with-html-output \
- --html-out-file functional_tests/gluster-swift-gswauth-functionalnosetests-result.html \
- test/functionalnosetests || fail "Functional-nose tests failed"
+run_generic_tests
cleanup
exit 0