> @@ -36,6 +42,21 @@ public GoogleComputeEngineServiceLiveTest() {
> provider = "google-compute-engine";
> }
>
> + @Override
> + protected Properties setupProperties() {
> + Properties props = super.setupProperties();
> + setCredentialFromPemFile(props, provider + ".credential");
> + return props;
> + }
> +
> + @Test
> + public void testGetImage() throws Exception {
> + Set<? extends Image> images = client.listImages();
> + String id = Iterables.getLast(images, null).getId();
Won't this blow up if `null` is returned as the default value? If `null` is
never expected to be returned here, state that in a comment? And why "getLast"
instead of e.g. "getFirst", for instance?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/24/files#r12030954