From: Robin H. Johnson Date: Thu, 18 Jun 2015 04:41:09 +0000 (+0000) Subject: Fixup path stuff for redirect test. X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c053a96ef2d98081e3f0c09387d0a1a53bbfa8d2;p=s3-tests.git Fixup path stuff for redirect test. Signed-off-by: Robin H. Johnson --- diff --git a/s3tests/functional/test_s3_website.py b/s3tests/functional/test_s3_website.py index a7138584..ca6444df 100644 --- a/s3tests/functional/test_s3_website.py +++ b/s3tests/functional/test_s3_website.py @@ -547,12 +547,12 @@ def test_website_bucket_private_redirectall_path(): f = _test_website_prep(bucket, WEBSITE_CONFIGS_XMLFRAG['RedirectAll']) bucket.set_canned_acl('private') - pathfragment = choose_bucket_prefix(template='{random}', max_len=16) + pathfragment = choose_bucket_prefix(template='/{random}', max_len=16) - res = _website_request(bucket.name, '/'+pathfragment) + res = _website_request(bucket.name, pathfragment) # RGW returns "302 Found" per RFC2616 # S3 returns 302 Moved Temporarily per RFC1945 - new_url = 'http://%s/%s' % (f['RedirectAllRequestsTo_HostName'], pathfragment) + new_url = 'http://%s%s' % (f['RedirectAllRequestsTo_HostName'], pathfragment) _website_expected_redirect_response(res, 302, ['Found', 'Moved Temporarily'], new_url) bucket.delete() @@ -568,12 +568,12 @@ def test_website_bucket_private_redirectall_path_upgrade(): f = _test_website_prep(bucket, x) bucket.set_canned_acl('private') - pathfragment = choose_bucket_prefix(template='{random}', max_len=16) + pathfragment = choose_bucket_prefix(template='/{random}', max_len=16) - res = _website_request(bucket.name, pathfragment) + res = _website_request(bucket.name, +pathfragment) # RGW returns "302 Found" per RFC2616 # S3 returns 302 Moved Temporarily per RFC1945 - new_url = 'https://%s/%s' % (f['RedirectAllRequestsTo_HostName'], pathfragment) + new_url = 'https://%s%s' % (f['RedirectAllRequestsTo_HostName'], pathfragment) _website_expected_redirect_response(res, 302, ['Found', 'Moved Temporarily'], new_url) bucket.delete()