You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Andrew Gaul <no...@github.com> on 2016/01/22 23:33:18 UTC
[jclouds] Return response from StaticLargeObjectApi.delete (#905)
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds/pull/905
-- Commit Summary --
* Return response from StaticLargeObjectApi.delete
-- File Changes --
M apis/openstack-swift/pom.xml (5)
M apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/config/SwiftTypeAdapters.java (39)
A apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/domain/DeleteStaticLargeObjectResponse.java (39)
M apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApi.java (3)
M apis/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/StaticLargeObjectApiLiveTest.java (26)
-- Patch Links --
https://github.com/jclouds/jclouds/pull/905.patch
https://github.com/jclouds/jclouds/pull/905.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/905
Re: [jclouds] Return response from StaticLargeObjectApi.delete (#905)
Posted by Zack Shoylev <no...@github.com>.
> assertEquals(api.getContainerApi(regionId).get(containerName).getObjectCount(), 0);
> }
> }
>
> + public void testDeleteSinglePartObjectWithMultiPartDelete() throws Exception {
> + String objectName = "testDeleteSinglePartObjectWithMultiPartDelete";
> + for (String regionId : regions) {
> + api.getObjectApi(regionId, containerName).put(objectName, newByteSourcePayload(ByteSource.wrap("swifty".getBytes())));
> + DeleteStaticLargeObjectResponse resp = api.getStaticLargeObjectApi(regionId, containerName).delete(objectName);
> + assertThat(resp.status()).isEqualTo("400 Bad Request");
Ok, looks good.
But shouldn't the mock test for StaticLargeObjectApi also change to account for the response change?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/905/files#r50750342
Re: [jclouds] Return response from StaticLargeObjectApi.delete (#905)
Posted by Andrew Gaul <no...@github.com>.
> assertEquals(api.getContainerApi(regionId).get(containerName).getObjectCount(), 0);
> }
> }
>
> + public void testDeleteSinglePartObjectWithMultiPartDelete() throws Exception {
> + String objectName = "testDeleteSinglePartObjectWithMultiPartDelete";
> + for (String regionId : regions) {
> + api.getObjectApi(regionId, containerName).put(objectName, newByteSourcePayload(ByteSource.wrap("swifty".getBytes())));
> + DeleteStaticLargeObjectResponse resp = api.getStaticLargeObjectApi(regionId, containerName).delete(objectName);
> + assertThat(resp.status()).isEqualTo("400 Bad Request");
Augmented mock tests in the updated commit.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/905/files#r50757922
Re: [jclouds] Return response from StaticLargeObjectApi.delete (#905)
Posted by Andrew Gaul <no...@github.com>.
@zack-shoylev Please review. Related to #878.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/905#issuecomment-174074660
Re: [jclouds] Return response from StaticLargeObjectApi.delete (#905)
Posted by Zack Shoylev <no...@github.com>.
+1
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/905#issuecomment-174732746
Re: [jclouds] Return response from StaticLargeObjectApi.delete (#905)
Posted by Andrew Gaul <no...@github.com>.
> assertEquals(api.getContainerApi(regionId).get(containerName).getObjectCount(), 0);
> }
> }
>
> + public void testDeleteSinglePartObjectWithMultiPartDelete() throws Exception {
> + String objectName = "testDeleteSinglePartObjectWithMultiPartDelete";
> + for (String regionId : regions) {
> + api.getObjectApi(regionId, containerName).put(objectName, newByteSourcePayload(ByteSource.wrap("swifty".getBytes())));
> + DeleteStaticLargeObjectResponse resp = api.getStaticLargeObjectApi(regionId, containerName).delete(objectName);
> + assertThat(resp.status()).isEqualTo("400 Bad Request");
This illustrates the problem we encountered in #878.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/905/files#r50601140