diff options
author | Qiaowei Ren <qiaowei.ren@intel.com> | 2018-01-04 13:43:33 +0800 |
---|---|---|
committer | Qiaowei Ren <qiaowei.ren@intel.com> | 2018-01-05 11:59:39 +0800 |
commit | 812ff6ca9fcd3e629e49d4328905f33eee8ca3f5 (patch) | |
tree | 04ece7b4da00d9d2f98093774594f4057ae561d4 /src/ceph/qa/workunits/rgw/run-s3tests.sh | |
parent | 15280273faafb77777eab341909a3f495cf248d9 (diff) |
initial code repo
This patch creates initial code repo.
For ceph, luminous stable release will be used for base code,
and next changes and optimization for ceph will be added to it.
For opensds, currently any changes can be upstreamed into original
opensds repo (https://github.com/opensds/opensds), and so stor4nfv
will directly clone opensds code to deploy stor4nfv environment.
And the scripts for deployment based on ceph and opensds will be
put into 'ci' directory.
Change-Id: I46a32218884c75dda2936337604ff03c554648e4
Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
Diffstat (limited to 'src/ceph/qa/workunits/rgw/run-s3tests.sh')
-rwxr-xr-x | src/ceph/qa/workunits/rgw/run-s3tests.sh | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/ceph/qa/workunits/rgw/run-s3tests.sh b/src/ceph/qa/workunits/rgw/run-s3tests.sh new file mode 100755 index 0000000..31c091e --- /dev/null +++ b/src/ceph/qa/workunits/rgw/run-s3tests.sh @@ -0,0 +1,82 @@ +#!/bin/bash -ex + +# run s3-tests from current directory. assume working +# ceph environment (radosgw-admin in path) and rgw on localhost:8000 +# (the vstart default). + +branch=$1 +[ -z "$1" ] && branch=master +port=$2 +[ -z "$2" ] && port=8000 # this is vstart's default + +## + +if [ -e CMakeCache.txt ]; then + BIN_PATH=$PWD/bin +elif [ -e $root_path/../build/CMakeCache.txt ]; then + cd $root_path/../build + BIN_PATH=$PWD/bin +fi +PATH=$PATH:$BIN_PATH + +dir=tmp.s3-tests.$$ + +# clone and bootstrap +mkdir $dir +cd $dir +git clone https://github.com/ceph/s3-tests +cd s3-tests +git checkout ceph-$branch +VIRTUALENV_PYTHON=/usr/bin/python2 ./bootstrap +cd ../.. + +# users +akey1=access1 +skey1=secret1 +radosgw-admin user create --uid=s3test1 --display-name='tester1' \ + --access-key=$akey1 --secret=$skey1 --email=tester1@ceph.com + +akey2=access2 +skey2=secret2 +radosgw-admin user create --uid=s3test2 --display-name='tester2' \ + --access-key=$akey2 --secret=$skey2 --email=tester2@ceph.com + +cat <<EOF > s3.conf +[DEFAULT] +## replace with e.g. "localhost" to run against local software +host = 127.0.0.1 +## uncomment the port to use something other than 80 +port = $port +## say "no" to disable TLS +is_secure = no +[fixtures] +## all the buckets created will start with this prefix; +## {random} will be filled with random characters to pad +## the prefix to 30 characters long, and avoid collisions +bucket prefix = s3testbucket-{random}- +[s3 main] +## the tests assume two accounts are defined, "main" and "alt". +## user_id is a 64-character hexstring +user_id = s3test1 +## display name typically looks more like a unix login, "jdoe" etc +display_name = tester1 +## replace these with your access keys +access_key = $akey1 +secret_key = $skey1 +email = tester1@ceph.com +[s3 alt] +## another user account, used for ACL-related tests +user_id = s3test2 +display_name = tester2 +## the "alt" user needs to have email set, too +email = tester2@ceph.com +access_key = $akey2 +secret_key = $skey2 +EOF + +S3TEST_CONF=`pwd`/s3.conf $dir/s3-tests/virtualenv/bin/nosetests -a '!fails_on_rgw' -v + +rm -rf $dir + +echo OK. + |