mirror of
https://github.com/google/nomulus
synced 2026-09-08 17:17:02 +00:00
Add more options to the generate escrow deposit command (#1453)
This adds two new options: 1) An option to run RDE in lenient mode. 2) An option to run RDE with the new Beam pipeline regardless of the datastore setting. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/google/nomulus/1453) <!-- Reviewable:end -->
This commit is contained in:
@@ -188,7 +188,55 @@ public class GenerateEscrowDepositCommandTest
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCommand_success() throws Exception {
|
||||
void testCommand_successWithLenientValidationMode() throws Exception {
|
||||
runCommand(
|
||||
"--tld=tld",
|
||||
"--watermark=2017-01-01T00:00:00Z",
|
||||
"--mode=thin",
|
||||
"--lenient",
|
||||
"-r 42",
|
||||
"-o test");
|
||||
|
||||
assertTasksEnqueued(
|
||||
"rde-report",
|
||||
new TaskMatcher()
|
||||
.url("/_dr/task/rdeStaging")
|
||||
.header("Host", "backend.test.localhost")
|
||||
.param("mode", "THIN")
|
||||
.param("lenient", "true")
|
||||
.param("watermarks", "2017-01-01T00:00:00.000Z")
|
||||
.param("tlds", "tld")
|
||||
.param("directory", "test")
|
||||
.param("manual", "true")
|
||||
.param("revision", "42"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCommand_successWithBeam() throws Exception {
|
||||
runCommand(
|
||||
"--tld=tld",
|
||||
"--watermark=2017-01-01T00:00:00Z",
|
||||
"--mode=thin",
|
||||
"--beam",
|
||||
"-r 42",
|
||||
"-o test");
|
||||
|
||||
assertTasksEnqueued(
|
||||
"rde-report",
|
||||
new TaskMatcher()
|
||||
.url("/_dr/task/rdeStaging")
|
||||
.header("Host", "backend.test.localhost")
|
||||
.param("mode", "THIN")
|
||||
.param("beam", "true")
|
||||
.param("watermarks", "2017-01-01T00:00:00.000Z")
|
||||
.param("tlds", "tld")
|
||||
.param("directory", "test")
|
||||
.param("manual", "true")
|
||||
.param("revision", "42"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testCommand_successWithDefaultValidationMode() throws Exception {
|
||||
runCommand("--tld=tld", "--watermark=2017-01-01T00:00:00Z", "--mode=thin", "-r 42", "-o test");
|
||||
|
||||
assertTasksEnqueued(
|
||||
@@ -197,6 +245,7 @@ public class GenerateEscrowDepositCommandTest
|
||||
.url("/_dr/task/rdeStaging")
|
||||
.header("Host", "backend.test.localhost")
|
||||
.param("mode", "THIN")
|
||||
.param("lenient", "false")
|
||||
.param("watermarks", "2017-01-01T00:00:00.000Z")
|
||||
.param("tlds", "tld")
|
||||
.param("directory", "test")
|
||||
@@ -213,6 +262,8 @@ public class GenerateEscrowDepositCommandTest
|
||||
new TaskMatcher()
|
||||
.url("/_dr/task/rdeStaging")
|
||||
.header("Host", "backend.test.localhost")
|
||||
.param("lenient", "false")
|
||||
.param("beam", "false")
|
||||
.param("mode", "THIN")
|
||||
.param("watermarks", "2017-01-01T00:00:00.000Z")
|
||||
.param("tlds", "tld")
|
||||
@@ -230,6 +281,8 @@ public class GenerateEscrowDepositCommandTest
|
||||
.url("/_dr/task/rdeStaging")
|
||||
.header("Host", "backend.test.localhost")
|
||||
.param("mode", "FULL")
|
||||
.param("lenient", "false")
|
||||
.param("beam", "false")
|
||||
.param("watermarks", "2017-01-01T00:00:00.000Z")
|
||||
.param("tlds", "tld")
|
||||
.param("directory", "test")
|
||||
@@ -252,6 +305,8 @@ public class GenerateEscrowDepositCommandTest
|
||||
.url("/_dr/task/rdeStaging")
|
||||
.header("Host", "backend.test.localhost")
|
||||
.param("mode", "THIN")
|
||||
.param("lenient", "false")
|
||||
.param("beam", "false")
|
||||
.param("watermarks", "2017-01-01T00:00:00.000Z,2017-01-02T00:00:00.000Z")
|
||||
.param("tlds", "tld,anothertld")
|
||||
.param("directory", "test")
|
||||
|
||||
Reference in New Issue
Block a user