fog/fog — pull request #732 by nirvdrum (2012-02-06 15:00:04+00:00)
Title: [aws|storage|test] Make sure tests pass with both mocking enabled and disabled.

So, I think I may have only run the request tests with mocking disabled and the model tests with mocking enabled. I'm not 100% sure, but it seems the likely scenario.

Summary of changes:

* Fixed ordering of versions in mocks. The S3 docs make no explicit guarantee on order, so I didn't worry about it, but the differences between mock & real were fixed by reversing the sort order. This may break in the future if results truly are sorted in a nondeterministic order, in which case we'd have to compare Sets instead of Arrays.

* There were some issues delineating between AccessDenied & NotFound, depending on the bucket name used. If anyone ever creates the bucket "fognonbucket" and doesn't tear it down, we're going to have a lot of failures.

* There may be sporadic failures doing the request tests un-mocked. It seems with versioning in particular it can take S3 several seconds to update the bucket configuration. I'm open to suggestions on how to fix this. Sleeping for 15s seems to be the safest way, but that's quite annoying and still not even guaranteed to pass.