Skip to content
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

Add default tokens to TLD using nomulus tool #1888

Merged
merged 2 commits into from
Jan 4, 2023

Conversation

sarahcaseybot
Copy link
Collaborator

@sarahcaseybot sarahcaseybot commented Dec 20, 2022

This change is Reviewable

Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @sarahcaseybot)


core/src/main/java/google/registry/tools/CreateOrUpdateTldCommand.java line 243 at r1 (raw file):

          "A comma-separated list of default allocation tokens to be applied to the TLD. The"
              + " ordering of this list will determine which token is used in the case where"
              + " multiple tokens are valid for a registration.")

nit, maybe include something about an empty string setting the list to be empty?


core/src/main/java/google/registry/tools/UpdateOrDeleteAllocationTokensCommand.java line 60 at r1 (raw file):

          tokens.stream()
              .map(token -> VKey.create(AllocationToken.class, token))
              .collect(Collectors.toList());

better to use the toImmutableList() collector instead both here and the couple spots below


core/src/test/java/google/registry/tools/UpdateTldCommandTest.java line 241 at r1 (raw file):

    assertThat(Registry.get("xn--q9jyb4c").getDefaultPromoTokens()).isEmpty();
  }

can we have a test or two covering re-ordering of default tokens and/or removing some without removing all?

Copy link
Collaborator Author

@sarahcaseybot sarahcaseybot left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 of 6 files reviewed, 2 unresolved discussions (waiting on @gbrodman)


core/src/main/java/google/registry/tools/UpdateOrDeleteAllocationTokensCommand.java line 60 at r1 (raw file):

Previously, gbrodman wrote…

better to use the toImmutableList() collector instead both here and the couple spots below

Done.


core/src/test/java/google/registry/tools/UpdateTldCommandTest.java line 241 at r1 (raw file):

Previously, gbrodman wrote…

can we have a test or two covering re-ordering of default tokens and/or removing some without removing all?

You can only replace the entire list, not just add/remove one token. Added another test

Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @sarahcaseybot)


core/src/test/java/google/registry/tools/UpdateTldCommandTest.java line 241 at r1 (raw file):

Previously, sarahcaseybot wrote…

You can only replace the entire list, not just add/remove one token. Added another test

derp of course

@sarahcaseybot sarahcaseybot merged commit 1864132 into google:master Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants