mirror of https://github.com/perkeep/perkeep.git
![]() testSubFetcher in blobserver/storagetest was already checking that we'd get specific error messages in the case of negative input parameters or an out of range offset. This change rationalizes these constraints with named errors (ErrNegativeSubFetch and ErrOutOfRangeOffsetSubFetch) specified in the SubFetcher interface. It also fixes the googlestorage and s3 implementations so that they pass the aforementioned test. Change-Id: I25b72b842855b90ee3cab44c90654581dccf4b8e |
||
---|---|---|
.. | ||
testdata | ||
README | ||
auth.go | ||
googlestorage.go | ||
googlestorage_test.go |
README
Implements the Storage interface for Google Storage. A GoogleStorage instance stores blobs in a single Google Storage bucket, with each blob keyed by its blobref. Server configuration ===================== High-level server config is formatted like: "googlecloudstorage": "clientId:clientSecret:refreshToken:bucketName" Testing ======== googlestorage_test.go contains integration tests which run against Google Storage. In order to run these tests properly, you will need to: 1. Set up google storage. See: http://code.google.com/apis/storage/docs/signup.html 2. Upload the contents of the testdata dir to a google storage bucket. Note that all these files begin with 'test-': such files will be ignored when the bucket is used as blobserver storage. 3. Create the config file '~/.config/camlistore/gstestconfig.json'. The file should look something like this: { "gsconf": { "auth": { "client_id": "your client id", "client_secret": "your client secret", "refresh_token": "a refresh token" }, "bucket": "bucketName" } } You can use 'camtool gsinit' to help obtain the auth config object.