diff options
author | Thiago da Silva <thiago@redhat.com> | 2014-04-22 14:15:02 -0400 |
---|---|---|
committer | Prashanth Pai <ppai@redhat.com> | 2016-01-06 07:53:12 -0800 |
commit | 2a8f9f0f530327039c32e444b6a27130b12666bd (patch) | |
tree | e24e38b5b3c0245a0acafc63fc50bacbf7de718a /tools | |
parent | 4c6ca1db931377b75583f61a7bca262cfc27b0fa (diff) |
Update repo
This is a squashed commit imported from this repo:
https://github.com/openstack/swiftonfile/tree/icehouse
Contains the follwing commits from above mentioned repo:
eb50236 Merge "Backport: Fix metadata overall limits bug" into icehouse
79ea52a Backport: Fix metadata overall limits bug
bc43f0b Fix inconsistent data being returned on GET
ad0bb79 Import HTTPBadRequest from swift's module
74d02e6 Exclude .trashcan dir from container listing
b2dbc15 Catch ESTALE in addition to ENOENT
8d60b48 Properly handle read_metadata() exceptions
6762fc6 Fix object server leaking file descriptors
2842e82 Fix API incompatibility in update_metadata()
2beeef6 Merge "Remove swiftkerbauth code" into icehouse
93dbcb5 Update object-expirer.conf with explanations
c9d2f09 Merge "Check if /etc/swift exists in ring builder" into icehouse
d66c14c Remove swiftkerbauth code
3142ed2 Add object expiration functests
97153d1 Merge "Cleanup functest and undo old patch" into icehouse
bc234d0 Remove old travis config file and fix typo
260c8ef Check if /etc/swift exists in ring builder
637dac9 Cleanup functest and undo old patch
051e068 Merge pull request #35 from prashanthpai/backport-1
be104a3 Merge pull request #36 from prashanthpai/backport-2
ff76f42 fix issue with GET on large object (icehouse-backport)
04d0a99 Fix unlink call after successful rename
4c6ca1d updating README file with project name change
10b2680 Merge pull request #18 from thiagol11/icehouse
5bcab8f Updating version on __init__ file
5c2cba2 Merge pull request #15 from thiagol11/update_spec
52b00a8 updating spec file to add dependency on swift icehouse
ae7c93b Merge pull request #6 from prashanthpai/rebase
191e55b Revert: allow non-root user to run functests
cb7e968 Modify unit tests and func tests
d23fd1b Sync with OpenStack Swift v1.13.1
b6d1671 Merge pull request #12 from pushpesh/functionalnosetestremove
962622b Merge pull request #8 from thiagol11/update_readme
4560857 Merge pull request #9 from prashanthpai/spec-expirer
be0ae7e Minor update
65000f1 Removing functionalnosetests
8ab1069 Fix object-expirer.conf-gluster RPM build error
afee30f added new support filesystem section
527b01f updated README.md to Swift-On-File
9a240c7 Merge pull request #3 from thiagol11/add_jenkins_to_travis
34b5a8b removing blank lines
3568b64 fixing missing fi
d8f5b0f adding support to run jenkins triggered by travis
6f4a88c Removing functionalnosetests
8041944 Update README.md
c015148 Merge pull request #2 from thiagol11/master
3ddd952 fixing travis file to run correct unit test
c582669 adding travis status badge to README
8093096 adding py26 unit testing to travis
37835fd trigger travis build
cb6332a adding travis ci testing
All tests have been run sucessfully against this.
tox -e p2p8,py27,functest
Change-Id: I096b611da852d3eb3913844034b443b8272c2ac4
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/13188
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gswauth_functional_tests.sh | 13 | ||||
-rwxr-xr-x | tools/keystone_functional_tests.sh | 6 | ||||
-rwxr-xr-x | tools/object_expirer_functional.sh (renamed from tools/swkrbath_functional_tests.sh) | 53 | ||||
-rw-r--r-- | tools/requirements.txt | 7 | ||||
-rwxr-xr-x | tools/tempauth_functional_tests.sh (renamed from tools/functional_tests.sh) | 9 | ||||
-rw-r--r-- | tools/test-requires | 12 |
6 files changed, 38 insertions, 62 deletions
diff --git a/tools/gswauth_functional_tests.sh b/tools/gswauth_functional_tests.sh index dbe2248..287a20a 100755 --- a/tools/gswauth_functional_tests.sh +++ b/tools/gswauth_functional_tests.sh @@ -50,7 +50,7 @@ quit() fail() { cleanup - quit "$1" + quit "$1" } run_generic_tests() @@ -66,9 +66,9 @@ run_generic_tests() nosetests -v --exe \ --with-xunit \ - --xunit-file functional_tests/gluster-swift-gswauth-generic-functional-TC-report.xml \ + --xunit-file functional_tests_result/gluster-swift-gswauth-generic-functional-TC-report.xml \ --with-html-output \ - --html-out-file functional_tests/gluster-swift-gswauth-generic-functional-result.html \ + --html-out-file functional_tests_result/gluster-swift-gswauth-generic-functional-result.html \ test/functional || fail "Functional tests failed" } @@ -91,6 +91,7 @@ export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf # Install the configuration files sudo mkdir /etc/swift > /dev/null 2>&1 +sudo cp -r test/functional_auth/common_conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" sudo cp -r test/functional_auth/gswauth/conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" sudo_env gluster-swift-gen-builders test test2 gsmetadata || fail "Unable to create ring files" @@ -101,12 +102,12 @@ sudo_env swift-init main start || fail "Unable to start swift" #swauth-prep sudo_env gswauth-prep -K gswauthkey || fail "Unable to prep gswauth" -mkdir functional_tests > /dev/null 2>&1 +mkdir functional_tests_result > /dev/null 2>&1 nosetests -v --exe \ --with-xunit \ - --xunit-file functional_tests/gluster-swift-gswauth-functional-TC-report.xml \ + --xunit-file functional_tests_result/gluster-swift-gswauth-functional-TC-report.xml \ --with-html-output \ - --html-out-file functional_tests/gluster-swift-gswauth-functional-result.html \ + --html-out-file functional_tests_result/gluster-swift-gswauth-functional-result.html \ test/functional_auth/gswauth || fail "Functional gswauth test failed" run_generic_tests diff --git a/tools/keystone_functional_tests.sh b/tools/keystone_functional_tests.sh index 620bcc7..b5aa25a 100755 --- a/tools/keystone_functional_tests.sh +++ b/tools/keystone_functional_tests.sh @@ -87,15 +87,15 @@ sudo_env gluster-swift-gen-builders $accounts || fail "Unable to create ring fil sudo service memcached start || fail "Unable to start memcached" sudo_env swift-init main start || fail "Unable to start swift" -mkdir functional_tests > /dev/null 2>&1 +mkdir functional_tests_result > /dev/null 2>&1 echo "== Keystone: Generic Functional Tests ==" nosetests -v --exe \ --with-xunit \ - --xunit-file functional_tests/gluster-swift-keystone-generic-functional-TC-report.xml \ + --xunit-file functional_tests_result/gluster-swift-keystone-generic-functional-TC-report.xml \ --with-html-output \ - --html-out-file functional_tests/gluster-swift-keystone-generic-functional-result.html \ + --html-out-file functional_tests_result/gluster-swift-keystone-generic-functional-result.html \ test/functional || fail "Functional tests failed" cleanup diff --git a/tools/swkrbath_functional_tests.sh b/tools/object_expirer_functional.sh index 9995f1d..2578619 100755 --- a/tools/swkrbath_functional_tests.sh +++ b/tools/object_expirer_functional.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2014 Red Hat, Inc. +# Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,69 +28,60 @@ cleanup() sudo service memcached stop sudo_env swift-init main stop sudo rm -rf /etc/swift > /dev/null 2>&1 - for acct in /mnt/gluster-object/* ; do - sudo rm -rf /mnt/gluster-object/${acct}/* > /dev/null 2>&1 - sudo setfattr -x user.swift.metadata /mnt/gluster-object/${acct} > /dev/null 2>&1 - done + sudo rm -rf /mnt/gluster-object/test{,2}/* > /dev/null 2>&1 + sudo rm -rf /mnt/gluster-object/gsexpiring/* > /dev/null 2>&1 + sudo setfattr -x user.swift.metadata /mnt/gluster-object/test{,2} > /dev/null 2>&1 } quit() { - echo "$1" - exit 1 + echo "$1" + exit 1 } fail() { - cleanup - quit "$1" + cleanup + quit "$1" } ### MAIN ### # Only run if there is no configuration in the system if [ -x /etc/swift ] ; then - quit "/etc/swift exists, cannot run functional tests." + quit "/etc/swift exists, cannot run functional tests." fi # Check the directories exist -DIRS="/mnt/gluster-object /mnt/gluster-object/test /mnt/gluster-object/test2 /mnt/gluster-object/gsmetadata" +DIRS="/mnt/gluster-object /mnt/gluster-object/test /mnt/gluster-object/test2 /mnt/gluster-object/gsexpiring" for d in $DIRS ; do - if [ ! -x $d ] ; then - quit "$d must exist on an XFS or GlusterFS volume" - fi + if [ ! -x $d ] ; then + quit "$d must exist on an XFS or GlusterFS volume" + fi done export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf # Install the configuration files sudo mkdir /etc/swift > /dev/null 2>&1 -sudo cp -r test/functional_auth/swiftkerbauth/conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" +sudo cp -r test/functional_auth/common_conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" +sudo cp -r test/functional_auth/tempauth/conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" +sudo_env gluster-swift-gen-builders gsexpiring test || fail "Unable to create ring files" -# Create the ring files -accounts="" -for acct in /mnt/gluster-object/* ; do - acct=`basename $acct` - accounts="$acct $accounts" -done -sudo_env gluster-swift-gen-builders $accounts || fail "Unable to create ring files" +# Remove old files +sudo rm -rf /mnt/gluster-object/test* > /dev/null 2>&1 +sudo rm -rf /mnt/gluster-object/gsexpiring/* > /dev/null 2>&1 # Start the services sudo service memcached start || fail "Unable to start memcached" sudo_env swift-init main start || fail "Unable to start swift" -mkdir functional_tests > /dev/null 2>&1 - -echo "== SwiftKerbAuth: Functional Tests ==" - +echo "Running functional tests with tempauth" +mkdir functional_tests > /dev/null 2>&1 nosetests -v --exe \ - --with-xunit \ - --xunit-file functional_tests/gluster-swift-swiftkerbauth-generic-functional-TC-report.xml \ - --with-html-output \ - --html-out-file functional_tests/gluster-swift-swiftkerbauth-generic-functional-result.html \ - test/functional_auth/swiftkerbauth || fail "Functional tests failed" + test/object_expirer_functional || fail "Object expirer functional tests failed" cleanup exit 0 diff --git a/tools/requirements.txt b/tools/requirements.txt deleted file mode 100644 index bbac51a..0000000 --- a/tools/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -dnspython>=1.9.4 -eventlet>=0.9.15 -greenlet>=0.3.1 -netifaces>=0.5 -pastedeploy>=1.3.3 -simplejson>=2.0.9 -xattr>=0.4 diff --git a/tools/functional_tests.sh b/tools/tempauth_functional_tests.sh index 94d5d9b..f237f3e 100755 --- a/tools/functional_tests.sh +++ b/tools/tempauth_functional_tests.sh @@ -64,6 +64,7 @@ export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf # Install the configuration files sudo mkdir /etc/swift > /dev/null 2>&1 +sudo cp -r test/functional_auth/common_conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" sudo cp -r test/functional_auth/tempauth/conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift" sudo_env gluster-swift-gen-builders test test2 || fail "Unable to create ring files" @@ -71,13 +72,15 @@ sudo_env gluster-swift-gen-builders test test2 || fail "Unable to create ring fi sudo service memcached start || fail "Unable to start memcached" sudo_env swift-init main start || fail "Unable to start swift" +echo "Running functional tests with tempauth" + mkdir functional_tests > /dev/null 2>&1 nosetests -v --exe \ --with-xunit \ --xunit-file functional_tests/gluster-swift-generic-functional-TC-report.xml \ - --with-html-output \ - --html-out-file functional_tests/gluster-swift-generic-functional-result.html \ - test/functional || fail "Functional tests failed" + --with-html-output \ + --html-out-file functional_tests/gluster-swift-generic-functional-result.html \ + test/functional || fail "Functional tests failed" cleanup exit 0 diff --git a/tools/test-requires b/tools/test-requires deleted file mode 100644 index 63d499e..0000000 --- a/tools/test-requires +++ /dev/null @@ -1,12 +0,0 @@ -# Hacking already pins down pep8, pyflakes and flake8 -hacking>=0.5.6,<0.6 -coverage -nose -nosexcover -openstack.nose_plugin -nosehtmloutput -sphinx>=1.1.2,<1.2 -mock>=0.8.0 -python-swiftclient -python-keystoneclient -prettytable |