Change GenerateEscrowDepositCommand to trigger back end deposit generation

Previously, GenerateEscrowDepositCommand generated the deposit itself. Channeling it through the existing deposit generation code make things more maintainable.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152847950
This commit is contained in:
mountford 2017-04-11 12:53:07 -07:00 committed by Ben McIlwain
parent 8653d2f204
commit dea386d08a
7 changed files with 224 additions and 367 deletions

View file

@ -302,6 +302,20 @@ public class RdeStagingActionTest extends MapreduceTestCase<RdeStagingAction> {
action.run();
}
@Test
public void testManualRun_invalidRevision_throwsException() throws Exception {
createTldWithEscrowEnabled("lol");
clock.setTo(DateTime.parse("2000-01-01TZ"));
action.manual = true;
action.directory = Optional.of("test/");
action.modeStrings = ImmutableSet.of("full");
action.tlds = ImmutableSet.of("lol");
action.watermarks = ImmutableSet.of(DateTime.parse("2001-01-01T00:00:00Z"));
action.revision = Optional.of(-1);
thrown.expect(BadRequestException.class);
action.run();
}
@Test
public void testManualRun_validParameters_runsMapReduce() throws Exception {
createTldWithEscrowEnabled("lol");