Consolidate generic success response XMLs in unit tests

EPP reuses the same generic "Command completed successfully" response with
result code 1000 for many different operations. There's no need to have separate
XML files for all of these different operations given that the response is the
same.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202010442
This commit is contained in:
mcilwain 2018-06-25 13:37:40 -07:00 committed by Ben McIlwain
parent ed910455b0
commit a4ebdc7622
25 changed files with 76 additions and 182 deletions

View file

@ -292,7 +292,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
setUpSuccessfulTest();
setUpGracePeriods(
GracePeriod.create(GracePeriodStatus.ADD, TIME_BEFORE_FLOW.plusDays(1), "foo", null));
dryRunFlowAssertResponse(loadFile("domain_delete_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -333,7 +333,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
@Test
public void testSuccess_addGracePeriodResultsInImmediateDelete() throws Exception {
sessionMetadata.setServiceExtensionUris(ImmutableSet.of());
doImmediateDeleteTest(GracePeriodStatus.ADD, "domain_delete_response.xml");
doImmediateDeleteTest(GracePeriodStatus.ADD, "generic_success_response.xml");
}
@Test
@ -357,7 +357,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
@Test
public void testSuccess_sunrushAddGracePeriodResultsInImmediateDelete() throws Exception {
sessionMetadata.setServiceExtensionUris(ImmutableSet.of());
doImmediateDeleteTest(GracePeriodStatus.SUNRUSH_ADD, "domain_delete_response.xml");
doImmediateDeleteTest(GracePeriodStatus.SUNRUSH_ADD, "generic_success_response.xml");
}
private void doSuccessfulTest_noAddGracePeriod(String responseFilename) throws Exception {
@ -684,7 +684,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
.setDeletionTime(START_OF_TIME)
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_delete_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertDnsTasksEnqueued("example.tld");
assertAutorenewClosedAndCancellationCreatedFor(
graceBillingEvent, getOnlyHistoryEntryOfType(domain, DOMAIN_DELETE));
@ -1110,7 +1110,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
setUpSuccessfulTest();
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
assertThat(reloadResourceByForeignKey()).isNull();
}