@@ -45,8 +45,8 @@ public class RemoteGcsHelper {
4545
4646 private static final Logger log = Logger .getLogger (RemoteGcsHelper .class .getName ());
4747 private static final String BUCKET_NAME_PREFIX = "gcloud-test-bucket-temp-" ;
48- private static final String PROJECT_ID_ENV_VAR = "GCLOUD_TESTS_PROJECT_ID " ;
49- private static final String PRIVATE_KEY_ENV_VAR = "GCLOUD_TESTS_KEY " ;
48+ private static final String PROJECT_ID_ENV_VAR = "GCLOUD_PROJECT " ;
49+ private static final String PRIVATE_KEY_ENV_VAR = "GOOGLE_APPLICATION_CREDENTIALS " ;
5050 private final StorageOptions options ;
5151
5252 private RemoteGcsHelper (StorageOptions options ) {
@@ -145,22 +145,17 @@ public static RemoteGcsHelper create(String projectId, String keyPath)
145145 log .log (Level .WARNING , ex .getMessage ());
146146 }
147147 throw GcsHelperException .translate (ex );
148- } catch (IOException ex ) {
149- if (log .isLoggable (Level .WARNING )) {
150- log .log (Level .WARNING , ex .getMessage ());
151- }
152- throw GcsHelperException .translate (ex );
153148 }
154149 }
155150
156151 /**
157152 * Creates a {@code RemoteGcsHelper} object. Project id and path to JSON key are read from two
158- * environment variables: {@code GCLOUD_TESTS_PROJECT_ID } and {@code GCLOUD_TESTS_KEY }.
153+ * environment variables: {@code GCLOUD_PROJECT } and {@code GOOGLE_APPLICATION_CREDENTIALS }.
159154 *
160155 * @return A {@code RemoteGcsHelper} object for the provided options.
161156 * @throws com.google.gcloud.storage.testing.RemoteGcsHelper.GcsHelperException if environment
162- * variables {@code GCLOUD_TESTS_PROJECT_ID } and {@code GCLOUD_TESTS_KEY } are not set or if
163- * the file pointed by {@code GCLOUD_TESTS_KEY } does not exist
157+ * variables {@code GCLOUD_PROJECT } and {@code GOOGLE_APPLICATION_CREDENTIALS } are not set or
158+ * if the file pointed by {@code GOOGLE_APPLICATION_CREDENTIALS } does not exist
164159 */
165160 public static RemoteGcsHelper create () throws GcsHelperException {
166161 String projectId = System .getenv (PROJECT_ID_ENV_VAR );
0 commit comments