mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 13:51:15 +02:00
Make driveFolderId on Registry entity optional
This defaults to null, and leaving it to null now simply disables reserved terms exporting, rather than throwing an error every time the action runs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138763161
This commit is contained in:
parent
9122372e38
commit
274b070b54
3 changed files with 14 additions and 11 deletions
|
@ -110,15 +110,12 @@ public class ExportReservedTermsActionTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void test_uploadFileToDrive_failsWhenDriveFolderIdIsNull() throws Exception {
|
||||
public void test_uploadFileToDrive_doesNothingWhenDriveFolderIdIsNull() throws Exception {
|
||||
persistResource(Registry.get("tld").asBuilder().setDriveFolderId(null).build());
|
||||
try {
|
||||
runAction("tld");
|
||||
assertWithMessage("Expected RuntimeException to be thrown").fail();
|
||||
} catch (RuntimeException e) {
|
||||
verify(response).setStatus(SC_INTERNAL_SERVER_ERROR);
|
||||
assertThat(getRootCause(e)).hasMessage("No drive folder associated with this TLD");
|
||||
}
|
||||
runAction("tld");
|
||||
verify(response).setStatus(SC_OK);
|
||||
verify(response)
|
||||
.setPayload("Skipping export because no Drive folder is associated with this TLD");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue