mirror of
https://github.com/google/nomulus
synced 2026-08-16 12:16:09 +00:00
Consolidate EPP lifecycle helper methods
I'm adding another EPP lifecycle test that will need to be in the tools package because it has to call tools as part of the lifecycle. This commit consolidates common functionality within the EppTestCase abstract base class (and increases visibility) so that it can easily be referenced by more extending classes, even ones in a different package. This also explicitly loads the test files from the testdata directory collocated with EppTestCase, so that new tests in other packages won't have to duplicate lots of these same test files. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=223365398
This commit is contained in:
@@ -47,31 +47,6 @@ public class EppLifecycleDomainApplicationTest extends EppTestCase {
|
||||
START_OF_GA, TldState.GENERAL_AVAILABILITY));
|
||||
}
|
||||
|
||||
/** Create the two administrative contacts and two hosts. */
|
||||
void createContactsAndHosts() throws Exception {
|
||||
DateTime startTime = DateTime.parse("2000-06-01T00:00:00Z");
|
||||
assertThatCommand("contact_create_sh8013.xml")
|
||||
.atTime(startTime)
|
||||
.hasResponse(
|
||||
"contact_create_response_sh8013.xml",
|
||||
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"));
|
||||
assertThatCommand("contact_create_jd1234.xml")
|
||||
.atTime(startTime.plusMinutes(1))
|
||||
.hasResponse("contact_create_response_jd1234.xml");
|
||||
assertThatCommand("host_create.xml", ImmutableMap.of("HOSTNAME", "ns1.example.external"))
|
||||
.atTime(startTime.plusMinutes(2))
|
||||
.hasResponse(
|
||||
"host_create_response.xml",
|
||||
ImmutableMap.of(
|
||||
"HOSTNAME", "ns1.example.external", "CRDATE", startTime.plusMinutes(2).toString()));
|
||||
assertThatCommand("host_create.xml", ImmutableMap.of("HOSTNAME", "ns2.example.external"))
|
||||
.atTime(startTime.plusMinutes(3))
|
||||
.hasResponse(
|
||||
"host_create_response.xml",
|
||||
ImmutableMap.of(
|
||||
"HOSTNAME", "ns2.example.external", "CRDATE", startTime.plusMinutes(3).toString()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApplicationDuringSunrise_doesntCreateDomainWithoutAllocation() throws Exception {
|
||||
assertThatLoginSucceeds("NewRegistrar", "foo-BAR2");
|
||||
|
||||
Reference in New Issue
Block a user