jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] Added Bucket Access Control with Tests (#27)
Date Wed, 17 Sep 2014 18:02:45 GMT
> +               .payload(payloadFromResourceWithContentType("/bucketacl_update_response.json",
> +                        MediaType.APPLICATION_JSON)).build();
> +
> +      HttpResponse patchResponse = HttpResponse.builder().statusCode(200)
> +               .payload(staticPayloadFromResource("/bucketacl_update_initial.json")).build();
> +
> +      BucketAccessControlsApi api = requestsSendResponses(requestForScopes(STORAGE_FULLCONTROL_SCOPE),
TOKEN_RESPONSE,
> +               patchRequest, patchResponse).getBucketAccessControlsApi();
> +
> +      BucketAccessControls options = BucketAccessControls.builder().id("jcloudtestbucket/allUsers")
> +               .selfLink(URI.create("https://content.googleapis.com/storage/v1/b/jcloudtestbucket/acl/allUsers"))
> +               .bucket(EXPECTED_TEST_BUCKET).entity("allUsers").role(Role.OWNER).etag("CAg=").build();
> +
> +      assertEquals(api.patchBucketAccessControls(EXPECTED_TEST_BUCKET, "allUsers", options),
> +               new BucketaclUpdateTest().expected());
> +   }

This is still using the expect style...we use MockWebServer now?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/27/files#r17681834
Mime
View raw message