-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support enumeration of filesystems when credentials are not available #1189
Conversation
import org.junit.Test; | ||
import org.junit.rules.ExpectedException; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.JUnit4; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -123,7 +124,7 @@ protected Path computeNext() { | |||
*/ | |||
@VisibleForTesting | |||
public static void setGCloudOptions(StorageOptions newStorageOptions) { | |||
storageOptions = newStorageOptions; | |||
futureStorageOptions = newStorageOptions; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@Before | ||
public void before() { | ||
mockOptions = mock(StorageOptions.class); | ||
when(mockOptions.service()).thenReturn(StorageOptions.defaultInstance().service()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
return MoreObjects.toStringHelper(this).add("storage", storage).toString(); | ||
return "CloudStorageFileSystemProvider"; | ||
//initStorage(); | ||
//return MoreObjects.toStringHelper(this).add("storage", storage).toString(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -89,7 +89,7 @@ | |||
|
|||
@Before | |||
public void before() { | |||
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options()); | |||
CloudStorageFileSystemProvider.setStorageOptions(LocalStorageHelper.options()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thanks @jean-philippe-martin great work! |
Thank you @mziccard for the good and prompt review! |
…1189) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.8.1` -> `2.8.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.3/compatibility-slim/2.8.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.3/confidence-slim/2.8.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-core</summary> ### [`v2.8.3`](https://togithub.com/googleapis/java-core/blob/HEAD/CHANGELOG.md#​283-httpsgithubcomgoogleapisjava-corecomparev282v283-2022-07-26) [Compare Source](https://togithub.com/googleapis/java-core/compare/v2.8.1...v2.8.3) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v2 ([#​868](https://togithub.com/googleapis/java-core/issues/868)) ([e117c40](https://togithub.com/googleapis/java-core/commit/e117c40f31acf16a45bdbeeb727ba26d80eb6a51)) - update dependency com.google.api:gax-bom to v2.18.4 ([#​864](https://togithub.com/googleapis/java-core/issues/864)) ([bd40b1d](https://togithub.com/googleapis/java-core/commit/bd40b1d1b36cdcfa833047609e2488594b112be1)) - update dependency com.google.api:gax-bom to v2.18.5 ([#​876](https://togithub.com/googleapis/java-core/issues/876)) ([d8dc7fb](https://togithub.com/googleapis/java-core/commit/d8dc7fbdb0d65e493ca4154658c63e80d89ab600)) - update dependency com.google.api.grpc:proto-google-common-protos to v2.9.2 ([#​870](https://togithub.com/googleapis/java-core/issues/870)) ([7e961e9](https://togithub.com/googleapis/java-core/commit/7e961e945d5e049a1a1bb2592e9c155b5937e33b)) - update dependency com.google.api.grpc:proto-google-iam-v1 to v1.5.2 ([#​865](https://togithub.com/googleapis/java-core/issues/865)) ([fe7b974](https://togithub.com/googleapis/java-core/commit/fe7b974a0eae82711ca96edf412944309d5d6202)) - update dependency com.google.auth:google-auth-library-bom to v1.8.1 ([#​856](https://togithub.com/googleapis/java-core/issues/856)) ([92df5d3](https://togithub.com/googleapis/java-core/commit/92df5d3c248214970d38432e8c264d151298d1e6)) - update dependency com.google.http-client:google-http-client-bom to v1.42.2 ([#​871](https://togithub.com/googleapis/java-core/issues/871)) ([1972e8e](https://togithub.com/googleapis/java-core/commit/1972e8e45e11597e56609aa5fcd44e61958d5857)) - update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#​874](https://togithub.com/googleapis/java-core/issues/874)) ([1e18977](https://togithub.com/googleapis/java-core/commit/1e18977820ac766157156fb6246bd318d207971c)) - update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#​877](https://togithub.com/googleapis/java-core/issues/877)) ([d12fb5e](https://togithub.com/googleapis/java-core/commit/d12fb5e4eb8aa42015df84abf31f56408c8b64d8)) - update dependency io.grpc:grpc-bom to v1.48.0 ([#​873](https://togithub.com/googleapis/java-core/issues/873)) ([a45b075](https://togithub.com/googleapis/java-core/commit/a45b075e414049550c51ff0097337e45128fc499)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-automl). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMjcuNCIsInVwZGF0ZWRJblZlciI6IjMyLjEyNy40In0=-->
🤖 I have created a release *beep* *boop* --- ## [2.3.3](googleapis/java-automl@v2.3.2...v2.3.3) (2022-08-09) ### Dependencies * update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#1195](googleapis/java-automl#1195)) ([e676c4c](googleapis/java-automl@e676c4c)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.2 ([#1203](googleapis/java-automl#1203)) ([b6d75e2](googleapis/java-automl@b6d75e2)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#1205](googleapis/java-automl#1205)) ([18ee6b6](googleapis/java-automl@18ee6b6)) * update dependency com.google.cloud:google-cloud-core to v2.8.3 ([#1189](googleapis/java-automl#1189)) ([90f3232](googleapis/java-automl@90f3232)) * update dependency com.google.cloud:google-cloud-core to v2.8.4 ([#1190](googleapis/java-automl#1190)) ([77b2a7d](googleapis/java-automl@77b2a7d)) * update dependency com.google.cloud:google-cloud-core to v2.8.5 ([#1191](googleapis/java-automl#1191)) ([f6f08ba](googleapis/java-automl@f6f08ba)) * update dependency com.google.cloud:google-cloud-core to v2.8.6 ([#1197](googleapis/java-automl#1197)) ([9c1ff45](googleapis/java-automl@9c1ff45)) * update dependency com.google.cloud:google-cloud-core to v2.8.7 ([#1199](googleapis/java-automl#1199)) ([7bd891b](googleapis/java-automl@7bd891b)) * update dependency com.google.cloud:google-cloud-core to v2.8.8 ([#1201](googleapis/java-automl#1201)) ([026ae49](googleapis/java-automl@026ae49)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1192](googleapis/java-automl#1192)) ([94c1c3c](googleapis/java-automl@94c1c3c)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.1 ([#1198](googleapis/java-automl#1198)) ([1be2ead](googleapis/java-automl@1be2ead)) * update dependency com.google.cloud:google-cloud-storage to v2.10.0 ([#1196](googleapis/java-automl#1196)) ([73871d6](googleapis/java-automl@73871d6)) * update dependency com.google.cloud:google-cloud-storage to v2.11.0 ([#1200](googleapis/java-automl#1200)) ([ea4490e](googleapis/java-automl@ea4490e)) * update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#1202](googleapis/java-automl#1202)) ([3c8f71e](googleapis/java-automl@3c8f71e)) * update dependency com.google.cloud:google-cloud-storage to v2.11.2 ([#1204](googleapis/java-automl#1204)) ([cc4d715](googleapis/java-automl@cc4d715)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This should resolve issue #1188.
One possible point of discussion is that I have left in the tests I used to reproduce the problem and ensure that it was fixed. These tests are only meaningful when gcloud is NOT configured (the opposite requirement of our integration tests) so I have them disabled here, with the intention that they ease manual testing by un-configuring gcloud and running those tests by hand. It would be great if there were a good way to run these tests automatically.
While I was at it I added a friendly message to the integration tests in case someone tries to run them before configuring gcloud.