Skip to content

Commit a715617

Browse files
authored
---
yaml --- r: 8245 b: refs/heads/master c: 9ddeb40 h: refs/heads/master i: 8243: a73d27a
1 parent 9869417 commit a715617

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2d5cbfe39ddd1b5334b0249d7f8196271a54a9d5
2+
refs/heads/master: 9ddeb40ad4440942493c3b98c6357129372cd11b
33
refs/heads/travis: 47e4fee4fd5af9b2a8ce46f23c72ec95f9b195b2
44
refs/heads/gh-pages: 0114589947fea527ea3831330789accedbecf45c
55
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

trunk/TESTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ You can test against an in-memory local Resource Manager by following these step
208208

209209
#### On your machine
210210

211-
You can test against an in-memory local Storage by following these steps:
211+
You can test against an in-memory local Storage. The in-memory configuration supports only limited number of operations; please refer to the `LocalStorageHelper` class documentation for more details. Please use `RemoteStorageHelper` (see next section) if you need to use operations which are not supported by `LocalStorageHelper`.
212+
213+
To use the in-memory configuration please follow these steps:
212214

213215
1. Follow the [Quickstart instructions][cloud-nio] to add the nio dependency to your project.
214216
2. In your program, create and use a fake Storage service object. For example:
@@ -221,7 +223,7 @@ You can test against an in-memory local Storage by following these steps:
221223

222224
#### Remote
223225

224-
The alternative way of testing is to create a test project. `RemoteStorageHelper` contains convenience methods to make setting up and cleaning up the test project easier. To use this class, follow the steps below:
226+
The alternative way of testing is to create a test project. This way allows using operations not supported by the in-memory configuration. `RemoteStorageHelper` contains convenience methods to make setting up and cleaning up the test project easier. To use this class, follow the steps below:
225227

226228
1. Create a test Google Cloud project.
227229

trunk/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing/LocalStorageHelper.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@
2323
/**
2424
* Utility to create an in-memory storage configuration for testing. Storage options can be
2525
* obtained via the {@link #getOptions()} method. Returned options will point to FakeStorageRpc.
26+
*
27+
* <p>Note, the created in-memory storage configuration supports limited set of operations and is <b>not</b> thread-safe:
28+
* <ul>
29+
* <li>Supported operations
30+
* <ul>
31+
* <li>object create
32+
* <li>object get
33+
* <li>object delete
34+
* <li>list the contents of a bucket
35+
* </ul>
36+
* <li>Unsupported operations
37+
* <ul>
38+
* <li>bucket create
39+
* <li>bucket get
40+
* <li>bucket delete
41+
* <li>list all buckets
42+
* <li>generations
43+
* <li>file attributes
44+
* <li>patch
45+
* <li>continueRewrite
46+
* <li>createBatch
47+
* <li>checksums, etags
48+
* <li>IAM operations</li>
49+
* </ul>
50+
* </ul>
2651
*/
2752
public final class LocalStorageHelper {
2853

0 commit comments

Comments
 (0)