Add --set_current_tld_state to UpdateTldCommand

This feature would have been useful earlier when I was changing the TLD state on a sandbox TLD on-the-fly for testing purposes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128088578
This commit is contained in:
ctingue 2016-02-07 12:03:01 -05:00 committed by Ben McIlwain
parent e82a40a2fb
commit a3cade3e20
8 changed files with 147 additions and 7 deletions

View file

@ -241,6 +241,16 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
runCommandForced("--initial_tld_state=INVALID_STATE", "--roid_suffix=Q9JYB4C", "xn--q9jyb4c");
}
@Test
public void testFailure_bothTldStateFlags() throws Exception {
thrown.expect(IllegalArgumentException.class);
DateTime now = DateTime.now(UTC);
runCommandForced(
String.format("--tld_state_transitions=%s=PREDELEGATION,%s=SUNRISE", now, now.plus(1)),
"--initial_tld_state=GENERAL_AVAILABILITY",
"xn--q9jyb4c");
}
@Test
public void testFailure_negativeInitialRenewBillingCost() throws Exception {
thrown.expect(IllegalArgumentException.class);