LoginSignup
0
0

More than 5 years have passed since last update.

s3test使用

Posted at

clone the project

git clone git@github.com:joke-lee/s3-tests.git

create the s3test.conf

#cat s3test.conf
[DEFAULT]
port = 80
host = eos-beijing-1.cmecloud.cn
is_secure = no

[fixtures]
bucket prefix = {random}

[s3 main]
user_id = s3test1
display_name = s3test1
access_key = s3test1
secret_key = s3test1
api_name = beijing2 #rgw_zonegroup

[s3 alt]
user_id = s3test2
display_name = s3test2
access_key = s3test2
secret_key = s3test2
email = s3test2@ceph.com
api_name = beijing2 #rgw_zonegroup


#cat s3test.https.conf
[DEFAULT]
port = 443
host = eos-beijing-1.cmecloud.cn
is_secure = yes

[fixtures]
bucket prefix = {random}

[s3 main]
user_id = s3test1
display_name = s3test1
access_key = s3test1
secret_key = s3test1
api_name = beijing2 #rgw_zonegroup

[s3 alt]
user_id = s3test2
display_name = s3test2
access_key = s3test2
secret_key = s3test2
email = s3test2@ceph.com
api_name = beijing2 #rgw_zonegroup

RUN

#v2 signature
S3TEST_CONF=./s3test.conf   ./virtualenv/bin/nosetests s3tests.functional.test_s3  -a '!fails_on_aws,!fails_on_rgw,!encryption,!tagging,!bucket-policy,!fails_on_rgw_jewel'  -v --with-html --html-report=/var/www/html/index.html --html-report-template=virtualenv/lib/python2.7/site-packages/nose_html_reporting/templates/report2.jinja2

#v4 signature
#setup dns
S3_USE_SIGV4=1 S3TEST_CONF=./s3test.conf   ./virtualenv/bin/nosetests s3tests.functional.test_s3  -a '!fails_on_aws,!fails_on_rgw,!encryption,!tagging,!bucket-policy,!fails_on_rgw_jewel'  -v --with-html --html-report=/var/www/html/index.html --html-report-template=virtualenv/lib/python2.7/site-packages/nose_html_reporting/templates/report2.jinja2

setup dns

#rgw ip 127.0.0.1
#rgw_dns_name = eos-beijing-1.cmecloud.cn
#rgw_dns_s3website_name = eos-website-beijing-1.cmecloud.cn
#rgw enable static website = true

yum -y install dnsmasq
cat > /etc/dnsmasq.conf << EOF
resolv-file=/etc/resolv.dnsmasq.conf
strict-order
resolv-file=/etc/dnsmasq.d/resolv.dnsmasq.conf
addn-hosts=/etc/dnsmasq.d/dnsmasq.hosts
address=/eos-beijing-1.cmecloud.cn/127.0.0.1
address=/*.eos-beijing-1.cmecloud.cn/127.0.0.1
address=/eos-website-beijing-1.cmecloud.cn/127.0.0.1
address=/*.eos-website-beijing-1.cmecloud.cn/127.0.0.1
EOF

systemctl restart dnsmasq
nslookup  eos-beijing-1.cmecloud.cn

GET RESULT

cd /var/www/html/
python -m SimpleHTTPServer 80

# open chrome and visit http://localhost/index.html

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0