> + */
> +public class GoogleComputeEngineCredentialSupplierFromJson implements
> Supplier<Credentials>{
> +
> + private Credentials creds;
> +
> + private GoogleComputeEngineCredentialSupplierFromJson(String jsonString){
> + creds = parseJsonKeyString(jsonString);
> + }
> +
> + /**
> + * Function for parsing JSON Key file downloaded from GCP developers
> console.
> + *
> + * @param pathToJsonFile.
> + * @return Credentials object with Credentials.identity and
> Credentials.credential correctly set.
> + */
> + public static Credentials parseJsonKeyString(String jsonString) {
Better make this method private and call supplier.get() in the tests.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/124/files#r23723311