4f617f49b6d854a0073525da5da7e9b97f0b6fa7
39 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Jenkins
|
f9b49a8052 | Merge "Remove utf-8 in metadata and http header names" | ||
|
Jenkins
|
63a564e6ca | Merge "Two MIME types sent during test" | ||
|
David Hadas
|
56e757257e |
Remove utf-8 in metadata and http header names
RFC2616 implicitly allows transferring utf-8 in headers (vals) but not in header names (keys) Swift functional tests includes testing for utf-8 header names (keys) which is non aligned with the standard. This seem to be the case when testing file metadata. File metadata keys are than transferred as part of the http header keys (header names) as X-Object-Meta-<metadata_key>=metadata_name. As a result metadata_keys in swift must be composed from a subset of ASCII characters - alpha numerics, some punctuation, not a lot else* and cannot be utf-8. On branch bp/wsgi-application-interface-4 modified: test/functional/tests.py Change-Id: I1932e9d4ead83089e8a31a06d28a54f5625efb9c Fixes: bug 1068026 Implements: blueprint wsgi-application-interface |
||
|
David Hadas
|
d5cdbbe0ea |
Two MIME types sent during test
The directory tests TestContainerPathsEnv creates directorys during SetUp while indicating duplicate application internet media type (MIME) via the Content-Type header. E.g the output on the line using 'nosetests -v test.functional.tests:TestContainerPaths.testContainerListing' includes: Host: 127.0.0.1:8080 Accept-Encoding: identity Content-Type: application/octet-stream Content-Length: 0 content-type: application/directory X-Auth-Token: AUTH_tkd40f5550289d4d60af75bb1b6c6067be On branch bp/wsgi-application-interface-3 modified: test/functional/tests.py Fixes: Bug #1068499 Implements Blueprint wsgi-application-interface Change-Id: I49c5d1f73fff3c06d4be18b20c7209eff4e1326c |
||
|
David Hadas
|
2531df96a0 |
Fixes Ilegal chunk encoding by the test_client
test_client sends a wrong size indication when testing chunked data. For example instead of sending: 5\r\nabcde\r\n (which is inline with the standard) The client would send: 0x5\r\nabcde\r\n On branch bp/wsgi-application-interface-2 modified: test/functional/swift_test_client.py Change-Id: I7597dcd24adade009aead66f67674f361f3fe4fa Fixes: Bug #1070036 Implements: Blueprint wsgi-application-interface |
||
|
Tom Fifield
|
9344a4a582 |
Random pep8 fixes!
This patch merely fixes a selection of files to the point where pep8 1.3.3 is happy. Most of the errors are indentation related to continued lines (E126, E127, E128), bracket positions (E124) and the use of backslash (E502). Patch 2 fixes David's comments regarding backslash and an odd comment - thanks David! Change-Id: I4fbd77ecf5395743cb96acb95fa946c322c16560 |
||
|
Darrell Bishop
|
e2b03267fd |
Fix two edge cases with Range: header
This fixes swob to handle "Range: bytes=-X" where X > len(content); ex. "Range: bytes=-17" when the object has 10 bytes. Based on the RFC, the range is satisfiable and all bytes should be returned. It also fixes "Range: bytes=-0" to be, correctly, not satisfiable. In addition, this case's response has Content-Length: 0 and has a zero-byte body. It also fixes an existing regression in swob for the case "Range: bytes=100-" for a body of length < 100 (Content-Length was negative and the body was returned). The relevant RFC is 2616, section 14.35.1. Change-Id: Ib3dc672e083173eb970c10801283813623f26e0e |
||
|
Michael Barton
|
5e3e9a882d |
local WSGI Request and Response classes
This change replaces WebOb with a mostly compatible local library,
swift.common.swob. Subtle changes to WebOb's API over the years have been a
huge headache. Swift doesn't even run on the current version.
There are a few incompatibilities to simplify the implementation/interface:
* It only implements the header properties we use. More can be easily added.
* Casts header values to str on assignment.
* Response classes ("HTTPNotFound") are no longer subclasses, but partials
on Response, so things like isinstance no longer work on them.
* Unlike newer webob versions, will never return unicode objects.
Change-Id: I76617a0903ee2286b25a821b3c935c86ff95233f
|
||
|
John Dickinson
|
a2ac5efaa6 |
swift constraints are now settable via config
Change previously hard-coded constants into config variables. This allows deployers to tune their cluster more specifically based on their needs. For example, a deployment that uses direct swift access for public content may need to set a larger header value constraint to allow for the full object name to be represented in the Content- Disposition header (which browsers check to determine the name of a downloaded object). The new settings are set in the [swift-constraints] section of /etc/swift/swift.conf. Comments were also added to this config file. Cleaned up swift/common/constraints.py to pass pep8 1.3.3 Funtional tests now require constraints to be defined in /etc/test.conf or in /etc/swift/swift.conf (in the case of running the functional tests against a local swift cluster). To have any hope of tests passing, the defined constraints must match the constraints on the tested cluster. Removed a ton of "magic numbers" in both unit and functional tests. Change-Id: Ie4588e052fd158314ddca6cd8fca9bc793311465 |
||
|
Jenkins
|
7f89e50eaf | Merge "fix some format issure" | ||
|
dk647
|
54e28fa21f |
fix some format
fix some format according to pep8 Change-Id: I8ceb266d92c8997f131fa4096aaa6cfd4d585aaa |
||
|
dk647
|
4d6ae96d92 |
fix some format issure
fir some format according to pep8 Change-Id: Iec8f67ea2166c955732bd598661140d4cfce6d40 |
||
|
Iryoung Jeong
|
de4d23c2a5 |
Adapt Swift for WebOb 1.2
Based on PatchSet 3 of https://review.openstack.org/#/c/7569/ , make them to pass all funcional tests with both webob 1.x and 1.2.
The additional following compatibility issues were addressed:
- Until patch for range header issue is merged into official webob release, testRangedGetsWithLWSinHeader() should skip test against webob 1.2
(
|
||
|
Dan Dillinger
|
f7fdb9cf12 |
Implement unit_test config to disable syslog.
bug 701248 bug 819303 This change makes syslog optional, by providing a unit test config with the ability to cause test/unit/__init__.py to replace SysLogHandler with a fake logging class. The default behavior is unchanged. FakeLogger now inherits directly from Handler and mocks out its API - this was a backward-compatibility issue. Change-Id: I653dec148c4f6cf81759de03964c6a3290c1a290 |
||
|
Ionuț Arțăriși
|
92312f5631 |
remove unused imports and useless empty class Base
Change-Id: I78dbb390cf0afe03d4bcf1aa9ffc9497392579dd |
||
|
John Dickinson
|
1ecf5ebba1 |
updated copyright date for all files
Change-Id: Ifd909d3561c2647770a7e0caa3cd91acd1b4f298 |
||
|
lzyeval
|
8b09723a00 |
PEP8 swift cleanup
The None, True, and False values are singletons. All variable *comparisons* to singletons should use 'is' or 'is not'. All variable *evaluations* to boolean should use 'if' or 'if not'. All Object type comparisons should use isinstance() instead of comparing types directly. Change-Id: I47863c4862791022670619f19b8bc15d8a93fd81 |
||
|
John Dickinson
|
742897856f |
requote the source when doing a COPY
fixes lp bug 857673 also fixes similar bug in post-as-copy code adds test Change-Id: I7a1984506bba28afe2b7ba46998d7306c058fd5c |
||
|
gholt
|
d2230e853d | Merged from trunk | ||
|
gholt
|
bdd2d99680 | Updated functests to test for utf-8 | ||
|
gholt
|
7c9e542c02 | Implemented object POST as COPY | ||
|
gholt
|
bd22dbe712 | Removing DevAuth | ||
|
Clay Gerrard
|
bdba519e02 | PEP8 | ||
|
Clay Gerrard
|
49ea0201f7 | made functionalnosetests works with no account usernames | ||
|
Clay Gerrard
|
a9201fc379 | i need to pull in the changes to functionalnosetest/swift_testing.py | ||
|
Clay Gerrard
|
d1fa1a0040 |
made functional tests more configurable
SWIFT_TEST_CONFIG_FILE can redirect both functional test suites to any conf functional tests that don't require a account:username can now work with only username for auth systems that don't support the account/namespace concept |
||
|
Greg Lange
|
e5c5a3778e | Made older functional tests look for default config file when env variable is unset | ||
|
gholt
|
1665568458 | Merge from trunk | ||
|
Anne Gentle
|
8823427161 | Changed copyright notices on py files and the single rst file with a copyright notice | ||
|
gholt
|
35f3487879 | Incorporated Swauth into Swift as an optional DevAuth replacement. | ||
|
David Goetz
|
1fc40d6c29 | catching invalid urls and adding tests | ||
|
gholt
|
b56bf3a0f3 | DevAuth support for reseller admins and an initial super admin. DevAuth server no longer needs the account ring or direct account server access. Proxy server supports account PUTs. | ||
|
gholt
|
a5df15005b | Got rid of inter-reseller ACLs. Enforce ACLs to only work within a reseller space. Updated docs and tests. We can expand to inter-reseller in the future with ACLs like .x:RESELLER_group | ||
|
gholt
|
d2ec027e22 | For ACL strings: Shortened .ref to just .r, though .ref, .referer, and .referrer are all accepted. Updated 'Creating Your Own Auth Middleware' to describe how the DevAuth server works and suggestions for creating one's own. Added reseller_prefix (optional) implementation. Used urlparse in referrer_allowed. Fixed bug where group names would get lowercased by clean_acl. Changed .r:any to .r:*. Allowed .r:*.example.com to mean .r:.example.com. Made proxy log just the first authenticated group (the user) alongside the token. Moved proxy callback to clean_acl before the length check of the metadata. Cleaned up redundant logic in first proxy swift.authorize callback. Bit better docs. More and updated tests. | ||
|
gholt
|
0066ed02d7 | Per Chuck's suggestion, changed noaccess to admin access, where admin access is not the default. Also, changed swift-auth-create-account to swift-auth-add-user with changes to use optparse | ||
|
Clay Gerrard
|
2477744704 | updated skipped functional tests to raise nose.SkipTest | ||
|
gholt
|
cfcfdd3de1 | Refactored auth and adding ACLs using repoze.what | ||
|
Chuck Thier
|
9bf26751d7 | Removed tests for behavior that doesn't exist any more | ||
|
Chuck Thier
|
001407b969 | Initial commit of Swift code |