From 16b7d1680338bf82fbbe9235f83a438ed1b57c61 Mon Sep 17 00:00:00 2001 From: Thiago da Silva Date: Wed, 9 Jul 2014 08:54:56 -0400 Subject: [PATCH] removing unused files These files are no long in use by swiftonfile. - functional_auth/tempauth files are no longer required because tests now rely on a saio setup where tempauth is already used by default. - tools/functional_tests.sh has been replaced by .functests. - tools/tox_run.sh is no longer required, but swiftonfile now requires a saio setup and swiftonfile to be configured as a storage policy for testing. - test/unit/common/data/* files are also no longer in use. Signed-off-by: Thiago da Silva --- test/functional_auth/__init__.py | 0 .../tempauth/conf/account-server.conf | 32 ------ .../tempauth/conf/container-server.conf | 35 ------- test/functional_auth/tempauth/conf/fs.conf | 19 ---- .../tempauth/conf/object-expirer.conf | 17 ---- .../tempauth/conf/object-server.conf | 48 --------- .../tempauth/conf/proxy-server.conf | 75 --------------- test/functional_auth/tempauth/conf/swift.conf | 85 ---------------- test/functional_auth/tempauth/conf/test.conf | 50 ---------- test/unit/common/data/README.rings | 3 - test/unit/common/data/account.builder | Bin 566 -> 0 bytes test/unit/common/data/account.ring.gz | Bin 183 -> 0 bytes test/unit/common/data/account_tree.tar.bz2 | Bin 228 -> 0 bytes test/unit/common/data/container.builder | Bin 566 -> 0 bytes test/unit/common/data/container.ring.gz | Bin 184 -> 0 bytes test/unit/common/data/container_tree.tar.bz2 | Bin 282 -> 0 bytes test/unit/common/data/object.builder | Bin 566 -> 0 bytes test/unit/common/data/object.ring.gz | Bin 182 -> 0 bytes tools/functional_tests.sh | 83 ---------------- tools/tox_run.sh | 91 ------------------ 20 files changed, 538 deletions(-) delete mode 100644 test/functional_auth/__init__.py delete mode 100644 test/functional_auth/tempauth/conf/account-server.conf delete mode 100644 test/functional_auth/tempauth/conf/container-server.conf delete mode 100644 test/functional_auth/tempauth/conf/fs.conf delete mode 100644 test/functional_auth/tempauth/conf/object-expirer.conf delete mode 100644 test/functional_auth/tempauth/conf/object-server.conf delete mode 100644 test/functional_auth/tempauth/conf/proxy-server.conf delete mode 100644 test/functional_auth/tempauth/conf/swift.conf delete mode 100644 test/functional_auth/tempauth/conf/test.conf delete mode 100644 test/unit/common/data/README.rings delete mode 100644 test/unit/common/data/account.builder delete mode 100644 test/unit/common/data/account.ring.gz delete mode 100644 test/unit/common/data/account_tree.tar.bz2 delete mode 100644 test/unit/common/data/container.builder delete mode 100644 test/unit/common/data/container.ring.gz delete mode 100644 test/unit/common/data/container_tree.tar.bz2 delete mode 100644 test/unit/common/data/object.builder delete mode 100644 test/unit/common/data/object.ring.gz delete mode 100755 tools/functional_tests.sh delete mode 100755 tools/tox_run.sh diff --git a/test/functional_auth/__init__.py b/test/functional_auth/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/functional_auth/tempauth/conf/account-server.conf b/test/functional_auth/tempauth/conf/account-server.conf deleted file mode 100644 index 4996367..0000000 --- a/test/functional_auth/tempauth/conf/account-server.conf +++ /dev/null @@ -1,32 +0,0 @@ -[DEFAULT] -devices = /mnt/gluster-object -# -# Once you are confident that your startup processes will always have your -# gluster volumes properly mounted *before* the account-server workers start, -# you can *consider* setting this value to "false" to reduce the per-request -# overhead it can incur. -# -# *** Keep false for Functional Tests *** -mount_check = false -bind_port = 6012 -# -# Override swift's default behaviour for fallocate. -disable_fallocate = true -# -# One or two workers should be sufficient for almost any installation of -# Gluster. -workers = 1 - -[pipeline:main] -pipeline = account-server - -[app:account-server] -use = egg:gluster_swift#account -user = root -log_facility = LOG_LOCAL2 -log_level = WARN -# -# After ensuring things are running in a stable manner, you can turn off -# normal request logging for the account server to unclutter the log -# files. Warnings and errors will still be logged. -log_requests = off diff --git a/test/functional_auth/tempauth/conf/container-server.conf b/test/functional_auth/tempauth/conf/container-server.conf deleted file mode 100644 index 122d97e..0000000 --- a/test/functional_auth/tempauth/conf/container-server.conf +++ /dev/null @@ -1,35 +0,0 @@ -[DEFAULT] -devices = /mnt/gluster-object -# -# Once you are confident that your startup processes will always have your -# gluster volumes properly mounted *before* the container-server workers -# start, you can *consider* setting this value to "false" to reduce the -# per-request overhead it can incur. -# -# *** Keep false for Functional Tests *** -mount_check = false -bind_port = 6011 -# -# Override swift's default behaviour for fallocate. -disable_fallocate = true -# -# One or two workers should be sufficient for almost any installation of -# Gluster. -workers = 1 - -[pipeline:main] -pipeline = container-server - -[app:container-server] -use = egg:gluster_swift#container -user = root -log_facility = LOG_LOCAL2 -log_level = WARN -# -# After ensuring things are running in a stable manner, you can turn off -# normal request logging for the container server to unclutter the log -# files. Warnings and errors will still be logged. -log_requests = off - -#enable object versioning for functional test -allow_versions = on diff --git a/test/functional_auth/tempauth/conf/fs.conf b/test/functional_auth/tempauth/conf/fs.conf deleted file mode 100644 index b06a854..0000000 --- a/test/functional_auth/tempauth/conf/fs.conf +++ /dev/null @@ -1,19 +0,0 @@ -[DEFAULT] -# -# IP address of a node in the GlusterFS server cluster hosting the -# volumes to be served via Swift API. -mount_ip = localhost - -# Performance optimization parameter. When turned off, the filesystem will -# see a reduced number of stat calls, resulting in substantially faster -# response time for GET and HEAD container requests on containers with large -# numbers of objects, at the expense of an accurate count of combined bytes -# used by all objects in the container. For most installations "off" works -# fine. -# -# *** Keep on for Functional Tests *** -accurate_size_in_listing = on - -# *** Keep on for Functional Tests *** -container_update_object_count = on -account_update_container_count = on diff --git a/test/functional_auth/tempauth/conf/object-expirer.conf b/test/functional_auth/tempauth/conf/object-expirer.conf deleted file mode 100644 index b75963c..0000000 --- a/test/functional_auth/tempauth/conf/object-expirer.conf +++ /dev/null @@ -1,17 +0,0 @@ -[DEFAULT] - -[object-expirer] -# auto_create_account_prefix = . - -[pipeline:main] -pipeline = catch_errors cache proxy-server - -[app:proxy-server] -use = egg:swift#proxy - -[filter:cache] -use = egg:swift#memcache -memcache_servers = 127.0.0.1:11211 - -[filter:catch_errors] -use = egg:swift#catch_errors diff --git a/test/functional_auth/tempauth/conf/object-server.conf b/test/functional_auth/tempauth/conf/object-server.conf deleted file mode 100644 index 3cb9ead..0000000 --- a/test/functional_auth/tempauth/conf/object-server.conf +++ /dev/null @@ -1,48 +0,0 @@ -[DEFAULT] -devices = /mnt/gluster-object -# -# Once you are confident that your startup processes will always have your -# gluster volumes properly mounted *before* the object-server workers start, -# you can *consider* setting this value to "false" to reduce the per-request -# overhead it can incur. -# -# *** Keep false for Functional Tests *** -mount_check = false -bind_port = 6010 -# -# Maximum number of clients one worker can process simultaneously (it will -# actually accept N + 1). Setting this to one (1) will only handle one request -# at a time, without accepting another request concurrently. By increasing the -# number of workers to a much higher value, one can prevent slow file system -# operations for one request from starving other requests. -max_clients = 1024 -# -# If not doing the above, setting this value initially to match the number of -# CPUs is a good starting point for determining the right value. -workers = 1 -# Override swift's default behaviour for fallocate. -disable_fallocate = true - -[pipeline:main] -pipeline = object-server - -[app:object-server] -use = egg:gluster_swift#object -user = root -log_facility = LOG_LOCAL2 -log_level = WARN -# -# For performance, after ensuring things are running in a stable manner, you -# can turn off normal request logging for the object server to reduce the -# per-request overhead and unclutter the log files. Warnings and errors will -# still be logged. -log_requests = off -# -# Adjust this value to match the stripe width of the underlying storage array -# (not the stripe element size). This will provide a reasonable starting point -# for tuning this value. -disk_chunk_size = 65536 -# -# Adjust this value match whatever is set for the disk_chunk_size initially. -# This will provide a reasonable starting point for tuning this value. -network_chunk_size = 65556 diff --git a/test/functional_auth/tempauth/conf/proxy-server.conf b/test/functional_auth/tempauth/conf/proxy-server.conf deleted file mode 100644 index bcb3da9..0000000 --- a/test/functional_auth/tempauth/conf/proxy-server.conf +++ /dev/null @@ -1,75 +0,0 @@ -[DEFAULT] -bind_port = 8080 -user = root -# Consider using 1 worker per CPU -workers = 1 - -[pipeline:main] -pipeline = catch_errors healthcheck proxy-logging cache tempurl tempauth proxy-logging proxy-server - -[app:proxy-server] -use = egg:gluster_swift#proxy -log_facility = LOG_LOCAL1 -log_level = WARN -# The API allows for account creation and deletion, but since Gluster/Swift -# automounts a Gluster volume for a given account, there is no way to create -# or delete an account. So leave this off. -allow_account_management = false -account_autocreate = true -# Ensure the proxy server uses fast-POSTs since we don't need to make a copy -# of the entire object given that all metadata is stored in the object -# extended attributes (no .meta file used after creation) and no container -# sync feature to present. -object_post_as_copy = false -# Only need to recheck the account exists once a day -recheck_account_existence = 86400 -# May want to consider bumping this up if containers are created and destroyed -# infrequently. -recheck_container_existence = 60 -# Timeout clients that don't read or write to the proxy server after 5 -# seconds. -client_timeout = 5 -# Give more time to connect to the object, container or account servers in -# cases of high load. -conn_timeout = 5 -# For high load situations, once connected to an object, container or account -# server, allow for delays communicating with them. -node_timeout = 60 -# May want to consider bumping up this value to 1 - 4 MB depending on how much -# traffic is for multi-megabyte or gigabyte requests; perhaps matching the -# stripe width (not stripe element size) of your storage volume is a good -# starting point. See below for sizing information. -object_chunk_size = 65536 -# If you do decide to increase the object_chunk_size, then consider lowering -# this value to one. Up to "put_queue_length" object_chunk_size'd buffers can -# be queued to the object server for processing. Given one proxy server worker -# can handle up to 1,024 connections, by default, it will consume 10 * 65,536 -# * 1,024 bytes of memory in the worse case (default values). Be sure the -# amount of memory available on the system can accommodate increased values -# for object_chunk_size. -put_queue_depth = 10 - -[filter:catch_errors] -use = egg:swift#catch_errors - -[filter:proxy-logging] -use = egg:swift#proxy_logging - -[filter:healthcheck] -use = egg:swift#healthcheck - -[filter:tempauth] -use = egg:swift#tempauth -user_admin_admin = admin .admin .reseller_admin -user_test_tester = testing .admin -user_test2_tester2 = testing2 .admin -user_test_tester3 = testing3 - -[filter:cache] -use = egg:swift#memcache -# Update this line to contain a comma separated list of memcache servers -# shared by all nodes running the proxy-server service. -memcache_servers = localhost:11211 - -[filter:tempurl] -use = egg:swift#tempurl diff --git a/test/functional_auth/tempauth/conf/swift.conf b/test/functional_auth/tempauth/conf/swift.conf deleted file mode 100644 index ce9a4d0..0000000 --- a/test/functional_auth/tempauth/conf/swift.conf +++ /dev/null @@ -1,85 +0,0 @@ -[DEFAULT] - - -[swift-hash] -# random unique string that can never change (DO NOT LOSE) -swift_hash_path_suffix = gluster - - -# The swift-constraints section sets the basic constraints on data -# saved in the swift cluster. - -[swift-constraints] - -# max_file_size is the largest "normal" object that can be saved in -# the cluster. This is also the limit on the size of each segment of -# a "large" object when using the large object manifest support. -# This value is set in bytes. Setting it to lower than 1MiB will cause -# some tests to fail. -# Default is 1 TiB = 2**30*1024 -max_file_size = 1099511627776 - - -# max_meta_name_length is the max number of bytes in the utf8 encoding -# of the name portion of a metadata header. - -#max_meta_name_length = 128 - - -# max_meta_value_length is the max number of bytes in the utf8 encoding -# of a metadata value - -#max_meta_value_length = 256 - - -# max_meta_count is the max number of metadata keys that can be stored -# on a single account, container, or object - -#max_meta_count = 90 - - -# max_meta_overall_size is the max number of bytes in the utf8 encoding -# of the metadata (keys + values) - -#max_meta_overall_size = 4096 - - -# max_object_name_length is the max number of bytes in the utf8 encoding of an -# object name: Gluster FS can handle much longer file names, but the length -# between the slashes of the URL is handled below. Remember that most web -# clients can't handle anything greater than 2048, and those that do are -# rather clumsy. - -max_object_name_length = 2048 - -# max_object_name_component_length (GlusterFS) is the max number of bytes in -# the utf8 encoding of an object name component (the part between the -# slashes); this is a limit imposed by the underlying file system (for XFS it -# is 255 bytes). - -max_object_name_component_length = 255 - -# container_listing_limit is the default (and max) number of items -# returned for a container listing request - -#container_listing_limit = 10000 - - -# account_listing_limit is the default (and max) number of items returned -# for an account listing request - -#account_listing_limit = 10000 - - -# max_account_name_length is the max number of bytes in the utf8 encoding of -# an account name: Gluster FS Filename limit (XFS limit?), must be the same -# size as max_object_name_component_length above. - -max_account_name_length = 255 - - -# max_container_name_length is the max number of bytes in the utf8 encoding -# of a container name: Gluster FS Filename limit (XFS limit?), must be the same -# size as max_object_name_component_length above. - -max_container_name_length = 255 diff --git a/test/functional_auth/tempauth/conf/test.conf b/test/functional_auth/tempauth/conf/test.conf deleted file mode 100644 index 55cb07d..0000000 --- a/test/functional_auth/tempauth/conf/test.conf +++ /dev/null @@ -1,50 +0,0 @@ -[func_test] -# sample config -auth_host = 127.0.0.1 -auth_port = 8080 -auth_ssl = no -auth_prefix = /auth/ -## sample config for Swift with Keystone -#auth_version = 2 -#auth_host = localhost -#auth_port = 5000 -#auth_ssl = no -#auth_prefix = /v2.0/ - -# Primary functional test account (needs admin access to the account) -account = test -username = tester -password = testing - -# User on a second account (needs admin access to the account) -account2 = test2 -username2 = tester2 -password2 = testing2 - -# User on same account as first, but without admin access -username3 = tester3 -password3 = testing3 - -# Default constraints if not defined here, the test runner will try -# to set them from /etc/swift/swift.conf. If that file isn't found, -# the test runner will skip tests that depend on these values. -# Note that the cluster must have "sane" values for the test suite to pass. -#max_file_size = 5368709122 -#max_meta_name_length = 128 -#max_meta_value_length = 256 -#max_meta_count = 90 -#max_meta_overall_size = 4096 -#max_object_name_length = 1024 -#container_listing_limit = 10000 -#account_listing_limit = 10000 -#max_account_name_length = 256 -#max_container_name_length = 256 -normalized_urls = True - -collate = C - -[unit_test] -fake_syslog = False - -[probe_test] -# check_server_timeout = 30 diff --git a/test/unit/common/data/README.rings b/test/unit/common/data/README.rings deleted file mode 100644 index 4ff802e..0000000 --- a/test/unit/common/data/README.rings +++ /dev/null @@ -1,3 +0,0 @@ -The unit tests expect certain ring data built using the following command: - - ../../../../bin/gluster-swift-gen-builders test iops diff --git a/test/unit/common/data/account.builder b/test/unit/common/data/account.builder deleted file mode 100644 index c3c0a33d1b67f932ea25881f269ef9850df42aba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmZXROHaZ;5XakE5D*o7;rsolnh@pUQR4+-<3W=-cxakUnb0QCc6JLyBZ(&yKc!#6 zkKk?rgSwmSVRq*K|IN&sF(BQ7=^krisrOvr$WcA_2%%6N=(_FNdglm-3Pp=rz3Yz^NZDF z7_|I^7V9@pqh5?4rX|Q<)~>1-@?O$1WI47}|0}Y>2%1!pJ{g56lz0adMysGfR@wv} z(i)fviiFmom?pV>7ADw~MP?jH%#HikN_Rk;V~{O5)-lNTZ;+iykli1UJ>{Ef?Mtn{ zEC&-ThhPR#Ea>PTi)!T9*1HHrH6GXVS=hoRoqUY+$dX(u6SGb?>0%stKAqk*_CFt> QD7U7@P6yOdQc6^^7d zLu4DwZmns6cQ=;@Hko5sGVxY}A+@*(gC`9no(`v(m!K(1#w&R4fYQp}N(?c5E8#Dd lrkpuAEV)lJUie}IH5{*Khu(&}udza}5g*nEEjA`&3}n+FWYEYmG{B4zM1pCPDWgoDkZ9Q>)X{9V69kx`>?0MZEex zlWYrRBugMEShdBfb0MXumSQnI20*w-v9_D)tYsbWzQ~;cvQT!7(6J3xH^hvj&)I~0$BqqZ#V4P$682L=lSmW|j%MX-O#xpNXddSIi zbf|cbOvr$Wwv#RjD)@|Z_Ei3UsR;VDOC{UU91Y*@X&kEFK)9}|>H&6X!liO3Gn+0= zs!UyFS`2C<>MfRq$UTwCBARkEm~Kb$w{e(sxS(l?V@fqaGcHx^K2>cnpOYAAR{j)w z7`4KT<{DQIgIkwq)H^}BF$kq?Yw(`xjcBIx{ zmfaDSJussr6}114MKyBZ=p6)0jmPst7Pl~7;Y|1wOp7UH||9 diff --git a/test/unit/common/data/container.ring.gz b/test/unit/common/data/container.ring.gz deleted file mode 100644 index 269a1eb79b5f45ef0cbf58f395fed716b0bff324..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 184 zcmV;p07w5HiwFqxDuhh}|6^}%bYW?3WpXZZX>Ml#wU9vy!Y~j;(@VGxSr^GvQ1Alo zT(}h}A&u>TCLxImO78AV1@QthoA>|B=ffOezY~oR&Elm7ch71ok29fl#HzSlR4Ww@ zq%=ch8@kO>(*W0A6Q22E^$EudTGQKb^K-1yXT%$~u<(&20RRBLOH)w* diff --git a/test/unit/common/data/container_tree.tar.bz2 b/test/unit/common/data/container_tree.tar.bz2 deleted file mode 100644 index b4a14928570e4ebc4791496a45c09eff0fb0a5ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 282 zcmV+#0p zo+VhMPA_wn84_HD1>2!iJD2!pJ(ac~!2<&7OG4U#r*mBd7icKOQo8F@io(@fDRr^M zeQbu=L@Q+#Vq4}|vuj`lEf`GQ8xd+41cq6t95?{tkhvqdlXQ&ik1Zoe=^uwQHFY6` gIzq@>9dtujWQHhf4PldXl7EZ2BAh5l6Pa8gfQK@3DgXcg diff --git a/test/unit/common/data/object.builder b/test/unit/common/data/object.builder deleted file mode 100644 index b5bdda92f6f3402e11a10fb3022e96e829fd7579..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmZXROH0E*5XX}k`?5ajqxJoMM1^8|@u+yI8ayb>!9xg3Iy8Yc$?T>r77CsOKc!#6 zkKk@vrRpy1VRq*K|IN&+F(loBY!A5zqL2*RfE>rT9e7O8RO9MXOAi!c#uGP=`pC(& zby#rQOvr$WcA_2%n)Vpy?4>YzDFgbALs`q#Yz^O@CMr^(OWx?@+;)nYRwj zShhaOEHbD}sJB?+BX>n2i)hx?V6GE{BV#}6azS$v$CPS<<{etFhE%e^97G|~qWsD9 zF=+V-Ej6y6$GsRqOv{k3)i0|T^44etG8|i~|FWzwf+kg@&$Pl6O1y&!qgBu#BW(f? zX${N-MMCRPOq1L`3lnV0A~TL8=ElRI(jC&~H^`P8>o>^uZ;+iykli1UJ>{Ef?Mtn{ zEC&-ThhPR#Ea>PTi)!T9*1HHrH6GXVS=hoRoxG3r$dX*;iCL$cbTN)RpHA=Z_CFq> QD7U7t<8 diff --git a/test/unit/common/data/object.ring.gz b/test/unit/common/data/object.ring.gz deleted file mode 100644 index 1c8199ae48f7e28c44db06d6bfa2d4d454857a6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 182 zcmV;n07?HJiwFqxDuhh}|8HVyWn*+Ma%pa70JV@o3c@fDMbk^T4p|q;R8a5&?z(U* zQbHQr0c}DO6_niFnJmN$$ZX#KGoKH0g#I8JA)3`&jqZ`uUY;tUb;K&WlvOJgj-)h0 zU>myKTGIgUZY~=(nS+m+c&mYrqnpq#q=CfK;WYCSG)2jH`Gq^6wDPwSeMsL*_)BG1 k&Kxu`4{62=Uu>X;!xgO=tiLZcR_Hb215ieOG9&>20E1poegFUf diff --git a/tools/functional_tests.sh b/tools/functional_tests.sh deleted file mode 100755 index 3b1b285..0000000 --- a/tools/functional_tests.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This program expects to be run by tox in a virtual python environment -# so that it does not pollute the host development system - -sudo_env() -{ - sudo bash -c "PATH=$PATH $*" -} - -cleanup() -{ - sudo service memcached stop - sudo_env swift-init main stop - sudo rm -rf /etc/swift > /dev/null 2>&1 - sudo rm -rf /mnt/swiftonfile/test{,2}/* > /dev/null 2>&1 - sudo setfattr -x user.swift.metadata /mnt/swiftonfile/test{,2} > /dev/null 2>&1 -} - -quit() -{ - echo "$1" - exit 1 -} - - -fail() -{ - 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." -fi - -# Check the directories exist -DIRS="/mnt/swiftonfile /mnt/swiftonfile/test /mnt/swiftonfile/test2" -for d in $DIRS ; do - 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/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" - -# 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 -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" - -cleanup -exit 0 diff --git a/tools/tox_run.sh b/tools/tox_run.sh deleted file mode 100755 index 0499690..0000000 --- a/tools/tox_run.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -# 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. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This program expects to be run by tox in a virtual python environment -# so that it does not pollute the host development system - -sudo_env() -{ - sudo bash -c "PATH=$PATH $*" -} - -cleanup() -{ - sudo service memcached stop - sudo_env swift-init main stop - sudo rm -rf /etc/swift > /dev/null 2>&1 - sudo rm -rf /mnt/gluster-object/test{,2}/* > /dev/null 2>&1 - sudo setfattr -x user.swift.metadata /mnt/gluster-object/test{,2} > /dev/null 2>&1 - gswauth_cleanup -} - -gswauth_cleanup() -{ - sudo rm -rf /mnt/gluster-object/gsmetadata/.* > /dev/null 2>&1 - sudo rm -rf /mnt/gluster-object/gsmetadata/* > /dev/null 2>&1 - sudo setfattr -x user.swift.metadata /mnt/gluster-object/gsmetadata > /dev/null 2>&1 -} - -quit() -{ - echo "$1" - exit 1 -} - - -fail() -{ - 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." -fi - -# Check the directories exist -DIRS="/mnt/gluster-object /mnt/gluster-object/test /mnt/gluster-object/test2 /mnt/gluster-object/gsmetadata" -for d in $DIRS ; do - 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/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" - -# Start the services -sudo service memcached start || fail "Unable to start memcached" -sudo_env swift-init main start || fail "Unable to start swift" - -#swauth-prep -sudo_env gswauth-prep -K gswauthkey || fail "Unable to prep gswauth" -sudo_env gswauth-add-user -K gswauthkey -a test tester testing || fail "Unable to add user test" -sudo_env gswauth-add-user -K gswauthkey -a test2 tester2 testing2 || fail "Unable to add user test2" -sudo_env gswauth-add-user -K gswauthkey test tester3 testing3 || fail "Unable to add user test3" - -# open the shell to the user -bash --norc -i -cleanup -exit 0