mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +02:00
Remove deprecated singular DNS writer field and update tooling
Note that even though the nomulus command line tool now supports multiple DNS writers for all subcommands, this still won't work quite yet because the DNS task queue format migration from [] is still in progress. After next week's push that migration will be complete and we can remove the final restriction against only having one DNS writer per TLD. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=162490399
This commit is contained in:
parent
8ff1102223
commit
d3e9ebad16
8 changed files with 101 additions and 123 deletions
|
@ -59,7 +59,7 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
|
|||
persistReservedList("xn--q9jyb4c_r1", "foo,FULLY_BLOCKED");
|
||||
persistReservedList("xn--q9jyb4c_r2", "moop,FULLY_BLOCKED");
|
||||
createTld("xn--q9jyb4c");
|
||||
command.dnsWriterNames = ImmutableSet.of("VoidDnsWriter", "FooDnsWriter");
|
||||
command.validDnsWriterNames = ImmutableSet.of("VoidDnsWriter", "FooDnsWriter");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -176,14 +176,18 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
|
|||
|
||||
@Test
|
||||
public void testSuccess_dnsWriter() throws Exception {
|
||||
assertThat(Registry.get("xn--q9jyb4c").getDnsWriter()).isEqualTo("VoidDnsWriter");
|
||||
assertThat(Registry.get("xn--q9jyb4c").getDnsWriters()).containsExactly("VoidDnsWriter");
|
||||
|
||||
runCommandForced("--dns_writer=FooDnsWriter", "xn--q9jyb4c");
|
||||
assertThat(Registry.get("xn--q9jyb4c").getDnsWriter()).isEqualTo("FooDnsWriter");
|
||||
runCommandForced("--dns_writers=FooDnsWriter", "xn--q9jyb4c");
|
||||
assertThat(Registry.get("xn--q9jyb4c").getDnsWriters()).containsExactly("FooDnsWriter");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_multipleDnsWritersNotYetSupported() throws Exception {
|
||||
thrown.expect(IllegalArgumentException.class, "Multiple DNS writers are not yet supported");
|
||||
runCommandForced("--dns_writers=FooDnsWriter,VoidDnsWriter", "xn--q9jyb4c");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSuccess_escrow() throws Exception {
|
||||
runCommandForced("--escrow=true", "xn--q9jyb4c");
|
||||
|
@ -653,8 +657,8 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
|
|||
@Test
|
||||
public void testFailure_specifiedDnsWriter_doesntExist() throws Exception {
|
||||
thrown.expect(
|
||||
IllegalArgumentException.class, "The DNS writer 'InvalidDnsWriter' doesn't exist");
|
||||
runCommandForced("xn--q9jyb4c", "--dns_writer=InvalidDnsWriter");
|
||||
IllegalArgumentException.class, "Invalid DNS writer name(s) specified: [InvalidDnsWriter]");
|
||||
runCommandForced("xn--q9jyb4c", "--dns_writers=InvalidDnsWriter");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue