> @@ -43,4 +51,36 @@ public void machineTypes() {
>
> assertEquals(machineTypeAsList.size(), 9); // zone count!
> }
> +
> + public void addresses() {
> + Iterator<ListPage<Address>> pageIterator =
> api().addresses(maxResults(1));
> + assertFalse(pageIterator.hasNext());
> + }
> +
> + public void disks() {
> +
> assertOperationDoneSuccessfully(api.disksInZone(DEFAULT_ZONE_NAME).create(DISK_NAME,
> 1));
> + Iterator<ListPage<Disk>> pageIterator =
> api().disks(maxResults(1));
> + assertTrue(pageIterator.hasNext());
> + List<Disk> disksAsList = pageIterator.next();
> + assertEquals(disksAsList.size(), 1); // zone count!
> +
> assertOperationDoneSuccessfully(api.disksInZone(DEFAULT_ZONE_NAME).delete(DISK_NAME));
I'd hate for folks to have to spend money creating disks just to be counted for
this test. For resources that are user defined (as opposed to system defined),
just loop in the test and throw SkipException if there's nothing to count.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/92/files#r20270351