Merge lp:~cthier/swift/swift3objpaths into lp:~hudson-openstack/swift/trunk

Proposed by Chuck Thier
Status: Merged
Approved by: Mike Barton
Approved revision: 288
Merged at revision: 287
Proposed branch: lp:~cthier/swift/swift3objpaths
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 33 lines (+1/-11)
2 files modified
swift/common/middleware/swift3.py (+1/-1)
test/unit/common/middleware/test_swift3.py (+0/-10)
To merge this branch: bzr merge lp:~cthier/swift/swift3objpaths
Reviewer Review Type Date Requested Status
Swift Core security contacts Pending
Review via email: mp+60119@code.launchpad.net

Description of the change

Fixes issue of swift3 middleware not working correctly with '/' in object names

To post a comment you must log in.
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (78.2 KiB)

The attempt to merge lp:~cthier/swift/swift3objpaths into lp:swift failed. Below is the output from the failed tests.

running test
running egg_info
creating swift.egg-info
writing swift.egg-info/PKG-INFO
writing top-level names to swift.egg-info/top_level.txt
writing dependency_links to swift.egg-info/dependency_links.txt
writing entry points to swift.egg-info/entry_points.txt
writing manifest file 'swift.egg-info/SOURCES.txt'
reading manifest file 'swift.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'ChangeLog'
writing manifest file 'swift.egg-info/SOURCES.txt'
running build_ext

UNABLE TO READ FUNCTIONAL TESTS CONFIG FILE
UNABLE TO READ FUNCTIONAL TESTS CONFIG FILE
SKIPPING FUNCTIONAL TESTS DUE TO NO CONFIG
testAccountHead (test.functional.tests.TestAccount) ... SKIP
testContainerListing (test.functional.tests.TestAccount) ... SKIP
testContainerSerializedInfo (test.functional.tests.TestAccount) ... SKIP
testContainersOrderedByName (test.functional.tests.TestAccount) ... SKIP
testInvalidAuthToken (test.functional.tests.TestAccount) ... SKIP
testInvalidPath (test.functional.tests.TestAccount) ... SKIP
testInvalidUTF8Path (test.functional.tests.TestAccount) ... SKIP
testLastContainerMarker (test.functional.tests.TestAccount) ... SKIP
testListingLimit (test.functional.tests.TestAccount) ... SKIP
testMarkerLimitContainerList (test.functional.tests.TestAccount) ... SKIP
testNoAuthToken (test.functional.tests.TestAccount) ... SKIP
testPUT (test.functional.tests.TestAccount) ... SKIP
testVersionOnlyPath (test.functional.tests.TestAccount) ... SKIP
testGetRequest (test.functional.tests.TestAccountNoContainers) ... SKIP
testGetRequest (test.functional.tests.TestAccountNoContainersUTF8) ... SKIP
testAccountHead (test.functional.tests.TestAccountUTF8) ... SKIP
testContainerListing (test.functional.tests.TestAccountUTF8) ... SKIP
testContainerSerializedInfo (test.functional.tests.TestAccountUTF8) ... SKIP
testContainersOrderedByName (test.functional.tests.TestAccountUTF8) ... SKIP
testInvalidAuthToken (test.functional.tests.TestAccountUTF8) ... SKIP
testInvalidPath (test.functional.tests.TestAccountUTF8) ... SKIP
testInvalidUTF8Path (test.functional.tests.TestAccountUTF8) ... SKIP
testLastContainerMarker (test.functional.tests.TestAccountUTF8) ... SKIP
testListingLimit (test.functional.tests.TestAccountUTF8) ... SKIP
testMarkerLimitContainerList (test.functional.tests.TestAccountUTF8) ... SKIP
testNoAuthToken (test.functional.tests.TestAccountUTF8) ... SKIP
testPUT (test.functional.tests.TestAccountUTF8) ... SKIP
testVersionOnlyPath (test.functional.tests.TestAccountUTF8) ... SKIP
testContainerExistenceCachingProblem (test.functional.tests.TestContainer) ... SKIP
testContainerFileList (test.functional.tests.TestContainer) ... SKIP
testContainerFileListOnContainerThatDoesNotExist (test.functional.tests.TestContainer) ... SKIP
testContainerFileListWithLimit (test.functional.tests.TestContainer) ... SKIP
testContainerInfo (test.functional.tests.TestContainer) ... SKIP
testContainerInfoOnContainerThatDoesNotExist (test.functional.tests.TestContainer) ... SKIP
testContainerNameLimit (test.functional.tests.Tes...

lp:~cthier/swift/swift3objpaths updated
288. By Chuck Thier

removed test that was incorrectly testing for a bad path

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'swift/common/middleware/swift3.py'
2--- swift/common/middleware/swift3.py 2011-04-16 17:32:51 +0000
3+++ swift/common/middleware/swift3.py 2011-05-05 21:03:33 +0000
4@@ -426,7 +426,7 @@
5 self.app = app
6
7 def get_controller(self, path):
8- container, obj = split_path(path, 0, 2)
9+ container, obj = split_path(path, 0, 2, True)
10 d = dict(container_name=container, object_name=obj)
11
12 if container and obj:
13
14=== modified file 'test/unit/common/middleware/test_swift3.py'
15--- test/unit/common/middleware/test_swift3.py 2011-04-16 06:02:01 +0000
16+++ test/unit/common/middleware/test_swift3.py 2011-05-05 21:03:33 +0000
17@@ -207,16 +207,6 @@
18 code = dom.getElementsByTagName('Code')[0].childNodes[0].nodeValue
19 self.assertEquals(code, 'InvalidArgument')
20
21- def test_bad_path(self):
22- req = Request.blank('/bucket/object/bad',
23- environ={'REQUEST_METHOD': 'GET'},
24- headers={'Authorization': 'AWS test:tester:hmac'})
25- resp = self.app(req.environ, start_response)
26- dom = xml.dom.minidom.parseString("".join(resp))
27- self.assertEquals(dom.firstChild.nodeName, 'Error')
28- code = dom.getElementsByTagName('Code')[0].childNodes[0].nodeValue
29- self.assertEquals(code, 'InvalidURI')
30-
31 def test_bad_method(self):
32 req = Request.blank('/',
33 environ={'REQUEST_METHOD': 'PUT'},