mirror of https://github.com/apache/jclouds.git
Name test buckets jclouds instead of jcloud
This commit is contained in:
parent
119d2f487f
commit
9d3a7bdd4d
|
@ -36,10 +36,10 @@ import org.testng.annotations.Test;
|
|||
@Test(groups = "unit", testName = "BucketAccessControlsApiExpectTest")
|
||||
public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
|
||||
|
||||
private static final String EXPECTED_TEST_BUCKET = "jcloudtestbucket";
|
||||
private static final String EXPECTED_TEST_BUCKET = "jcloudstestbucket";
|
||||
|
||||
public static final HttpRequest GET_BUCKETACL_REQUEST = HttpRequest.builder().method("GET")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allUsers")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
private final HttpResponse GET_BUCKETACL_RESPONSE = HttpResponse.builder().statusCode(200)
|
||||
|
@ -49,7 +49,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
.payload(staticPayloadFromResource("/bucket_acl_insert_response.json")).build();
|
||||
|
||||
private final HttpRequest LIST_BUCKETACL_REQUEST = HttpRequest.builder().method("GET")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
private final HttpResponse LIST_BUCKETACL_RESPONSE = HttpResponse.builder().statusCode(200)
|
||||
|
@ -91,7 +91,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
BucketAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
|
||||
LIST_BUCKETACL_REQUEST, listResponse).getBucketAccessControlsApi();
|
||||
|
||||
assertNull(api.listBucketAccessControls("jcloudtestbucket"));
|
||||
assertNull(api.listBucketAccessControls("jcloudstestbucket"));
|
||||
}
|
||||
|
||||
// Test insertBucketAccessControls
|
||||
|
@ -99,7 +99,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest insertRequest = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/bucket_acl_insert_initial.json",
|
||||
|
@ -116,7 +116,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
// Test deleteBucketAccessControls
|
||||
public void testDeleteBucketAclResponseIs2xx() throws Exception {
|
||||
HttpRequest delete = HttpRequest.builder().method("DELETE")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allAuthenticatedUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allAuthenticatedUsers")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
HttpResponse deleteResponse = HttpResponse.builder().statusCode(204).build();
|
||||
|
@ -129,7 +129,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
|
||||
public void testDeleteBucketAclResponseIs4xx() throws Exception {
|
||||
HttpRequest delete = HttpRequest.builder().method("DELETE")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allAuthenticatedUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allAuthenticatedUsers")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
HttpResponse deleteResponse = HttpResponse.builder().statusCode(404).build();
|
||||
|
@ -145,7 +145,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest update = HttpRequest
|
||||
.builder()
|
||||
.method("PUT")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/bucket_acl_update_initial.json",
|
||||
|
@ -168,7 +168,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest patchRequest = HttpRequest
|
||||
.builder()
|
||||
.method("PATCH")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/bucket_acl_update_initial.json",
|
||||
|
|
|
@ -61,7 +61,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
|
|||
|
||||
public static final HttpRequest LIST_BUCKET_REQUEST_WITHOPTIONS = HttpRequest.builder().method("GET")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b").addQueryParam("project", EXPECTED_TEST_PROJECT_NUMBER)
|
||||
.addQueryParam("maxResults", "2").addQueryParam("pageToken", "jcloudtestbucket500")
|
||||
.addQueryParam("maxResults", "2").addQueryParam("pageToken", "jcloudstestbucket500")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
private final HttpResponse LIST_BUCKET_RESPONSE = HttpResponse.builder().statusCode(200)
|
||||
|
@ -112,7 +112,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
|
|||
BucketApi api = requestsSendResponses(requestForScopes(STORAGE_READONLY_SCOPE), TOKEN_RESPONSE,
|
||||
LIST_BUCKET_REQUEST_WITHOPTIONS, LIST_BUCKET_RESPONSE).getBucketApi();
|
||||
|
||||
ListOptions options = new ListOptions().maxResults(2).pageToken("jcloudtestbucket500");
|
||||
ListOptions options = new ListOptions().maxResults(2).pageToken("jcloudstestbucket500");
|
||||
|
||||
assertEquals(api.listBucket(EXPECTED_TEST_PROJECT_NUMBER, options), new NoAclBucketListTest().expected());
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class BucketApiLiveTest extends BaseGoogleCloudStorageApiLiveTest {
|
|||
|
||||
private static final String BUCKET_NAME_NEARLINE = "jcloudstestbucketnearline" + (int) (Math.random() * 10000);
|
||||
|
||||
private static final String BUCKET_NAME_WITHOPTIONS = "jcloudtestbucketoptions" + (int) (Math.random() * 10000);
|
||||
private static final String BUCKET_NAME_WITHOPTIONS = "jcloudstestbucketoptions" + (int) (Math.random() * 10000);
|
||||
|
||||
private static final String LOG_BUCKET_NAME = "jcloudslogbucket" + (int) (Math.random() * 10000);
|
||||
|
||||
|
|
|
@ -36,14 +36,14 @@ import org.testng.annotations.Test;
|
|||
@Test(groups = "unit", testName = "DefaultObjectAccessControlsApiExpectTest")
|
||||
public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
|
||||
|
||||
private static final String EXPECTED_TEST_BUCKET = "jcloudtestbucket";
|
||||
private static final String EXPECTED_TEST_BUCKET = "jcloudstestbucket";
|
||||
private static final String EXPECTED_TEST_GROUP_ENTITY = "group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b";
|
||||
|
||||
private static final HttpRequest GET_DEFAULT_OBJECT_ACL_REQUEST = HttpRequest
|
||||
.builder()
|
||||
.method("GET")
|
||||
.endpoint(
|
||||
"https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b")
|
||||
"https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl/group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
private final HttpResponse GET_DEFAULT_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
|
||||
|
@ -53,7 +53,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
.payload(staticPayloadFromResource("/default_object_acl_insert_response.json")).build();
|
||||
|
||||
public final HttpRequest LIST_DEFAULT_OBJECT_ACL_REQUEST = HttpRequest.builder().method("GET")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
private final HttpResponse LIST_DEFAULT_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
|
||||
|
@ -105,7 +105,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
HttpRequest insertRequest = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/default_object_acl_insert_request_payload.json",
|
||||
|
@ -123,7 +123,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
// Test deleteDefaultObjectAccessControls
|
||||
public void testDeleteDefaultObjectAclResponseIs2xx() throws Exception {
|
||||
HttpRequest delete = HttpRequest.builder().method("DELETE")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl/allUsers")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
HttpResponse deleteResponse = HttpResponse.builder().statusCode(204).build();
|
||||
|
@ -136,7 +136,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
|
||||
public void testDeleteObjectAclResponseIs4xx() throws Exception {
|
||||
HttpRequest delete = HttpRequest.builder().method("DELETE")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl/allUsers")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
HttpResponse deleteResponse = HttpResponse.builder().statusCode(404).build();
|
||||
|
@ -152,7 +152,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
HttpRequest update = HttpRequest
|
||||
.builder()
|
||||
.method("PUT")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/default_object_acl_update_request_payload.json",
|
||||
|
@ -175,7 +175,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
HttpRequest update = HttpRequest
|
||||
.builder()
|
||||
.method("PUT")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.addQueryParam("role", ObjectRole.OWNER.toString())
|
||||
|
@ -199,7 +199,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
|
|||
HttpRequest update = HttpRequest
|
||||
.builder()
|
||||
.method("PATCH")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/defaultObjectAcl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/default_object_acl_update_request_payload.json",
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.testng.annotations.Test;
|
|||
|
||||
public class DefaultObjectAccessControlsApiLiveTest extends BaseGoogleCloudStorageApiLiveTest {
|
||||
|
||||
protected static final String BUCKET_NAME = "jcloudtestbucketdefaultoacl" + UUID.randomUUID();
|
||||
protected static final String BUCKET_NAME = "jcloudstestbucketdefaultoacl" + UUID.randomUUID();
|
||||
|
||||
private DefaultObjectAccessControlsApi api() {
|
||||
return api.getDefaultObjectAccessControlsApi();
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.testng.annotations.Test;
|
|||
@Test(groups = "unit", testName = "ObjectAccessControlsApiExpectTest")
|
||||
public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
|
||||
|
||||
private static final String EXPECTED_TEST_BUCKET = "jcloudtestbucket";
|
||||
private static final String EXPECTED_TEST_BUCKET = "jcloudstestbucket";
|
||||
private static final String EXPECTED_TEST_OBJECT = "foo.txt";
|
||||
private static final String EXPECTED_TEST_GROUP_ENTITY = "group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b";
|
||||
private static final String EXPECTED_TEST_USER_ENTITY = "user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d";
|
||||
|
@ -45,14 +45,14 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
.builder()
|
||||
.method("GET")
|
||||
.endpoint(
|
||||
"https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b")
|
||||
"https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
public static final HttpRequest GET_OBJECT_ACL_REQUEST_WITHOPTIONS = HttpRequest
|
||||
.builder()
|
||||
.method("GET")
|
||||
.endpoint(
|
||||
"https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b")
|
||||
"https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/group-00b4903a971ec6cff233284d6d24f5bf5cba904c4ade4d43ebd6a5d33800e68b")
|
||||
.addQueryParam("generation", "100").addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
|
@ -63,11 +63,11 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
.payload(staticPayloadFromResource("/object_acl_insert_response.json")).build();
|
||||
|
||||
public final HttpRequest LIST_OBJECT_ACL_REQUEST = HttpRequest.builder().method("GET")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl")
|
||||
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
public final HttpRequest LIST_OBJECT_ACL_REQUEST_WITHOPTIONS = HttpRequest.builder().method("GET")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl")
|
||||
.addQueryParam("generation", "100").addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN).build();
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest insertRequest = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/object_acl_insert_request_payload.json",
|
||||
|
@ -161,7 +161,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest insertRequest = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.addQueryParam("generation", "100")
|
||||
|
@ -185,7 +185,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest update = HttpRequest
|
||||
.builder()
|
||||
.method("PUT")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/object_acl_request_payload.json",
|
||||
|
@ -207,7 +207,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest update = HttpRequest
|
||||
.builder()
|
||||
.method("PUT")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/allUsers")
|
||||
.addQueryParam("generation", "100")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
|
@ -232,7 +232,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest patchRequest = HttpRequest
|
||||
.builder()
|
||||
.method("PATCH")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/allUsers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
.payload(payloadFromResourceWithContentType("/object_acl_request_payload.json",
|
||||
|
@ -254,7 +254,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
|
|||
HttpRequest patchRequest = HttpRequest
|
||||
.builder()
|
||||
.method("PATCH")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers")
|
||||
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/allUsers")
|
||||
.addQueryParam("generation", "100")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("Authorization", "Bearer " + TOKEN)
|
||||
|
|
|
@ -68,7 +68,7 @@ import com.google.common.primitives.Bytes;
|
|||
public class ObjectApiLiveTest extends BaseGoogleCloudStorageApiLiveTest {
|
||||
|
||||
private static final String BUCKET_NAME = "jcloudsobjectoperations" + UUID.randomUUID();
|
||||
private static final String BUCKET_NAME2 = "jcloudobjectdestination" + UUID.randomUUID();
|
||||
private static final String BUCKET_NAME2 = "jcloudsobjectdestination" + UUID.randomUUID();
|
||||
private static final String UPLOAD_OBJECT_NAME = "objectOperation.txt";
|
||||
private static final String UPLOAD_OBJECT_NAME2 = "jcloudslogo.jpg";
|
||||
private static final String MULTIPART_UPLOAD_OBJECT = "multipart_related.jpg";
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BucketAclGetTest extends BaseGoogleCloudStorageParseTest<BucketAcce
|
|||
@Override
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public BucketAccessControls expected() {
|
||||
return BucketAccessControls.builder().bucket("jcloudtestbucket").entity("allUsers").role(Role.READER)
|
||||
.id("jcloudtestbucket/allUsers").build();
|
||||
return BucketAccessControls.builder().bucket("jcloudstestbucket").entity("allUsers").role(Role.READER)
|
||||
.id("jcloudstestbucket/allUsers").build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ public class BucketAclInsertTest extends BaseGoogleCloudStorageParseTest<BucketA
|
|||
public BucketAccessControls expected() {
|
||||
return BucketAccessControls
|
||||
.builder()
|
||||
.id("jcloudtestbucket/allAuthenticatedUsers")
|
||||
.bucket("jcloudtestbucket").entity("allAuthenticatedUsers").role(Role.WRITER).build();
|
||||
.id("jcloudstestbucket/allAuthenticatedUsers")
|
||||
.bucket("jcloudstestbucket").entity("allAuthenticatedUsers").role(Role.WRITER).build();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,14 +32,14 @@ import com.google.common.collect.ImmutableList;
|
|||
|
||||
public class BucketAclListTest extends BaseGoogleCloudStorageParseTest<List<BucketAccessControls>> {
|
||||
|
||||
private BucketAccessControls item_1 = BucketAccessControls.builder().id("jcloudtestbucket/allUsers")
|
||||
.bucket("jcloudtestbucket").entity("allUsers").role(Role.READER).build();
|
||||
private BucketAccessControls item_1 = BucketAccessControls.builder().id("jcloudstestbucket/allUsers")
|
||||
.bucket("jcloudstestbucket").entity("allUsers").role(Role.READER).build();
|
||||
|
||||
private BucketAccessControls item_2 = BucketAccessControls
|
||||
.builder()
|
||||
.id("jcloudtestbucket/project-owners-1082289308625")
|
||||
.id("jcloudstestbucket/project-owners-1082289308625")
|
||||
.projectTeam(ProjectTeam.create("1082289308625", Team.OWNERS))
|
||||
.bucket("jcloudtestbucket").entity("project-owners-1082289308625").role(Role.OWNER).build();
|
||||
.bucket("jcloudstestbucket").entity("project-owners-1082289308625").role(Role.OWNER).build();
|
||||
|
||||
@Override
|
||||
public String resource() {
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BucketAclUpdateTest extends BaseGoogleCloudStorageParseTest<BucketA
|
|||
@Override
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public BucketAccessControls expected() {
|
||||
return BucketAccessControls.builder().id("jcloudtestbucket/allUsers")
|
||||
.bucket("jcloudtestbucket").entity("allUsers").role(Role.OWNER).build();
|
||||
return BucketAccessControls.builder().id("jcloudstestbucket/allUsers")
|
||||
.bucket("jcloudstestbucket").entity("allUsers").role(Role.OWNER).build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ public class FullBucketGetTest extends BaseGoogleCloudStorageParseTest<Bucket> {
|
|||
|
||||
private final BucketAccessControls acl1 = BucketAccessControls
|
||||
.builder()
|
||||
.id("jcloudtestbucket3500/project-owners-1082289308625")
|
||||
.bucket("jcloudtestbucket3500").entity("project-owners-1082289308625").role(Role.OWNER)
|
||||
.id("jcloudstestbucket3500/project-owners-1082289308625")
|
||||
.bucket("jcloudstestbucket3500").entity("project-owners-1082289308625").role(Role.OWNER)
|
||||
.projectTeam(ProjectTeam.create("1082289308625", Team.OWNERS))
|
||||
.build();
|
||||
|
||||
|
@ -60,8 +60,8 @@ public class FullBucketGetTest extends BaseGoogleCloudStorageParseTest<Bucket> {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public Bucket expected() {
|
||||
return Bucket.create(
|
||||
"jcloudtestbucket3500", // id
|
||||
"jcloudtestbucket3500", // name
|
||||
"jcloudstestbucket3500", // id
|
||||
"jcloudstestbucket3500", // name
|
||||
1082289308625l, // projectNumber
|
||||
new SimpleDateFormatDateService().iso8601DateParse("2014-06-19T14:03:22.345Z"), // timeCreated
|
||||
10l, // metageneration
|
||||
|
|
|
@ -37,13 +37,13 @@ public class ObjectAclGetTest extends BaseGoogleCloudStorageParseTest<ObjectAcce
|
|||
public ObjectAccessControls expected() {
|
||||
return ObjectAccessControls
|
||||
.builder()
|
||||
.bucket("jcloudtestbucket")
|
||||
.bucket("jcloudstestbucket")
|
||||
.object("foo.txt")
|
||||
.generation(1394121608485000L)
|
||||
.entity("project-owners-1082289308625")
|
||||
.role(ObjectRole.OWNER)
|
||||
.projectTeam(ProjectTeam.create("1082289308625", Team.OWNERS))
|
||||
.id("jcloudtestbucket/foo.txt/1394121608485000/project-owners-1082289308625").build();
|
||||
.id("jcloudstestbucket/foo.txt/1394121608485000/project-owners-1082289308625").build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ObjectAclInsertTest extends BaseGoogleCloudStorageParseTest<ObjectA
|
|||
public ObjectAccessControls expected() {
|
||||
return ObjectAccessControls
|
||||
.builder()
|
||||
.bucket("jcloudtestbucket").object("foo.txt")
|
||||
.bucket("jcloudstestbucket").object("foo.txt")
|
||||
.entity("user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d")
|
||||
.entityId("00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d").role(ObjectRole.OWNER)
|
||||
.build();
|
||||
|
|
|
@ -31,8 +31,8 @@ public class ObjectAclListTest extends BaseGoogleCloudStorageParseTest<List<Obje
|
|||
|
||||
private ObjectAccessControls item1 = ObjectAccessControls
|
||||
.builder()
|
||||
.id("jcloudtestbucket/foo.txt/1394121608485000/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d")
|
||||
.bucket("jcloudtestbucket").object("foo.txt").generation(Long.valueOf("1394121608485000"))
|
||||
.id("jcloudstestbucket/foo.txt/1394121608485000/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d")
|
||||
.bucket("jcloudstestbucket").object("foo.txt").generation(Long.valueOf("1394121608485000"))
|
||||
.entity("user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d")
|
||||
.entityId("00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d").role(ObjectRole.OWNER)
|
||||
.build();
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ObjectAclUpdateTest extends BaseGoogleCloudStorageParseTest<ObjectA
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
public ObjectAccessControls expected() {
|
||||
return ObjectAccessControls.builder()
|
||||
.bucket("jcloudtestbucket").object("foo.txt").entity("allUsers").role(ObjectRole.OWNER).build();
|
||||
.bucket("jcloudstestbucket").object("foo.txt").entity("allUsers").role(ObjectRole.OWNER).build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"kind": "storage#bucketAccessControl",
|
||||
"id": "jcloudtestbucket/allUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/allUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allUsers",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"entity": "allUsers",
|
||||
"role": "READER",
|
||||
"etag": "CAM="
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"kind": "storage#bucketAccessControl",
|
||||
"id": "jcloudtestbucket/allAuthenticatedUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allAuthenticatedUsers",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/allAuthenticatedUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allAuthenticatedUsers",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"entity": "allAuthenticatedUsers",
|
||||
"role": "WRITER",
|
||||
"etag": "CAQ="
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
"items": [
|
||||
{
|
||||
"kind": "storage#bucketAccessControl",
|
||||
"id": "jcloudtestbucket/allUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/allUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allUsers",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"entity": "allUsers",
|
||||
"role": "READER",
|
||||
"etag": "CAc="
|
||||
},
|
||||
{
|
||||
"kind": "storage#bucketAccessControl",
|
||||
"id": "jcloudtestbucket/project-owners-1082289308625",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudtestbucket/acl/project-owners-1082289308625",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/project-owners-1082289308625",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudstestbucket/acl/project-owners-1082289308625",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"entity": "project-owners-1082289308625",
|
||||
"role": "OWNER",
|
||||
"projectTeam": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"kind": "storage#bucketAccessControl",
|
||||
"id": "jcloudtestbucket/allUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/allUsers",
|
||||
"selfLink": "https://content.googleapis.com/storage/v1/b/jcloudstestbucket/acl/allUsers",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"entity": "allUsers",
|
||||
"role": "OWNER",
|
||||
"etag": "CAg="
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"kind": "storage#bucket",
|
||||
"id": "jcloudtestbucket3500",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket3500",
|
||||
"id": "jcloudstestbucket3500",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket3500",
|
||||
"projectNumber": "1082289308625",
|
||||
"name": "jcloudtestbucket3500",
|
||||
"name": "jcloudstestbucket3500",
|
||||
"timeCreated": "2014-06-19T14:03:22.345Z",
|
||||
"metageneration": "10",
|
||||
"acl": [
|
||||
{
|
||||
"kind": "storage#bucketAccessControl",
|
||||
"id": "jcloudtestbucket3500/project-owners-1082289308625",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket3500/acl/project-owners-1082289308625",
|
||||
"bucket": "jcloudtestbucket3500",
|
||||
"id": "jcloudstestbucket3500/project-owners-1082289308625",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket3500/acl/project-owners-1082289308625",
|
||||
"bucket": "jcloudstestbucket3500",
|
||||
"entity": "project-owners-1082289308625",
|
||||
"role": "OWNER",
|
||||
"projectTeam": {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"kind": "storage#buckets",
|
||||
"nextPageToken": "jcloudtestbucket500",
|
||||
"nextPageToken": "jcloudstestbucket500",
|
||||
"items": [
|
||||
{
|
||||
"kind": "storage#bucket",
|
||||
"id": "jcloudtestbucket500",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket500",
|
||||
"id": "jcloudstestbucket500",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket500",
|
||||
"projectNumber": "1082289308625",
|
||||
"name": "jcloudtestbucket500",
|
||||
"name": "jcloudstestbucket500",
|
||||
"timeCreated": "2014-06-17T14:17:50.155Z",
|
||||
"metageneration": "1",
|
||||
"owner": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"kind": "storage#objectAccessControl",
|
||||
"id": "jcloudtestbucket/foo.txt/1394121608485000/project-owners-1082289308625",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/project-owners-1082289308625",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/foo.txt/1394121608485000/project-owners-1082289308625",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/project-owners-1082289308625",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"object": "foo.txt",
|
||||
"generation": "1394121608485000",
|
||||
"entity": "project-owners-1082289308625",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"kind": "storage#objectAccessControl",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"object": "foo.txt",
|
||||
"entity": "user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"role": "OWNER",
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
"items": [
|
||||
{
|
||||
"kind": "storage#objectAccessControl",
|
||||
"id": "jcloudtestbucket/foo.txt/1394121608485000/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"id": "jcloudstestbucket/foo.txt/1394121608485000/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"object": "foo.txt",
|
||||
"generation": "1394121608485000",
|
||||
"entity": "user-00b4903a97adfde729f0650133a7379693099d8d85d6b1b18255ca70bf89e31d",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"kind": "storage#objectAccessControl",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/allUsers",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"object": "foo.txt",
|
||||
"entity": "allUsers",
|
||||
"role": "OWNER",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"kind": "storage#objectAccessControl",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers",
|
||||
"bucket": "jcloudtestbucket",
|
||||
"selfLink": "https://www.googleapis.com/storage/v1/b/jcloudstestbucket/o/foo.txt/acl/allUsers",
|
||||
"bucket": "jcloudstestbucket",
|
||||
"object": "foo.txt",
|
||||
"entity": "allUsers",
|
||||
"role": "OWNER",
|
||||
|
|
Loading…
Reference in New Issue