-
Notifications
You must be signed in to change notification settings - Fork 126
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
docs(samples): add auth user flow and query #478
Conversation
Codecov Report
@@ Coverage Diff @@
## master #478 +/- ##
============================================
- Coverage 81.49% 81.35% -0.15%
Complexity 1226 1226
============================================
Files 77 77
Lines 6220 6220
Branches 691 685 -6
============================================
- Hits 5069 5060 -9
- Misses 792 797 +5
- Partials 359 363 +4
Continue to review full report at Codecov.
|
@Test | ||
public void testAuthUserFlow() { | ||
// TODO(stephaniewang526): Replace client_secret.json | ||
/*File credentialsPath = new File(""path/to/your/client_secret.json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we cannot upload any files that contains secrets -- have to use GCS
String sourceUri = "gs://cloud-devrel-kokoro-resources/java-docs-samples/service-acct.json";
so we have to figure out how to generate File from gcs path.
samples/snippets/src/test/java/com/example/bigquery/AuthUserFlowIT.java
Outdated
Show resolved
Hide resolved
selectedScopes) | ||
.setDataStoreFactory(new FileDataStoreFactory(DATA_STORE_DIR)) | ||
.setAccessType("offline") | ||
.setApprovalPrompt("force") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to "auto" so user does not need to manually confirm
since we cannot manually approve approval prompt, we should try to do mock testing instead here. |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: