Commit graph

170 commits

Author SHA1 Message Date
Yehuda Sadeh
adabd0ba7d test_s3: fix FakeFile.seek(): handles whence param
beforehand we didn't accept the seek() whence param, which
failed with boto 2.4.0.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-05-16 13:32:20 -07:00
Yehuda Sadeh
ebbafdb3e8 add functional tests for bucket HEAD
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-04-19 13:33:08 -07:00
Yehuda Sadeh
1551c5b087 functional: test that bucket recreation doesn't override index
This resolves issue #1853.

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-04-02 14:38:39 -07:00
Yehuda Sadeh
4633fe4c12 fix atomic_write test, don't resuse same key handle for read and write 2012-02-15 12:45:31 -08:00
Yehuda Sadeh
256577fc87 set fails_on_dho on test_bucket_create_special_key_names 2012-02-10 21:19:23 -08:00
Yehuda Sadeh
54d98ff1e3 test '%' as a valid char for object name 2012-02-10 16:53:06 -08:00
Yehuda Sadeh
d196c6829d add test_bucket_create_special_key_names 2012-02-06 17:04:24 -08:00
Yehuda Sadeh
c509158413 add test_object_copy_zero_size 2012-02-06 16:38:42 -08:00
Steven Berler
e9492927ae precompute files in readwrite tool
Makes the readwrite tool precompute a set of files and reuse them
when writing objects rather than generating each file on the fly.
2011-12-30 19:05:12 +00:00
Mark Kampe
a268bcfbef RGW test-case annotation for inventory.
Annotated S3 functional and error-detection test cases
with resource/method/operation/assertion properties to
enable automatic test case inventory generation.

Signed-off-by: Mark Kampe <mark.kampe@dreamhost.com>
2011-12-22 16:09:21 -08:00
Mark Kampe
d69a33cc35 Added descriptions of what the fuzzer is and does.
Signed-off-by: Mark Kampe <mark.kampe@dreamhost.com>
2011-12-22 16:09:21 -08:00
Steven Berler
a6227f8acc improve random file generation performance
Makes the random file generator not generate more data
than the size of the file.  Previously it would generate
1 MB of data even if the file was much smaller.
2011-12-22 23:21:58 +00:00
Steven Berler
aaf4219d8d readwrite analysis tool
Adds a tool to analyze the output from the readwrite and roundtrip tools.
The output format is similar to the output from siege.
2011-12-20 00:06:17 +00:00
Yehuda Sadeh
f7dde840a3 test_bucket_create_bad_contentlength_empty should use its own connection
since it can leave the connection in a wierd state
2011-11-22 14:46:53 -08:00
Yehuda Sadeh
a030d88e58 add bucket header tests 2011-11-22 13:25:42 -08:00
Matthew Wodrich
c749ff5043 Mark tests that fail with subdomain calling format
Add @attr('fails_with_subdomain') on all tests that should fail when
subdomain calling format is used, because they break DNS rules.
2011-11-04 16:29:54 -07:00
Matthew Wodrich
c4bded31c2 add calling_format switch in functional and common
Add calling_format switch with options ordinary, subdomain, and vhost to
s3tests/functional/__init__.py and /s3tests/common.py to allow the use
of OrdinaryCallingFormat, SubdomainCallingFormat, and VHostCallingFormat
in the config files for the nosetests and the tools using the common
parser.
2011-11-03 10:22:23 -07:00
Stephon Striplin
dec5360c92 add fails_on_dho on a failing test
It turns out that the e-mail comments were legitimate. The reason the
tests were passing was because the specific users now had e-mail
addresses, but this not the default case.
2011-10-28 12:47:25 -07:00
Kyle Marsh
44bad4c4cc Update docstring for generate_objects 2011-10-19 14:46:22 -07:00
Tommi Virtanen
5b250e57e1 Let nose run s3tests in parallel.
This decreases the run time significantly.

Unfortunately, there seem to be cleanup-related bugs
in parallel runs for now. It's not safe to actually
run with --processes=N >1 yet, but at least the right
magic incantation is now recorded.
2011-10-13 13:35:56 -07:00
Tommi Virtanen
27d2e40b7d Move fuzzer under s3tests/fuzz.
This way, its unit tests are separate from s3tests/functional,
and s3tests/functional is the thing that actually talks to an
S3 implementation over the wire.

To actually run the fuzzer, use ./virtualenv/bin/s3tests-fuzz-headers
2011-10-13 13:34:23 -07:00
Tommi Virtanen
a18eee85fe Merge remote branch 'github/fuzz_headers' 2011-10-12 15:47:28 -07:00
Stephon Striplin
83755e2782 remove fails_on_{dho,rgw} on passing tests 2011-10-07 12:30:15 -07:00
Sage Weil
e486100a60 add s3tests.functional.test_s3.test_bucket_list_distinct 2011-10-05 16:04:20 -07:00
Sage Weil
211df8dc22 add fails_on_dho to test_object_create_bad_authorization_unreadable 2011-09-26 13:37:16 -07:00
Stephon Striplin
2fcdc79299 add fail_on_rgw on test_object_create_bad_authorization_unreadable 2011-09-23 15:14:26 -07:00
Stephon Striplin
377e968120 Rename object acl test 2011-09-22 13:07:02 -07:00
Stephon Striplin
dc732021d6 add no Content-Length PUT object acl test 2011-09-22 12:50:13 -07:00
Kyle Marsh
046b92b7eb S3 Fuzzer: httplib error handling
Sometimes httplib will through a BadStatusLine error that the fuzzer should
catch and register as a failure.
2011-09-12 13:05:29 -07:00
Kyle Marsh
ab8235b40c S3 Fuzzer: changed output and failure catching. 2011-09-12 13:04:23 -07:00
Kyle Marsh
18c3fe53c2 S3 Fuzzer: Output and garbage data tweaks.
- Output tweaks
- added support for printable_no_whitespace and binary_no_whitespace
2011-09-12 13:03:55 -07:00
Kyle Marsh
f45d28765d S3 Fuzzer: remove num-retries override
Overriding num-retries to 0 sometimes causes boto to fail when the server
doesn't respond fast enough.  Removing the override shouldn't cause any
problems with the fuzzer.
2011-09-12 13:02:27 -07:00
Kyle Marsh
d2c841d1df S3 Fuzzer: PRNG Seed and decisiong graph fixes
- Change random seed generator to always spit out ints between 0 and 100,000
- Fix seeds so randomly generated seeds are *actually* the same as those seeds
	read from a file.
- Tweaks to decision graph

Remaining Bugs:
	- Single } encountered in format string
	- _mexe complains about "BadStatusLine"
2011-09-12 13:01:50 -07:00
Kyle Marsh
23fee1476a S3 Fuzzer: Start Fuzzing
- tweak yaml decision graph
- add test setup bucket creation, etc.
- add output with varying levels of verbosity
2011-09-12 13:01:07 -07:00
Kyle Marsh
76956d86e4 S3 Fuzzer: finish describing bucket operations
Finishing touches on decision graph for bucket operations.
2011-09-12 12:59:53 -07:00
Kyle Marsh
e12f124686 S3 Fuzzer: Change how random data works
Remove SpecialVariables dict subclass in favor of RepeatExpandingFormatter
string.Formatter subclass.
2011-09-12 12:58:57 -07:00
Kyle Marsh
14288ad2f6 S3 Fuzzer: Incorporate Tv's suggestions
Tv looked over the fuzzer and had some idiomatic and design suggestions.

Adds several tests and reworks how expansion happens in addition to idiom
changes.
2011-09-12 12:57:43 -07:00
Kyle Marsh
bb7111a0d1 S3 Fuzzer: Write Decision Graph
Start writing the decision graph describing the fuzzer's attack surface in
earnest.
2011-09-12 12:55:32 -07:00
Kyle Marsh
62bd05a390 S3 Fuzzer: Handle null choices
Sometimes you might want to have your current node terminate the descent or
set something to the empty string.
2011-09-12 12:53:18 -07:00
Kyle Marsh
d7b49713f7 S3 Fuzzer: Implmented headers and made random safe
Random can sometimes include } or { which will confuse the string formatter.
Formatter escapes those values when they're doubled: }}, {{ but this
required some slight hacking to the expander.
2011-09-12 12:53:18 -07:00
Kyle Marsh
3f1314f7c8 S3 Fuzzer: set values can be weighted lists now 2011-09-12 12:53:18 -07:00
Kyle Marsh
4737652fc1 S3 Fuzzer: Added binary mode to random data generator 2011-09-12 12:53:18 -07:00
Kyle Marsh
195571b555 S3 Fuzzer: support weights for choices 2011-09-12 12:53:18 -07:00
Kyle Marsh
f5bb3f9c15 S3 Fuzzer: implemented decision expansion
Decision reached by descending the graph describing the attack surface can
be expanded to fill in all the placeholders
2011-09-12 12:53:17 -07:00
Kyle Marsh
7d9ec02686 S3 Fuzzer: Added SpecialVariables dict subclass
Helper class to catch sentinal keys and turn them into random values.  This
will be used to generate garbage data when expanding a decision.

Also add unit tests for expand_decision and assemble_decision
2011-09-12 12:52:37 -07:00
Kyle Marsh
a9a41a2891 S3 Fuzzer: began writing graph descent
still missing headers and choice weights
2011-09-12 12:52:37 -07:00
Kyle Marsh
fc93c02963 S3 Fuzzer: Change direction towards decision tree
Fuzzer now builds requests based on a DAG that describes the request space
and attack surface.
2011-09-12 12:51:01 -07:00
Kyle Marsh
691955935d S3 Fuzzer: add authorization to FuzzyRequest 2011-09-12 12:50:43 -07:00
Kyle Marsh
31adf6afa5 S3 Fuzzer: Begin writing unit tests for S3 Fuzzer 2011-09-12 12:50:14 -07:00
Kyle Marsh
93cf99aed9 S3 Fuzzer: Add skeleton for a targeted S3 Fuzzer 2011-09-12 12:49:12 -07:00