Commit Graph

722 Commits

Author SHA1 Message Date
Andrew Gaul 13701bf7ab Do not test marker contents
Some providers like Azure have opaque markers.
2015-12-19 15:24:12 -08:00
Andrew Gaul a7c66d5120 JCLOUDS-1042: Test reading from public container
Blob has default access but container is public-read.
2015-12-18 23:28:39 -08:00
Andrew Gaul 4abd5dd16f Revert "Delete parts when removing Swift multipart objects"
This reverts commit 3c1588527d.
2015-12-08 10:08:22 +08:00
Andrew Gaul 2dd231b02b Filter out folders when listing a container
These folders represent directories in the filesystem blobstore which
real blobstores do not have.  Their presence complicates providing the
correct marker for paginated listing.  Future commits will remove
folders entirely.
2015-11-20 16:27:53 -08:00
Andrew Gaul 4ce357ba69 Consistently quote ETags in comparisons
Addresses integration test regression in
25f4807df8.
2015-11-19 19:00:34 -08:00
Andrew Gaul 25f4807df8 Tolerate missing or extra quotes in ETags
References andrewgaul/s3proxy#77.
2015-11-19 17:40:48 -08:00
Andrew Gaul 8d87bfc61b Avoid buffering ByteSource when not needed
This allows range requests of large files to work.  Regression from
79fe91bd03.
2015-11-19 15:10:23 -08:00
Andrew Gaul 3c1588527d Delete parts when removing Swift multipart objects
Swift implements multi-part upload with user-visible parts and an
explicit manifest.  When deleting an MPU blob it can delete only the
manifest or both the manifest and parts.  For consistency with other
providers, we now do the latter in the portable abstraction.  Swift
ignores the multipart-manifest=delete parameter for single-part
objects.  Fixes andrewgaul/s3proxy#92.
2015-11-17 23:06:33 -08:00
Zack Shoylev 41ce90ec36 Fixes tests failing on windows filesystems Makes windows behavior more consistent, especially for deletes 2015-11-11 21:01:13 -06:00
Andrew Gaul e0c959c212 Pagination for listing LocalBlobStore MPU parts 2015-10-20 14:01:32 -07:00
Timur Alperovich aaa164179c JCLOUDS-217: Percent encoding changes.
jclouds should not check if the string is encoded, but rather expect
that all strings would be encoded prior to transmission. As part of
that change, we must make sure that no code relies on such behavior
within jclouds. This commit adds a blobstore test to check encoding
pattern for blobs. It also removes the encoding check in the Strings2
class and the related test.
2015-09-08 15:12:14 -07:00
Oliver Gondža edde721937 JCLOUDS-962: Make all @Provider methods final 2015-09-02 23:54:44 +02:00
Timur Alperovich 3757a64abf JCLOUDS-992: LocalBlobStore - use FOLDER for DIR.
Changed the LocalBlobStore to use FOLDER, as opposed to RELATIVE_PATH
when creating directories. Changed the delete keys strategy to treat
FOLDER blobs as regular blobs.
2015-08-20 12:42:11 -07:00
Timur Alperovich 0c5a3db9df JCLOUDS-992: remove special directory handling. 2015-08-20 12:42:11 -07:00
Timur Alperovich 42bfeccdfd Remove last marker test from ListContainerMarker.
Azure does not allow arbitrary marker specification and the generic
testListContainerMarker test should not assume that the behavior is
possible. There is already a separate test for such scenario that is
skipped on Azure.
2015-08-19 16:03:33 -07:00
Roman Coedo 53c3a4918a Fix LocalBlobStore 2015-08-06 09:43:33 -05:00
Roman Coedo 79fe91bd03 JCLOUDS-979: Fix range get for LocalBlobStore 2015-08-04 11:40:57 +02:00
Andrew Gaul 86f47394bf Correct FindBugs violations 2015-07-31 14:53:58 -07:00
Andrew Gaul 7e6284dd86 Add missing equals and hashCode methods
Possible cause of odd PageSet behavior.
2015-07-31 14:17:41 -07:00
Andrew Gaul 5ad245dea5 Do not buffer range get in LocalBlobStore
This avoids OutOfMemoryError with large blobs and enables offsets over
2 GB.
2015-07-27 18:02:54 -07:00
Ka-Hing Cheung 2c578d7bcb marker should be null when there are no more items 2015-07-21 15:46:58 -07:00
Timur Alperovich 19d54369db Propagate delimiter changes to LocalBlobStore.
Propagates the changes to add delimiter support to the local blob
store. The prefix option no longer works with the non-recursive
option. The caller _must_ set the delimiter option to enable the same
functionality.
2015-07-14 14:11:34 -07:00
Timur Alperovich e4161a59bb Move tests to test the file system API.
Move the prefix and delimiter tests from BaseContainerLiveTest to
BaseContainerIntegrationTest, as that class is subclassed in
Filesystem integration tests. This will make sure the file system blob
store will not regress.

The ListContainerTest is updated to _not_ use a file separator
character, as that leads to a possible creation of directories.
Instead, "-" is used as the delimiter for the delimiter option tests.
2015-07-14 14:11:34 -07:00
Timur Alperovich 613b6bf045 Add a test that sets delimiter and prefix.
Expands the delimiter tests to include a test that uses both prefix
and delimiter.
2015-07-14 14:11:34 -07:00
Timur Alperovich 4dc33ab564 JCLOUDS-929: Implement delimiter support in Local.
Adds the delimiter support in the local blob store. The existing
directory implementation is preserved and is not compatible with the
delimiter option, as the existing implementation assumes the usage of
filesystem directories.
2015-07-13 14:34:59 -07:00
Timur Alperovich a29d75a5d1 JCLOUDS-929: Implement generic delimiter support.
The patch adds delimiter option support in the generic blob store
interface. A live integration test is added to verify that jclouds
correctly lists objects separated by a delimiter.
2015-07-13 14:34:58 -07:00
Andrew Gaul 7d7deefb75 JCLOUDS-894: Handle part size when > maximum
Azure has a small part size that was not handled by the existing
logic.  This code is twisty and confusing and should be rewritten!
2015-07-09 18:00:37 -07:00
Zack Shoylev 65b7bdf282 Removes CopyObjectException in favor of jclouds-standard blobstore exceptions 2015-07-09 18:28:14 -05:00
Timur Alperovich 669feb4d0c LocalBlobStore: list marker blobs with delimiters.
When the delimiter option is specified, local blob store should behave
similarly to swift and return the directory marker blobs (directory
blobs) and the common prefix. This undoes the filtering we were
previously doing.
2015-07-07 18:00:31 -07:00
Timur Alperovich 6d27fbb18a JCLOUDS-930: Handle subdir entries correctly.
When listing blobs, Swift returns an array of "subdir" entries for
every common prefix. The openstack-swift provider needs to process
such entries and add them to the result set. The subdir array is an
array of strings, so additional metadata needs to be added to the
objects (bogus ETag, bogus LastModifiedDate, and so on).

When directory marker blobs are used, this means that potential _two_
entries are generated for every directory if:
1. the delimiter is set and matches the directory blob (e.g. dir/ and
   delimiter /)
2. there are objects under the directory name (e.g. dir/blob), which
   will result in results that include common prefixes (subdir)

In the above example, we should expect two results: "dir" and "dir/"
representing the directory marker blob and the common prefix,
respectively.

This is caught in the testDirectory integration test.

The patch changes the behavior of the Swift provider to correctly
handle the results in the subdir stanza and changes the test to expect
the directory marker to be returned in the list.
2015-07-07 17:55:50 -07:00
Timur Alperovich 03248b4c94 JCLOUDS-930: LocalStore -- fixup for prefixes.
When filtering results, we have to consider that a result was added to
the common prefixes list in its entirety (i.e. a directory). Such
results should be filtered out from the delimiter test.

An example that demonstrates this problem is if one creates a
directory "foo" and an object within it called "file". When listing
the results, they will include the directory object "foo" and the
object under "foo/file". During a non-recursive listing, we create a
list of common prefixes ("foo"). Subsequently, jclouds should remove
all objects that include the delimiter ("/"), however, that would not
apply to "foo". With the change to include the delimiter in the
listing, we need to be careful not to return two values "foo" and
"foo/".

A unit test for the local blob store to highlight this problem is
included. An integration test "testDirectory" also catches this issue.
2015-07-07 16:31:04 +02:00
Timur Alperovich 3009da3761 JCLOUDS-930: Expect a trailing "/" in tests.
We should expect a trailing prefix in delimiter tests, as the object
stores will return common prefixes up to and including the delimiter
character.
2015-07-07 16:30:59 +02:00
Timur Alperovich 14087e56bd Relax membership assertion for the prefix test.
Relaxes the membership check in prefix testing. The check is no longer
sensitive to ordering of the results, as different providers may
append, prepend, or insert in sorted order the relative prefixes.
2015-07-06 15:10:29 -07:00
Andrew Gaul bf93cadec6 Use correct default in testPublicAccess
Regression from d57b6e7b8f.
2015-07-02 16:25:49 -07:00
Andrew Gaul bc9cda2e37 JCLOUDS-930: Remove bogus dependsOnMethods 2015-07-02 16:21:03 -07:00
Andrew Gaul d109dd6326 Use prefix instead of marker to list MPU parts 2015-06-30 13:43:01 -07:00
Timur Alperovich aade18b76d JCLOUDS-930: LocalBlobStore -- marker regression.
We should not append a "/" to the marker when returning list results
in the case of directories (RELATIVE_PATH), as the names will already
include the delimiter.

Added a jclouds test to catch such regressions in the local store in
the future.
2015-06-30 08:46:46 -07:00
Timur Alperovich 8677ffcb21 JCLOUDS-930: Implement prefix for LocalBlobStore.
Implements prefix support for the local blob store. The patch allows
for correctly parsing prefixes that may not terminate with a delimiter
(i.e. foo with delimiter "/" and a key foobar/key, should return
foobar/ as the common path) and ones that do (i.e. foo/).

NOTE: there is a small change in behavior in this patch.
LocalBlobStore used to return the common prefixes without the
delimiter character ("/"). However, other providers do include the
delimiter (I checked S3 and Google Cloud Storage) and LocalBlobStore
should include it as well.
2015-06-29 17:31:55 -07:00
Timur Alperovich db4e4e5ba7 Factor out the common prefixes method.
Refactoring the code in the list() method to create a common
extractCommonPrefixes method.
2015-06-29 17:31:55 -07:00
Timur Alperovich 7c7d2e2df6 JCLOUDS-930: Add the prefix option.
Add a prefix option to the ListContainerOptions class.
2015-06-29 17:31:55 -07:00
Timur Alperovich e63474a824 JCLOUDS-931: Sleep only after creating containers.
jclouds should issue the requests to create all of the containers in
the container pool before sleeping. The patch modifies the
createContainerAndEnsureEmpty() method to take an additional
parameter, which specifies whether awaitConsistency() should be called
or not.
2015-06-26 14:04:43 -07:00
Ka-Hing Cheung 8b325d585e object stores typically sort the list of containers 2015-06-24 15:08:23 -07:00
Andrew Gaul d57b6e7b8f Use correct port in testPublicAccess
Also reduce timeout from 20 minutes to 1.
2015-06-24 14:51:16 -07:00
Iván López f155242838 Add missing value in Content-Range header
This is related with #776. It's necessary to add
the 'bytes' string before the bytes.
2015-06-19 08:24:18 +02:00
Andrew Gaul 3a410a25a8 Test for Content-Range header in single range get
Also emit this header in LocalBlobStore.
2015-06-17 11:43:17 -07:00
Andrew Gaul 1f7f8c8c86 Refine HTTP 416 into IllegalArgumentException
Providers yield different messages so remove parsing from test.  Also
narrow exception handling scope.TTP 416 into IllegalArgumentException

Providers yield different messages so remove parsing from test.  Also
narrow exception handling scope.
2015-06-16 21:47:30 -07:00
Andrew Gaul b0dfae1092 Use a configurable timeout for awaitConsistency
This allows setting to zero for strongly-consistency implementations
of s3 and swift stores.
2015-06-15 15:45:17 -07:00
Ka-Hing Cheung 6ed95d8968 fix range get for manifest object
swift doesn't return the etag if the client is doing a range
get of a manifest (SLO or DLO), this fixes SwiftObject so
etag is optional
2015-06-10 13:38:55 -07:00
Ka-Hing Cheung 23ef39416d use awaitConsistency in more places so provider can override it 2015-06-09 23:05:37 -07:00
Ka-Hing Cheung 140fb7ea7b fix multipart put of a blob with content md5
previously the parts will carry the content md5 of the entire
object, because unsetting the md5 of a ContentMetadata actually
didn't do anything
2015-06-09 22:59:30 -07:00
Ka-Hing Cheung 573ceb51c3 metadata and content metadata should have the same length
for range get in a LocalBlobStore, metadata.getSize() has the
original blob size and contentMetadata.getContentLength() has
the actual payload size. Other blobstores have the same size
in both
2015-06-08 14:28:16 -07:00
Andrew Gaul f14514c068 JCLOUDS-894: Add portable multipart upload
This unifies the provider multipart upload code paths and removes code
duplication.
2015-06-06 16:32:16 -07:00
Andrew Gaul 00734ee755 JCLOUDS-894: Move MultipartUploadSlicingAlgorithm to core 2015-06-06 16:32:16 -07:00
Ka-Hing Cheung 1ccdae46fa remove blob uri from transient blobstore
container may not be valid hostnames and the current blob uri
code can fail. there isn't really a way to use uri for transient
blobstore anyway, and removing it is the easier option. for
reference, filesystem blobstore also doesn't do this
2015-05-30 22:24:48 -07:00
Andrew Gaul f19853c278 Revert "metadata and content metadata should have the same length"
This reverts commit bbafc34d46.
2015-05-27 22:19:15 -07:00
Ka-Hing Cheung 1103a778d2 implemented some basic range validations in local blob store
also fixed a range get bug in local blob store
2015-05-27 16:30:05 -07:00
Ka-Hing Cheung bbafc34d46 metadata and content metadata should have the same length
for range get in a LocalBlobStore, metadata.getSize() has the
original blob size and contentMetadata.getContentLength() has
the actual payload size. Other blobstores have the same size
in both
2015-05-26 16:45:34 -07:00
Zack Shoylev f397bebeb2 JCLOUDS-894 Multipart upload code fixes for swift 2015-05-12 19:13:15 -05:00
Andrew Gaul b9c5b5b4e9 JCLOUDS-894: Expose local blobstore multipart operations 2015-05-01 13:07:23 -07:00
Andrew Gaul 71cdba1571 JCLOUDS-894: Expose multipart component operations 2015-05-01 13:07:23 -07:00
Andrew Gaul 40ba156937 JCLOUDS-651: portable copy object content metadata 2015-04-08 17:58:41 -07:00
Andrew Gaul b35295c238 JCLOUDS-651: Add @Beta annotations to copy methods 2015-04-08 17:12:51 -07:00
Ignasi Barrera b6fcac9667 JCLOUDS-651: Fix filesystem integration tests in OSX 2015-04-07 10:53:48 +02:00
Andrew Gaul d8f48c48b4 JCLOUDS-651: Copy Swift system metadata 2015-04-06 15:35:59 -07:00
Andrew Gaul a6a232a7a1 JCLOUDS-651: Ensure copy replaces user metadata
Some object stores have additive semantics for metadata.  As currently
implemented Azure, S3, and Swift consistently replace user metadata
but have different behavior for system metadata, e.g., Content-Type.
2015-04-03 17:50:33 -07:00
Andrew Gaul 3cf8abc22e JCLOUDS-651: Add copyBlob to portable abstraction
Some providers optimize this operation with a server-side copy.  Add a
fallback implementation which does a client-side copy.
2015-04-02 15:36:52 -07:00
Zack Shoylev 914ad04ae9 Fixes missing consistency waits in testDirectory 2015-04-02 17:14:40 -05:00
Andrew Gaul 279a984fee JCLOUDS-732: Transient portable object ACLs 2015-03-31 15:33:34 -07:00
Andrew Gaul a062bf841a JCLOUDS-660: Transient portable container ACLs 2015-03-31 15:33:33 -07:00
Andrew Gaul e7940d52f9 Add ReadOnlyBlobStore
This prohibits mutating operations.
2015-03-31 13:13:19 -07:00
Andrew Gaul 9d9acd1559 Add ForwardingBlobStore
Useful for implementing various facades: encryption, read-only, etc.
2015-03-31 13:13:19 -07:00
Ignasi Barrera f469cf8b51 Next development version 2.0.0-SNAPSHOT 2015-03-24 10:52:01 +01:00
Ignasi Barrera bb41ed4341 Apache jclouds 1.9.0 release 2015-03-24 10:35:42 +01:00
Andrew Gaul 9f93941525 Add content length to exception message 2015-03-02 16:51:59 -08:00
Ka-Hing Cheung a2ee7341e3 fix non-recursive list of dir with empty prefix 2015-02-23 17:52:42 -08:00
Andrew Gaul d8aea21f72 JCLOUDS-732: Local blobstore portable object ACLs
Intentionally unimplemented.
2015-02-21 10:28:02 -08:00
Andrew Gaul 49cd0aeba2 JCLOUDS-732: portable object ACLs 2015-02-21 10:28:01 -08:00
Andrew Gaul bc81919c58 Add @Beta annotations to BlobStore ACL methods
Also add missing @Override annotations.
2015-02-21 10:18:57 -08:00
Ka-Hing Cheung be7b9f4cc4 fix non-recursive list with empty prefix 2015-02-20 23:29:48 -08:00
Zack Shoylev 290a458e5e Fixes more timing issues in the BaseBlobIntegrationTest 2015-02-18 04:53:40 -06:00
Zack Shoylev 07f1fb69a7 Fixes more tests with timing problems 2015-02-18 03:46:37 -06:00
Zack Shoylev 14d4ce635f Refactors BaseBlobIntegrationTest and eventual consistency fix 2015-02-17 04:49:35 -06:00
Zack Shoylev dce4cd29ec Refactors consitency pause in blob tests and more fixes 2015-02-16 13:21:06 -06:00
Zack Shoylev a8dde0550b Adds a few more pauses for eventual consistency 2015-02-16 11:54:26 -06:00
Andrew Gaul 9898e99b50 JCLOUDS-144: Portable multi-blob delete 2015-02-15 01:06:03 -08:00
Zack Shoylev f6d43f6962 Fixes blob-related tests that fail occasionally 2015-02-13 17:25:15 -06:00
Andrew Gaul 994f84e4f5 JCLOUDS-660: Local blobstore portable container ACLs
Intentionally unimplemented.
2015-02-12 17:26:47 -08:00
Andrew Gaul a19795800a JCLOUDS-660: portable container ACLs 2015-02-12 17:26:47 -08:00
Zack Shoylev 0423ba802a Makes testSignPutUrlWithTime much slower but passes live testing 2015-02-06 21:29:44 -06:00
Zack Shoylev 1f35e959aa Makes the test testSignGetUrlWithTime more robust 2015-02-06 15:37:27 -06:00
Zack Shoylev 041b047a2d Make testGetIfUnmodifiedSince a lot more robust (but slower) 2015-02-05 23:26:23 -06:00
Zack Shoylev a8c5e28129 Windows fixes, mostly separator related. 2015-01-28 19:47:19 -06:00
Zack Shoylev ca58f627d9 Fixes a problem on windows where the separator is different 2015-01-26 13:52:30 -06:00
Andrew Gaul 2ed971d216 Correct test expectation
Fixed by 49d7d9d3b7.
2015-01-23 21:07:45 -08:00
Andrew Gaul af1a01a0af JCLOUDS-96: Handle us-standard in testAllLocations 2015-01-23 19:24:44 -08:00
Andrew Gaul 49d7d9d3b7 Reorder list option handling for local blobstores
We should apply the prefix first, recursive second, marker third, and
max keys last.  Also add some fixes to pass delimiter tests.
2015-01-22 11:37:46 -08:00
Andrew Gaul da3e7463fd Add more tests for delimiter, prefixes, and marker
s3-tests uncovered interactions between these options which existing
tests do not exercise.
2015-01-22 11:37:46 -08:00
Ka-Hing Cheung 3cabb196ce fix usermetadata check on OS X
Java on OS X does not support extended attributes, which the
filesystem blobstore uses to implement user metadata. This disable
the relevant test on OS X
2015-01-20 17:33:22 -08:00
Andrew Gaul 0512fc6e35 Add @Nullable attribute to BlobStore methods
blobMetadata and getBlob return null when a blob does not exist and
callers should check for this.
2015-01-16 15:06:16 -08:00
Andrew Gaul 9542fa5d31 Do not check object counts in multi-part tests
Some providers, e.g., GCS and Swift, create multi-part blobs with a
manifest pointing to other blobs.  Thus a container will have
additional objects in its listing.
2015-01-16 05:45:27 -08:00
Andrew Gaul 8c5391505d JCLOUDS-805: Allow overriding addContentMetadata
For symmetry with checkContentMetadata.
2015-01-16 05:12:00 -08:00
Andrew Gaul 58612bc473 Expand pagination test and enable for Atmos
Tested against atmos, aws-s3, azureblob, filesystem,
google-cloud-storage, rackspace-cloudfiles-us, and transient.
2015-01-12 17:43:42 -08:00
Andrew Gaul fae097e144 JCLOUDS-654: Add object size to StorageMetadata
This allows callers to read the content length during container
listing.  Tested against: atmosonline, aws-s3, azureblob, filesystem,
and transient.  Intentionally not implemented for legacy swift
provider.
2015-01-09 22:34:56 -08:00
Andrew Gaul 91c47bfd92 JCLOUDS-801: Add portable multipart upload tests
Exercise both repeatable and non-repeatable payloads.  Tested against
AWS-S3, Azure, and legacy Swift.  Skipped on all other providers.
2015-01-09 21:59:25 -08:00
Ka-Hing Cheung b7ab8b18a0 support directory blobs
make the filesystem blob store distinguish between a/ and a. a/
must be a directory blob with no content and only metadata

on listing, only directories with md5 attribute is considered a
blob and returned
2015-01-09 16:28:16 -08:00
Andrew Gaul 77eaa2c1f9 Add container creation date to local blobstores 2015-01-09 14:10:33 -08:00
Jeremy Daggett d3c1e2eab4 Use AutoService to generate service loader metadata 2015-01-09 11:22:12 -08:00
Andrew Gaul d6d06b71f4 Handle listing with marker after the last key
Also handle zero maxResults.  Found with Ceph s3-tests and s3proxy.
2015-01-08 16:28:02 -08:00
Adrian Cole 8d0c7f9a6c JCLOUDS-534 Folded overly explicit use of HostAndPort, which is also incompatible with guava 16. 2014-10-29 17:01:26 -07:00
Adrian Cole 177fd6d37f Do not require Guava ByteSource in order to create a payload. 2014-10-29 10:20:39 -07:00
Adrian Cole 1702bddffa Revert "Replace uses of ByteArrayPayload"
This reverts commit bd5b6853ee.
2014-10-29 10:20:38 -07:00
Adrian Cole 2933a78a6b Revert "Prefer ByteSource payload"
This reverts commit 0e3d1475ab.
2014-10-25 10:29:22 -07:00
Adrian Cole 0a801d2ad2 Revert "JCLOUDS-652: Require JDK 7"
This reverts commit 5e8bd02c93.
2014-10-25 10:28:34 -07:00
Adrian Cole b9525a0877 JCLOUDS-40 unasync Fallback 2014-10-06 13:14:59 -07:00
Andrew Phillips ffc0df11c9 Restoring BlobStoreUtils.parseDirectoryFromPath
Removed in 56a2a8b but used in downstream repos, e.g. jclouds-karaf
2014-10-06 09:50:24 -04:00
Adrian Cole 99e217b720 Move off confusing test names. 2014-10-05 17:22:18 -07:00
Adrian Cole a4e3c1a2f8 JCLOUDS-40 Remove AsyncBlobStore 2014-10-05 13:17:54 -07:00
Adrian Cole 56a2a8bf4a JCLOUDS-40 Remove internal usage of AsyncBlobStore. 2014-10-05 08:49:54 -07:00
Adrian Cole dfb583b67a JCLOUDS-40 remove all implementations of AsyncBlobStore except Submission in preparation for complete removal. 2014-10-05 08:49:38 -07:00
Adrian Cole b6497556f6 JCLOUDS-150 add SubmissionAsyncBlobStore; unasync s3 and aws-s3 2014-10-03 13:18:29 -07:00
Andrew Gaul 0e3d1475ab Prefer ByteSource payload
Also use randomByteSource for test input.
2014-09-09 15:32:39 -07:00
Andrew Gaul bd5b6853ee Replace uses of ByteArrayPayload
Prefer ByteSourcePayload which offers a superset of its functionality.
Note that ByteArrayPayload implicitly set the contentLength while
users of ByteSourcePayload must do so explicitly.
2014-09-07 07:43:14 -07:00
Andrew Gaul 0b89b1fd10 Ensure that Content-MD5 has 128 bits
Update many tests Content-MD5 headers and ETag responses.
2014-09-04 16:57:48 -07:00
Andrew Gaul 34cfdbe266 Enforce Override annotation via Checkstyle
Also remove bogus inheritDoc on base and static methods.
2014-08-31 19:37:50 -07:00
Andrew Gaul 550018a68d Use randomByteSource to generate test data
This avoids buffering the entire bolus of data in-memory.
2014-08-27 15:59:36 -07:00
Andrew Gaul 60e3763999 Throw ContainerNotFoundException from removeBlob
This makes removeBlob consistent with all other user-facing methods.
2014-08-21 16:18:12 -07:00
Jeremy Daggett e711275fb1 Prefer isEmpty() for collections rather than size() 2014-08-20 11:07:48 -07:00
John Walker e5283df995 JCLOUDS-676: Fix reflection warnings / Clojure
JCLOUDS-676: Fix reflection warnings / Clojure

Also fixed a typo in a doc string
2014-08-17 12:03:30 -07:00
Andrew Gaul 20bc145284 JCLOUDS-650: ContainerNotFoundException on putBlob
Found with Ceph s3-tests and s3proxy.
2014-08-09 00:25:10 -07:00
Andrew Phillips e3d9851216 Up to 2.0.0-SNAPSHOT after the 1.8.0 release 2014-08-05 09:10:24 +02:00
Andrew Gaul 9c82ded343 Correct comment 2014-07-27 21:25:35 -07:00
Andrew Gaul 7f31cd6051 Handle possibly null message from IOException 2014-07-27 19:41:45 -07:00
Andrew Gaul 1e1eb5a092 Add deleteContainerIfEmpty to BlobStore
This matches how most blobstores operate: delete container is a single
operation, not a compound operation which recursively deletes blobs.
Azure is the only provider which allows deleting a non-empty
container.
2014-07-25 23:02:39 -07:00
Andrew Phillips 5732bdcd94 Escaping regex special chars (esp. '\') in delimiter matching
Uncovered by 370194b
2014-07-22 13:35:52 -04:00
Andrew Gaul f17c876d8d Replace const.txt file input with synthetic inputs
This commit replaces file resource-based test inputs with in-memory
equivalents.  This is more consistent and efficient than the previous
approach.  Also resized some test inputs to be partSize + 1 instead of
2 * partSize.  Tested against aws-s3, blobstore, core, cloudfiles-us,
and filesystem.
2014-07-19 18:35:25 -07:00
Andrew Gaul dd3dc9790e Close streams in integration tests
Also remove bogus delete workaround.  Previously unclosed
FileInputStream caused test failures on Windows which cannot delete
open files.  Found with Kohsuke's file-leak-detector.
2014-07-19 05:25:20 -07:00
Andrew Gaul fb60d76704 JCLOUDS-622: Remove most vestiges of InputSupplier
Guava 16 deprecated InputSupplier and a future release will remove it.
2014-07-16 16:07:59 -07:00
Andrew Gaul a8b106c2bb JCLOUDS-622: remove calls to InputSupplier methods
Guava 16 deprecated these methods and Guava 18 will remove them.
2014-07-15 03:09:58 -07:00
Andrew Gaul 75928795f3 Address Checkstyle violations 2014-07-15 03:07:29 -07:00
Andrew Gaul bdb5cbcbe7 Improve use of ByteSource with test resources
This commit ensures proper resource cleanup, simplifies
initialization, and paves the way for purely synthetic inputs in a
subsequent commit.
2014-07-11 09:10:51 -07:00
Andrew Gaul cf830af4d2 Remove unneeded InputSupplier helper
Also convert byte[] to HashCode.
2014-07-10 22:36:32 -07:00
Andrew Gaul f4eca0422d Enforce correct MD5 for local blobstores
Matches behavior of real blobstores.
2014-07-10 22:19:42 -07:00
Andrew Gaul 66dab8d96e JCLOUDS-410: Remove InputStreamSupplierPayload
ByteSourcePayload replaces this.  jclouds 1.7 deprecated
InputStreamSupplierPayload and Guava 16 deprecated InputSupplier
itself.
2014-07-10 20:43:08 -07:00
Andrew Gaul 8fa209b15e Use more specific testng asserts where possible
These asserts yield more informative error messages.  Found with:

grep -rI 'assertTrue(.* =='
grep -rI 'assertTrue(.* !='
grep -rI 'assertTrue(.*\.equals('
2014-06-24 13:54:01 -07:00
Chris Custine 309c053c77 JCLOUDS-584: HP Cloud Object Storage Fixes for 13.5 2014-06-24 12:01:51 -07:00
Andrew Gaul e799a7409c JCLOUDS-597: HashCode methods for Content-MD5
This works more naturally with Guava Hashing methods and immutability
provides better safety guarantees.  Also deprecate existing byte[]
methods.
2014-06-12 15:29:17 -07:00
Andrew Gaul 9cdd53b0b7 JCLOUDS-546: Remove Javadoc @author annotations
Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'
2014-06-07 21:44:54 -07:00
Andrew Gaul da8517f295 Increase timeouts for signed URL tests
Clock skew between the client and blobstore can cause these tests to
spuriously fail.  This commit allows 5 seconds skew in either
direction.
2014-05-30 14:58:40 -07:00
Andrew Gaul 2342abd3c5 Address Checkstyle violations 2014-05-30 11:10:14 -07:00
Andrew Gaul 186f052022 Remove BlobBuilder and Payloads.calculateMD5
Callers should instead explicitly set contentMD5, usually with the
results from Guava Hashing.md5(). This narrows the API and removes a
strange IOException from callers.  Further it removes a dangerous
rebuffering of arbitrarily-large non-repeatable Payloads.
2014-05-28 12:54:18 -07:00