Add FlowMetadata (containing isSuperuser) to custom flow logic

This also bypasses signed mark validation during domain creation if
the flow is being executed as superuser.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145435268
This commit is contained in:
Justin Graham 2017-01-24 10:25:28 -08:00 committed by Ben McIlwain
parent d5160213e5
commit f3388326d6
21 changed files with 213 additions and 74 deletions

View file

@ -436,6 +436,18 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
assertNoLordn("0000001761376042759136-65535", null);
}
@Test
public void testSuccess_generalAvailability_ignoresEncodedSignedMarkMismatch() throws Exception {
createTld("tld", TldState.GENERAL_AVAILABILITY);
clock.setTo(DateTime.parse("2014-09-09T09:09:09Z"));
setEppInput("domain_create_registration_encoded_signed_mark_mismatched_label.xml");
eppRequestSource = EppRequestSource.TOOL; // Only tools can pass in metadata.
persistContactsAndHosts();
runFlowAsSuperuser();
assertSuccessfulCreate("tld", true);
assertNoLordn();
}
@Test
public void testSuccess_fee_v06() throws Exception {
setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6"));