Add TLD identifier to premium terms filename and header#2644
Add TLD identifier to premium terms filename and header#2644gbrodman merged 1 commit intogoogle:masterfrom
Conversation
jianglai
left a comment
There was a problem hiding this comment.
Are we concerned that users might be expecting a certain format and this will break their processes?
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman)
core/src/test/java/google/registry/export/ExportPremiumTermsActionTest.java line 99 at r1 (raw file):
verify(driveConnection) .createOrUpdateFile( "CONFIDENTIAL_premium_terms_tld.txt",
If you are using string literals here (and below), do you still need to keep the PREMIUM_TERMS_FILENAME variable?
gbrodman
left a comment
There was a problem hiding this comment.
Bruno doesn't have that concern. He says that we could send out an announcement but that an announcement probably isn't even necessary.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jianglai)
core/src/test/java/google/registry/export/ExportPremiumTermsActionTest.java line 99 at r1 (raw file):
Previously, jianglai (Lai Jiang) wrote…
If you are using string literals here (and below), do you still need to keep the
PREMIUM_TERMS_FILENAMEvariable?
what do you mean? I replaced this because of the general guideline to use raw string variables in tests, but we still want the PREMIUM_TERMS_FILENAME_FORMAT constant in the action itself
CydeWeys
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @gbrodman and @jianglai)
core/src/test/java/google/registry/export/ExportPremiumTermsActionTest.java line 61 at r1 (raw file):
ImmutableList.of("2048,USD 549", "0,USD 549"); private static final String EXPECTED_FILE_CONTENT = DISCLAIMER_WITH_NEWLINE + TLD_IDENTIFIER_WITH_NEWLINE + "0, 549.00\n" + "2048, 549.00\n";
Best practice in tests is to actually expand the expected strings, rather than duplicating the logic used in the code under test. That also gives the benefit of letting us see in all in one place what the resultant output actually looks like, which can help prompt further refinements.
https://b.corp.google.com/issues/390053672 This makes it easier to identify what file you're looking at, at a glance
22cdd7e to
100cead
Compare
gbrodman
left a comment
There was a problem hiding this comment.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @CydeWeys and @jianglai)
core/src/test/java/google/registry/export/ExportPremiumTermsActionTest.java line 61 at r1 (raw file):
Previously, CydeWeys (Ben McIlwain) wrote…
Best practice in tests is to actually expand the expected strings, rather than duplicating the logic used in the code under test. That also gives the benefit of letting us see in all in one place what the resultant output actually looks like, which can help prompt further refinements.
i mean, we were already doing basically what i'm doing here but sure
jianglai
left a comment
There was a problem hiding this comment.
Reviewed all commit messages.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @CydeWeys and @gbrodman)
core/src/test/java/google/registry/export/ExportPremiumTermsActionTest.java line 99 at r1 (raw file):
Previously, gbrodman wrote…
what do you mean? I replaced this because of the general guideline to use raw string variables in tests, but we still want the PREMIUM_TERMS_FILENAME_FORMAT constant in the action itself
My bad. I had thought that the constant was just used in tests.
CydeWeys
left a comment
There was a problem hiding this comment.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @jianglai)
https://b.corp.google.com/issues/390053672
This makes it easier to identify what file you're looking at, at a glance
This change is