> @@ -66,4 +67,14 @@ public void testDeleteItemFromMetadata() {
> assertEquals(project.commonInstanceMetadata().size(),
> initialMetadataSize);
> assertEquals(project.commonInstanceMetadata().fingerprint(),
> initialFingerprint);
> }
> +
> + @Test(groups = "live", dependsOnMethods = "getProject")
> + public void testSetUsageExportBucket() {
> + Operation o = api.project().setUsageExportBucket("test-bucket",
> "test-");
> + while (o.error().errors().isEmpty()) {
> + o = api.operations().get(o.selfLink());
> + }
The loop is because the `waitOperationDone` times out. I wanted a way to test
`setUsageExportBucket ` without setting up a storage bucket that the project
has "owner" access to. I thought a reasonable way to do this would be to point
to an invalid bucket and check that the error messages are as expected.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/112/files#r22561159