Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

docs(samples): added samples and test for recaptcha key operations #643

Merged
merged 4 commits into from Dec 7, 2021

Conversation

Sita04
Copy link
Contributor

@Sita04 Sita04 commented Nov 18, 2021

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #642 ☕️

@product-auto-label product-auto-label bot added the api: recaptchaenterprise Issues related to the googleapis/java-recaptchaenterprise API. label Nov 18, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 18, 2021
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Nov 18, 2021
@snippet-bot
Copy link

snippet-bot bot commented Nov 18, 2021

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@Sita04 Sita04 requested a review from a team as a code owner November 18, 2021 19:14
@Sita04
Copy link
Contributor Author

Sita04 commented Nov 24, 2021

@eaball35 PTAL

System.out.println(key.getName());
}
return response;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This response is being used in the MigrateKey file. Returning void would mean adding this piece of code to the MigrateKey file (which would be redundant).
Is it okay to treat cases like this as an exception?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should avoid returning any value wherever possible, but otherwise fine

* @param projectId: Google Cloud Project Id.
* @param recaptchaSiteKey: Specify the site key to migrate.
*/
public static void migrateKey(String projectId, String recaptchaSiteKey) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrate key can't be tested through client libraries as the non-enterprise version of the key needs to be created only through the Admin Console.

Copy link
Contributor

@eaball35 eaball35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments

@Sita04 Sita04 requested a review from eaball35 December 6, 2021 19:39
@eaball35 eaball35 merged commit 748d165 into main Dec 7, 2021
@eaball35 eaball35 deleted the update-samples-basic-ops branch December 7, 2021 18:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: recaptchaenterprise Issues related to the googleapis/java-recaptchaenterprise API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
2 participants