diff options
author | Thiago da Silva <thiago@redhat.com> | 2013-10-31 14:17:22 -0400 |
---|---|---|
committer | Luis Pabon <lpabon@redhat.com> | 2013-11-14 10:00:05 -0800 |
commit | 7aa628033d3ac224876d5c0f84d8d546a0fb1507 (patch) | |
tree | 86f2e7006c3695274fda8f6de8792aaa19aced53 /tools/gswauth_functional_tests.sh | |
parent | b0497ce11d8d059d9b9a0f9651544c7725cd1d2e (diff) |
refactoring add/remove account and user tests
These tests cover account registration and de-registration
user creation/delete, and listing of both account and user.
Some functions were renamed to better represent their purpose
and make them generic enough to be used by other tests
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>
Reviewed-on: http://review.gluster.org/6257
Diffstat (limited to 'tools/gswauth_functional_tests.sh')
-rwxr-xr-x | tools/gswauth_functional_tests.sh | 47 |
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 |