Skip to content

Commit 7cedd10

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 6211 b: refs/heads/tswast-patch-1 c: 2e3042c h: refs/heads/master i: 6209: 0eb1b38 6207: f35ce4e
1 parent b7a4098 commit 7cedd10

8 files changed

Lines changed: 84 additions & 5 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: c6b7f2785f5f7ef564f7d0ffdf303c757ffe61f5
60+
refs/heads/tswast-patch-1: 2e3042c106800ea15b2fe2bfaf117555e17b8f4a
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/LocalGcdHelper.java renamed to branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/testing/LocalGcdHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.google.gcloud.datastore;
17+
package com.google.gcloud.datastore.testing;
1818

1919
import static java.nio.charset.StandardCharsets.UTF_8;
2020

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2015 Google Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* A testing helper for Google Cloud Datastore.
19+
*
20+
* <p>A simple usage example:
21+
* <pre> {@code
22+
* LocalGcdHelper gcdHelper = LocalGcdHelper.start(PROJECT_ID, PORT_NUMBER);
23+
* DatastoreOptions options = DatastoreOptions.builder()
24+
* .projectId(PROJECT_ID)
25+
* .host("localhost:8080")
26+
* .build();
27+
* Datastore localDatastore = DatastoreFactory.instance().get(options);
28+
*
29+
* // Do tests
30+
*
31+
* gcdHelper.stop();
32+
* } </pre>
33+
*
34+
* @see <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/TESTING.md">
35+
* gcloud-java tools for testing</a>
36+
*/
37+
package com.google.gcloud.datastore.testing;

branches/tswast-patch-1/gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/DatastoreOptionsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static org.junit.Assert.assertSame;
2323
import static org.junit.Assert.assertTrue;
2424

25+
import com.google.gcloud.datastore.testing.LocalGcdHelper;
2526
import com.google.gcloud.spi.DatastoreRpc;
2627
import com.google.gcloud.spi.DatastoreRpcFactory;
2728

branches/tswast-patch-1/gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/DatastoreTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.google.gcloud.datastore.StructuredQuery.OrderBy;
3434
import com.google.gcloud.datastore.StructuredQuery.Projection;
3535
import com.google.gcloud.datastore.StructuredQuery.PropertyFilter;
36+
import com.google.gcloud.datastore.testing.LocalGcdHelper;
3637
import com.google.gcloud.spi.DatastoreRpc;
3738
import com.google.gcloud.spi.DatastoreRpc.DatastoreRpcException.Reason;
3839
import com.google.gcloud.spi.DatastoreRpcFactory;

branches/tswast-patch-1/gcloud-java-storage/src/test/java/com/google/gcloud/storage/RemoteGcsHelper.java renamed to branches/tswast-patch-1/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.google.gcloud.storage;
17+
package com.google.gcloud.storage.testing;
1818

1919
import com.google.common.collect.ImmutableMap;
2020
import com.google.gcloud.AuthCredentials;
21-
import com.google.gcloud.storage.RemoteGcsHelper.Option.KeyFromClasspath;
21+
import com.google.gcloud.storage.BlobInfo;
22+
import com.google.gcloud.storage.Storage;
23+
import com.google.gcloud.storage.StorageException;
24+
import com.google.gcloud.storage.StorageOptions;
25+
import com.google.gcloud.storage.testing.RemoteGcsHelper.Option.KeyFromClasspath;
2226

2327
import java.io.FileInputStream;
2428
import java.io.FileNotFoundException;
@@ -96,7 +100,7 @@ public static String generateBucketName() {
96100
*
97101
* @param options creation options
98102
* @return A {@code RemoteGcsHelper} object for the provided options.
99-
* @throws com.google.gcloud.storage.RemoteGcsHelper.GcsHelperException if environment variables
103+
* @throws com.google.gcloud.storage.testing.RemoteGcsHelper.GcsHelperException if environment variables
100104
* {@code GCLOUD_TESTS_PROJECT_ID} and {@code GCLOUD_TESTS_KEY} are not set or if the file
101105
* pointed by {@code GCLOUD_TESTS_KEY} does not exist
102106
*/
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright 2015 Google Inc. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* A testing helper for Google Cloud Storage.
19+
*
20+
* <p>A simple usage example, after setting the required environment variables (see the link below):
21+
* <pre> {@code
22+
* RemoteGcsHelper gcsHelper = RemoteGcsHelper.create();
23+
* Storage storage = StorageFactory.instance().get(gcsHelper.options());
24+
* String bucket = RemoteGcsHelper.generateBucketName();
25+
* storage.create(BucketInfo.of(bucket));
26+
*
27+
* // Do tests
28+
*
29+
* RemoteGcsHelper.forceDelete(storage, bucket, 5, TimeUnit.SECONDS);
30+
* } </pre>
31+
*
32+
* @see <a href="https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/TESTING.md">
33+
* gcloud-java tools for testing</a>
34+
*/
35+
package com.google.gcloud.storage.testing;

branches/tswast-patch-1/gcloud-java-storage/src/test/java/com/google/gcloud/storage/ITStorageTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import static org.junit.Assert.fail;
2525

2626
import com.google.common.collect.ImmutableList;
27+
import com.google.gcloud.storage.testing.RemoteGcsHelper;
2728

2829
import java.io.ByteArrayInputStream;
2930
import java.io.IOException;

0 commit comments

Comments
 (0)