JCLOUDS-458: Resource name changes

This commit is contained in:
hsbhathiya 2014-08-26 10:18:00 +05:30 committed by Andrew Gaul
parent bd31ab6eef
commit a4423c0bb0
40 changed files with 51 additions and 51 deletions

View File

@ -46,17 +46,17 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
private final HttpResponse GET_BUCKETACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/bucketacl_get.json")).build();
.payload(staticPayloadFromResource("/bucket_acl_get.json")).build();
private final HttpResponse CREATE_BUCKETACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/bucketacl_insert_response.json")).build();
.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")
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
private final HttpResponse LIST_BUCKETACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/bucketacl_list.json")).build();
.payload(staticPayloadFromResource("/bucket_acl_list.json")).build();
// Test getBucketAccessControls
public void testGetBucketAclResponseIs2xx() throws Exception {
@ -105,7 +105,7 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/bucketacl_insert_response.json",
.payload(payloadFromResourceWithContentType("/bucket_acl_insert_response.json",
MediaType.APPLICATION_JSON)).build();
BucketAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
@ -157,11 +157,11 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/bucketacl_update_response.json",
.payload(payloadFromResourceWithContentType("/bucket_acl_update_response.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/bucketacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/bucket_acl_update_initial.json")).build();
BucketAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
update, updateResponse).getBucketAccessControlsApi();
@ -182,11 +182,11 @@ public class BucketAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/bucketacl_update_response.json",
.payload(payloadFromResourceWithContentType("/bucket_acl_update_response.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse patchResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/bucketacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/bucket_acl_update_initial.json")).build();
BucketAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
patchRequest, patchResponse).getBucketAccessControlsApi();

View File

@ -55,7 +55,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
private final HttpResponse BUCKET_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/noAcl_bucket.json")).build();
.payload(staticPayloadFromResource("/no_acl_bucket.json")).build();
public static final HttpRequest LIST_BUCKET_REQUEST = HttpRequest.builder().method("GET")
.endpoint("https://www.googleapis.com/storage/v1/b").addQueryParam("project", EXPECTED_TEST_PROJECT_NUMBER)
@ -67,7 +67,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
private final HttpResponse LIST_BUCKET_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/noAcl_bucket_list.json")).build();
.payload(staticPayloadFromResource("/no_acl_bucket_list.json")).build();
// Test getBucket without options
public void testGetBucketWithNoOptionsResponseIs2xx() throws Exception {
@ -139,7 +139,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.addHeader("Accept", "application/json")
.addQueryParam("project", EXPECTED_TEST_PROJECT_NUMBER)
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/bucket_insert_requestpayload.json",
.payload(payloadFromResourceWithContentType("/bucket_insert_request_payload.json",
MediaType.APPLICATION_JSON)).build();
BucketApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
@ -164,7 +164,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.endpoint("https://www.googleapis.com/storage/v1/b/" + EXPECTED_TEST_BUCKET)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/bucket_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/bucket_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
@ -192,7 +192,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.addHeader("Authorization", "Bearer " + TOKEN)
.addQueryParam("projection", Projection.NO_ACL.toString())
.addQueryParam("ifMetagenerationNotMatch", "100")
.payload(payloadFromResourceWithContentType("/bucket_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/bucket_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
@ -217,7 +217,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.endpoint("https://www.googleapis.com/storage/v1/b/" + EXPECTED_TEST_BUCKET)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/bucket_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/bucket_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse patchResponse = HttpResponse.builder().statusCode(200)
@ -245,7 +245,7 @@ public class BucketApiExpectTest extends BaseGoogleCloudStorageApiExpectTest {
.addHeader("Authorization", "Bearer " + TOKEN)
.addQueryParam("projection", Projection.NO_ACL.toString())
.addQueryParam("ifMetagenerationNotMatch", "100")
.payload(payloadFromResourceWithContentType("/bucket_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/bucket_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse patchResponse = HttpResponse.builder().statusCode(200)

View File

@ -48,17 +48,17 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
private final HttpResponse GET_DEFAULT_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/default_objectacl_get.json")).build();
.payload(staticPayloadFromResource("/default_object_acl_get.json")).build();
private final HttpResponse CREATE_DEFAULT_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/default_objectacl_insert_response.json")).build();
.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")
.addHeader("Accept", "application/json").addHeader("Authorization", "Bearer " + TOKEN).build();
private final HttpResponse LIST_DEFAULT_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/default_objectacl_list.json")).build();
.payload(staticPayloadFromResource("/default_object_acl_list.json")).build();
// Test getDefaultObjectAccessControls
public void testGetDefaultObjectAclResponseIs2xx() throws Exception {
@ -109,7 +109,7 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/default_objectacl_insert_requestpayload.json",
.payload(payloadFromResourceWithContentType("/default_object_acl_insert_request_payload.json",
MediaType.APPLICATION_JSON)).build();
DefaultObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE),
@ -157,11 +157,11 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/default_objectacl_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/default_object_acl_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/default_objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/default_object_acl_update_initial.json")).build();
DefaultObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE),
TOKEN_RESPONSE, update, updateResponse).getDefaultObjectAccessControlsApi();
@ -182,11 +182,11 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.addQueryParam("role", ObjectRole.OWNER.toString())
.payload(payloadFromResourceWithContentType("/default_objectacl_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/default_object_acl_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/default_objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/default_object_acl_update_initial.json")).build();
DefaultObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE),
TOKEN_RESPONSE, update, updateResponse).getDefaultObjectAccessControlsApi();
@ -206,11 +206,11 @@ public class DefaultObjectAccessControlsApiExpectTest extends BaseGoogleCloudSto
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/defaultObjectAcl/allUsers")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/default_objectacl_update_requestpayload.json",
.payload(payloadFromResourceWithContentType("/default_object_acl_update_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/default_objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/default_object_acl_update_initial.json")).build();
DefaultObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE),
TOKEN_RESPONSE, update, updateResponse).getDefaultObjectAccessControlsApi();

View File

@ -58,10 +58,10 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.addHeader("Authorization", "Bearer " + TOKEN).build();
public final HttpResponse GET_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_get.json")).build();
.payload(staticPayloadFromResource("/object_acl_get.json")).build();
public final HttpResponse CREATE_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_insert_response.json")).build();
.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")
@ -73,7 +73,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.addHeader("Authorization", "Bearer " + TOKEN).build();
public final HttpResponse LIST_OBJECT_ACL_RESPONSE = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_list.json")).build();
.payload(staticPayloadFromResource("/object_acl_list.json")).build();
// Test getObjectAccessControls
public void testGetObjectaclWithNoOptionsResponseIs2xx() throws Exception {
@ -145,7 +145,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/objectacl_insert_requestpayload.json",
.payload(payloadFromResourceWithContentType("/object_acl_insert_request_payload.json",
MediaType.APPLICATION_JSON)).build();
ObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
@ -167,7 +167,7 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.addQueryParam("generation", "100")
.payload(payloadFromResourceWithContentType("/objectacl_insert_requestpayload.json",
.payload(payloadFromResourceWithContentType("/object_acl_insert_request_payload.json",
MediaType.APPLICATION_JSON)).build();
ObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
@ -190,11 +190,11 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/objectacl_request_payload.json",
.payload(payloadFromResourceWithContentType("/object_acl_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/object_acl_update_initial.json")).build();
ObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
update, updateResponse).getObjectAccessControlsApi();
@ -214,11 +214,11 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.addQueryParam("generation", "100")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/objectacl_request_payload.json",
.payload(payloadFromResourceWithContentType("/object_acl_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse updateResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/object_acl_update_initial.json")).build();
ObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
update, updateResponse).getObjectAccessControlsApi();
@ -239,11 +239,11 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.endpoint("https://www.googleapis.com/storage/v1/b/jcloudtestbucket/o/foo.txt/acl/allUsers")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/objectacl_request_payload.json",
.payload(payloadFromResourceWithContentType("/object_acl_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse patchResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/object_acl_update_initial.json")).build();
ObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
patchRequest, patchResponse).getObjectAccessControlsApi();
@ -263,11 +263,11 @@ public class ObjectAccessControlsApiExpectTest extends BaseGoogleCloudStorageApi
.addQueryParam("generation", "100")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN)
.payload(payloadFromResourceWithContentType("/objectacl_request_payload.json",
.payload(payloadFromResourceWithContentType("/object_acl_request_payload.json",
MediaType.APPLICATION_JSON)).build();
HttpResponse patchResponse = HttpResponse.builder().statusCode(200)
.payload(staticPayloadFromResource("/objectacl_update_initial.json")).build();
.payload(staticPayloadFromResource("/object_acl_update_initial.json")).build();
ObjectAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE), TOKEN_RESPONSE,
patchRequest, patchResponse).getObjectAccessControlsApi();

View File

@ -29,7 +29,7 @@ public class BucketAclGetTest extends BaseGoogleCloudStorageParseTest<BucketAcce
@Override
public String resource() {
return "/bucketacl_get.json";
return "/bucket_acl_get.json";
}
@Override

View File

@ -29,7 +29,7 @@ public class BucketAclInsertTest extends BaseGoogleCloudStorageParseTest<BucketA
@Override
public String resource() {
return "/bucketacl_insert_response.json";
return "/bucket_acl_insert_response.json";
}
@Override

View File

@ -47,7 +47,7 @@ public class BucketAclListTest extends BaseGoogleCloudStorageParseTest<ListBucke
@Override
public String resource() {
return "/bucketacl_list.json";
return "/bucket_acl_list.json";
}
@Override

View File

@ -29,7 +29,7 @@ public class BucketAclUpdateTest extends BaseGoogleCloudStorageParseTest<BucketA
@Override
public String resource() {
return "/bucketacl_update_response.json";
return "/bucket_acl_update_response.json";
}
@Override

View File

@ -29,7 +29,7 @@ public class DefaultObjectAclGetTest extends BaseGoogleCloudStorageParseTest<Def
@Override
public String resource() {
return "/default_objectacl_get.json";
return "/default_object_acl_get.json";
}
@Override

View File

@ -27,7 +27,7 @@ public class DefaultObjectAclInsertTest extends BaseGoogleCloudStorageParseTest<
@Override
public String resource() {
return "/default_objectacl_insert_response.json";
return "/default_object_acl_insert_response.json";
}
@Override

View File

@ -38,7 +38,7 @@ public class DefaultObjectAclListTest extends BaseGoogleCloudStorageParseTest<Li
@Override
public String resource() {
return "/default_objectacl_list.json";
return "/default_object_acl_list.json";
}
@Override

View File

@ -41,7 +41,7 @@ public class NoAclBucketListTest extends BaseGoogleCloudStorageParseTest<ListPag
@Override
public String resource() {
return "/noAcl_bucket_list.json";
return "/no_acl_bucket_list.json";
}
@Override

View File

@ -32,7 +32,7 @@ public class NoAclBucketTest extends BaseGoogleCloudStorageParseTest<Bucket> {
@Override
public String resource() {
return "/noAcl_bucket.json";
return "/no_acl_bucket.json";
}
@Override

View File

@ -31,7 +31,7 @@ public class ObjectAclGetTest extends BaseGoogleCloudStorageParseTest<ObjectAcce
@Override
public String resource() {
return "/objectacl_get.json";
return "/object_acl_get.json";
}
@Override

View File

@ -29,7 +29,7 @@ public class ObjectAclInsertTest extends BaseGoogleCloudStorageParseTest<ObjectA
@Override
public String resource() {
return "/objectacl_insert_response.json";
return "/object_acl_insert_response.json";
}
@Override

View File

@ -43,7 +43,7 @@ public class ObjectAclListTest extends BaseGoogleCloudStorageParseTest<ListObjec
@Override
public String resource() {
return "/objectacl_list.json";
return "/object_acl_list.json";
}
@Override

View File

@ -29,7 +29,7 @@ public class ObjectAclUpdateTest extends BaseGoogleCloudStorageParseTest<ObjectA
@Override
public String resource() {
return "/objectacl_update_response.json";
return "/object_acl_update_response.json";
}
@Override