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

@ -125,7 +125,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Add new nameserver to domain.
assertThatCommand("domain_update_add_nameserver_fakesite.xml")
.atTime("2000-06-08T00:00:00Z")
.hasResponse("domain_update_add_nameserver_response_fakesite.xml");
.hasResponse("generic_success_response.xml");
// Verify new nameserver was added.
assertThatCommand("domain_info_fakesite.xml")
.atTime("2000-06-08T00:01:00Z")
@ -159,7 +159,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
// Restore the domain.
assertThatCommand("domain_update_restore_request.xml")
.atTime("2000-07-01T00:03:00Z")
.hasResponse("domain_update_restore_request_response.xml");
.hasResponse("generic_success_response.xml");
assertThatLogoutSucceeds();
}
@ -268,7 +268,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
@Test
public void testEapDomainDeletion_withinAddGracePeriod_eapFeeIsNotRefunded() throws Exception {
assertThatCommand("login_valid_fee_extension.xml").hasResponse("login_response.xml");
assertThatCommand("login_valid_fee_extension.xml").hasResponse("generic_success_response.xml");
createContacts(DateTime.parse("2000-06-01T00:00:00Z"));
// Set the EAP schedule.
@ -561,7 +561,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
START_OF_TIME, TldState.PREDELEGATION,
gaDate, TldState.GENERAL_AVAILABILITY));
assertThatCommand("login_valid_fee_extension.xml").hasResponse("login_response.xml");
assertThatCommand("login_valid_fee_extension.xml").hasResponse("generic_success_response.xml");
assertThatCommand("domain_check_fee_premium.xml")
.atTime(gaDate.plusDays(1))
@ -796,7 +796,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
.hasResponse("domain_info_response_fakesite_pending_delete.xml");
assertThatCommand("domain_update_restore_fakesite.xml")
.atTime("2002-05-30T01:03:00Z")
.hasResponse("domain_update_restore_request_response.xml");
.hasResponse("generic_success_response.xml");
// Expect domain is ok now, not pending delete or transfer, and has been extended by a year from
// the date of the restore. (Not from the original expiration date.)
@ -1031,7 +1031,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
assertThatLogin("NewRegistrar", "foo-BAR2")
.atTime(sunriseDate.minusDays(3))
.hasResponse("login_response.xml");
.hasResponse("generic_success_response.xml");
createContactsAndHosts();
@ -1118,7 +1118,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
assertThatLogin("NewRegistrar", "foo-BAR2")
.atTime(sunriseDate.minusDays(3))
.hasResponse("login_response.xml");
.hasResponse("generic_success_response.xml");
createContactsAndHosts();

View file

@ -120,7 +120,7 @@ public class EppTestCase extends ShardableTestCase {
}
void assertThatLoginSucceeds(String clientId, String password) throws Exception {
assertThatLogin(clientId, password).hasResponse("login_response.xml");
assertThatLogin(clientId, password).hasResponse("generic_success_response.xml");
}
void assertThatLogoutSucceeds() throws Exception {

View file

@ -55,7 +55,7 @@ public class ContactUpdateFlowTest
persistActiveContact(getUniqueIdFromCommand());
clock.advanceOneMilli();
assertTransactionalFlow(true);
runFlowAssertResponse(loadFile("contact_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
// Check that the contact was updated. This value came from the xml.
assertAboutContacts().that(reloadResourceByForeignKey())
.hasAuthInfoPwd("2fooBAR").and()
@ -67,7 +67,7 @@ public class ContactUpdateFlowTest
@Test
public void testDryRun() throws Exception {
persistActiveContact(getUniqueIdFromCommand());
dryRunFlowAssertResponse(loadFile("contact_update_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -98,7 +98,7 @@ public class ContactUpdateFlowTest
.hasNonNullLocalizedPostalInfo().and()
.hasNullInternationalizedPostalInfo();
runFlowAssertResponse(loadFile("contact_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertAboutContacts().that(reloadResourceByForeignKey())
.hasNullLocalizedPostalInfo().and()
.hasInternationalizedPostalInfo(new PostalInfo.Builder()
@ -137,7 +137,7 @@ public class ContactUpdateFlowTest
.hasNonNullInternationalizedPostalInfo().and()
.hasNullLocalizedPostalInfo();
runFlowAssertResponse(loadFile("contact_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertAboutContacts().that(reloadResourceByForeignKey())
.hasNullInternationalizedPostalInfo().and()
.hasLocalizedPostalInfo(new PostalInfo.Builder()
@ -172,7 +172,7 @@ public class ContactUpdateFlowTest
.build());
clock.advanceOneMilli();
// The test xml updates the address of the postal info and should leave the name untouched.
runFlowAssertResponse(loadFile("contact_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertAboutContacts().that(reloadResourceByForeignKey()).hasLocalizedPostalInfo(
new PostalInfo.Builder()
.setType(Type.LOCALIZED)
@ -224,7 +224,7 @@ public class ContactUpdateFlowTest
// internationalized postal info to the same value it previously had, which causes it to be
// preserved. If the xml had not mentioned the internationalized one at all it would have been
// deleted.
runFlowAssertResponse(loadFile("contact_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertAboutContacts().that(reloadResourceByForeignKey())
.hasLocalizedPostalInfo(
new PostalInfo.Builder()
@ -286,7 +286,7 @@ public class ContactUpdateFlowTest
persistActiveContact(getUniqueIdFromCommand());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("contact_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -303,7 +303,7 @@ public class ContactUpdateFlowTest
persistActiveContact(getUniqueIdFromCommand());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("contact_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -330,7 +330,7 @@ public class ContactUpdateFlowTest
.build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("contact_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
assertAboutContacts()
.that(reloadResourceByForeignKey())
.hasStatusValue(StatusValue.CLIENT_UPDATE_PROHIBITED)

View file

@ -70,7 +70,7 @@ public class DomainApplicationDeleteFlowTest
public void doSuccessfulTest() throws Exception {
assertTransactionalFlow(true);
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_delete_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
// Check that the domain is fully deleted.
assertThat(reloadDomainApplication()).isNull();
assertNoBillingEvents();
@ -79,7 +79,7 @@ public class DomainApplicationDeleteFlowTest
@Test
public void testDryRun() throws Exception {
persistResource(newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
dryRunFlowAssertResponse(loadFile("domain_delete_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -164,7 +164,7 @@ public class DomainApplicationDeleteFlowTest
persistResource(newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -183,7 +183,7 @@ public class DomainApplicationDeleteFlowTest
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -213,7 +213,7 @@ public class DomainApplicationDeleteFlowTest
.build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -296,7 +296,7 @@ public class DomainApplicationDeleteFlowTest
persistResource(newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -305,7 +305,7 @@ public class DomainApplicationDeleteFlowTest
persistResource(newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -314,7 +314,7 @@ public class DomainApplicationDeleteFlowTest
persistResource(newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -323,7 +323,7 @@ public class DomainApplicationDeleteFlowTest
persistResource(newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD").build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_delete_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test

View file

@ -136,7 +136,7 @@ public class DomainApplicationUpdateFlowTest
private void doSuccessfulTest() throws Exception {
assertTransactionalFlow(true);
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
// Check that the application was updated. These values came from the xml.
DomainApplication application = reloadDomainApplication();
assertAboutApplications()
@ -154,7 +154,7 @@ public class DomainApplicationUpdateFlowTest
public void testDryRun() throws Exception {
persistReferencedEntities();
persistApplication();
dryRunFlowAssertResponse(loadFile("domain_update_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -187,7 +187,7 @@ public class DomainApplicationUpdateFlowTest
ContactResource sh8013 = loadByForeignKey(ContactResource.class, "sh8013", clock.nowUtc());
persistResource(newApplicationBuilder().setRegistrant(Key.create(sh8013)).build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -206,7 +206,7 @@ public class DomainApplicationUpdateFlowTest
DesignatedContact.create(Type.TECH, sh8013Key)))
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -233,7 +233,7 @@ public class DomainApplicationUpdateFlowTest
persistResource(newApplicationBuilder().setDsData(originalDsData).build());
assertTransactionalFlow(true);
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertAboutApplications()
.that(reloadDomainApplication())
.hasExactlyDsData(expectedDsData)
@ -568,7 +568,7 @@ public class DomainApplicationUpdateFlowTest
persistNewApplication();
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -606,7 +606,7 @@ public class DomainApplicationUpdateFlowTest
persistApplication();
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -627,7 +627,7 @@ public class DomainApplicationUpdateFlowTest
persistApplication();
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test

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();
}

View file

@ -82,13 +82,10 @@ public class DomainRestoreRequestFlowTest
private static final ImmutableMap<String, String> FEE_12_MAP =
ImmutableMap.of("FEE_VERSION", "0.12", "FEE_NS", "fee12");
public DomainRestoreRequestFlowTest() {
setEppInput("domain_update_restore_request.xml");
}
@Before
public void initDomainTest() {
createTld("tld");
setEppInput("domain_update_restore_request.xml");
}
void persistPendingDeleteDomain() throws Exception {
@ -125,7 +122,7 @@ public class DomainRestoreRequestFlowTest
public void testDryRun() throws Exception {
setEppInput("domain_update_restore_request.xml");
persistPendingDeleteDomain();
dryRunFlowAssertResponse(loadFile("domain_update_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -135,7 +132,7 @@ public class DomainRestoreRequestFlowTest
assertTransactionalFlow(true);
// Double check that we see a poll message in the future for when the delete happens.
assertThat(getPollMessages("TheRegistrar", clock.nowUtc().plusMonths(1))).hasSize(1);
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
DomainResource domain = reloadResourceByForeignKey();
HistoryEntry historyEntryDomainRestore =
getOnlyHistoryEntryOfType(domain, HistoryEntry.Type.DOMAIN_RESTORE);
@ -332,7 +329,7 @@ public class DomainRestoreRequestFlowTest
.build());
persistPendingDeleteDomain();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -344,7 +341,7 @@ public class DomainRestoreRequestFlowTest
// Modify the Registrar to block premium names.
persistResource(loadRegistrar("TheRegistrar").asBuilder().setBlockPremiumNames(true).build());
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -513,7 +510,7 @@ public class DomainRestoreRequestFlowTest
EppException thrown =
assertThrows(
ResourceNotOwnedException.class,
() -> runFlowAssertResponse(loadFile("domain_update_response.xml")));
() -> runFlowAssertResponse(loadFile("generic_success_response.xml")));
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@ -532,7 +529,7 @@ public class DomainRestoreRequestFlowTest
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
persistPendingDeleteDomain();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test

View file

@ -146,7 +146,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
}
private void doSuccessfulTest() throws Exception {
doSuccessfulTest("domain_update_response.xml");
doSuccessfulTest("generic_success_response.xml");
}
private void doSuccessfulTest(String expectedXmlFilename) throws Exception {
@ -169,7 +169,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
public void testDryRun() throws Exception {
persistReferencedEntities();
persistDomain();
dryRunFlowAssertResponse(loadFile("domain_update_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -214,7 +214,8 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
// avoid a confusing assertBillingEvents() later if it doesn't exist.
assertBillingEvents(sunrushAddBillingEvent);
runFlowAssertResponse(CommitMode.LIVE, userPrivileges, loadFile("domain_update_response.xml"));
runFlowAssertResponse(
CommitMode.LIVE, userPrivileges, loadFile("generic_success_response.xml"));
// Verify that the domain now has the new nameserver and is in the add grace period.
DomainResource resource = reloadResourceByForeignKey();
@ -385,7 +386,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.NORMAL, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.NORMAL, loadFile("generic_success_response.xml"));
// Verify that the domain is still in the sunrush add grace period.
assertGracePeriods(
reloadResourceByForeignKey().getGracePeriods(),
@ -449,7 +450,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.build());
clock.advanceOneMilli();
assertTransactionalFlow(true);
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
DomainResource domain = reloadResourceByForeignKey();
assertAboutDomains()
.that(domain)
@ -523,7 +524,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.build());
clock.advanceOneMilli();
assertTransactionalFlow(true);
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
domain = reloadResourceByForeignKey();
assertThat(domain.getNameservers()).containsExactly(Key.create(addedHost));
assertThat(domain.getSubordinateHosts()).containsExactly("ns1.example.tld", "ns2.example.tld");
@ -544,7 +545,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.setRegistrant(Key.create(sh8013))
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -564,7 +565,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
DesignatedContact.create(Type.TECH, sh8013Key)))
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -592,7 +593,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
newDomainResource(getUniqueIdFromCommand()).asBuilder().setDsData(originalDsData).build());
assertTransactionalFlow(true);
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("domain_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
DomainResource resource = reloadResourceByForeignKey();
assertAboutDomains()
.that(resource)
@ -721,7 +722,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
setEppInput(xmlFilename);
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
if (isBillable) {
assertBillingEvents(
@ -808,7 +809,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
.build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
assertAboutDomains()
.that(reloadResourceByForeignKey())
.hasStatusValue(StatusValue.CLIENT_UPDATE_PROHIBITED)
@ -956,7 +957,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
persistReferencedEntities();
persistDomain();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -977,7 +978,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
persistResource(persistDomain().asBuilder().addStatusValue(SERVER_UPDATE_PROHIBITED).build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -995,7 +996,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
persistReferencedEntities();
persistDomain();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -1075,7 +1076,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
persistDomain();
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -1096,7 +1097,7 @@ public class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow,
persistDomain();
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("domain_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test

View file

@ -136,7 +136,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
public void testDryRun() throws Exception {
createTld("tld");
persistActiveSubordinateHost(oldHostName(), persistActiveDomain("example.tld"));
dryRunFlowAssertResponse(loadFile("host_update_response.xml"));
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
private HostResource doSuccessfulTest() throws Exception {
@ -153,7 +153,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
runFlowAssertResponse(
CommitMode.LIVE,
isSuperuser ? UserPrivileges.SUPERUSER : UserPrivileges.NORMAL,
loadFile("host_update_response.xml"));
loadFile("generic_success_response.xml"));
// The example xml does a host rename, so reloading the host (which uses the original host name)
// should now return null.
assertThat(reloadResourceByForeignKey()).isNull();
@ -214,7 +214,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
DomainResource domain = persistActiveDomain("example.tld");
HostResource oldHost = persistActiveSubordinateHost(oldHostName(), domain);
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("host_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
// The example xml doesn't do a host rename, so reloading the host should work.
assertAboutHosts()
.that(reloadResourceByForeignKey())
@ -240,7 +240,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
DomainResource domain = persistResource(createDomainWithServerApprovedTransfer("example.tld"));
HostResource oldHost = persistActiveSubordinateHost(oldHostName(), domain);
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("host_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
// The example xml doesn't do a host rename, so reloading the host should work.
assertAboutHosts()
.that(reloadResourceByForeignKey())
@ -479,7 +479,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
.build());
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("host_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
assertAboutHosts()
.that(reloadResourceByForeignKey())
.hasPersistedCurrentSponsorClientId("TheRegistrar")
@ -1070,7 +1070,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("host_update_response.xml"));
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -1088,7 +1088,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
clock.advanceOneMilli();
runFlowAssertResponse(
CommitMode.DRY_RUN, UserPrivileges.SUPERUSER, loadFile("host_update_response.xml"));
CommitMode.DRY_RUN, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
}
@Test
@ -1110,7 +1110,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("host_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -1150,7 +1150,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("host_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
@ -1233,7 +1233,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
.build());
clock.advanceOneMilli();
runFlowAssertResponse(loadFile("host_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
private void doFailingHostNameTest(String hostName, Class<? extends EppException> exception)
@ -1304,7 +1304,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
clock.advanceOneMilli();
setEppInput("host_update_metadata.xml");
eppRequestSource = EppRequestSource.TOOL;
runFlowAssertResponse(loadFile("host_update_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
assertAboutHistoryEntries()
.that(
getOnlyHistoryEntryOfType(reloadResourceByForeignKey(), HistoryEntry.Type.HOST_UPDATE))

View file

@ -59,7 +59,7 @@ public abstract class LoginFlowTestCase extends FlowTestCase<LoginFlow> {
void doSuccessfulTest(String xmlFilename) throws Exception {
setEppInput(xmlFilename);
assertTransactionalFlow(false);
runFlowAssertResponse(loadFile("login_response.xml"));
runFlowAssertResponse(loadFile("generic_success_response.xml"));
}
// Also called in subclasses.

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -77,7 +77,6 @@ public class XmlTestdataTest {
new Good("contact_transfer_query.xml", XjcEpp.class),
new Good("contact_transfer_request_response.xml", XjcEpp.class),
new Good("contact_transfer_request.xml", XjcEpp.class),
new Good("contact_update_response.xml", XjcEpp.class),
new Good("contact_update.xml", XjcEpp.class),
new Good("domain_check_response.xml", XjcEpp.class),
new Good("domain_check.xml", XjcEpp.class),
@ -85,7 +84,6 @@ public class XmlTestdataTest {
new Good("domain_create_response_offline_review.xml", XjcEpp.class),
new Good("domain_create_response.xml", XjcEpp.class),
new Good("domain_create.xml", XjcEpp.class),
new Good("domain_delete_response.xml", XjcEpp.class),
new Good("domain_delete.xml", XjcEpp.class),
new Good("domain_info_response_addperiod.xml", XjcEpp.class),
new Good("domain_info_response_pendingdelete.xml", XjcEpp.class),
@ -101,11 +99,10 @@ public class XmlTestdataTest {
new Good("domain_transfer_query.xml", XjcEpp.class),
new Good("domain_transfer_request_response.xml", XjcEpp.class),
new Good("domain_transfer_request.xml", XjcEpp.class),
new Good("domain_update_response.xml", XjcEpp.class),
new Good("domain_update_restore_report.xml", XjcEpp.class),
new Good("domain_update_restore_request_response.xml", XjcEpp.class),
new Good("domain_update_restore_request.xml", XjcEpp.class),
new Good("domain_update.xml", XjcEpp.class),
new Good("generic_success_response.xml", XjcEpp.class),
new Good("greeting.xml", XjcEpp.class),
new Good("host_check_response.xml", XjcEpp.class),
new Good("host_check.xml", XjcEpp.class),
@ -117,9 +114,7 @@ public class XmlTestdataTest {
new Good("host_delete.xml", XjcEpp.class),
new Good("host_info_response.xml", XjcEpp.class),
new Good("host_info.xml", XjcEpp.class),
new Good("host_update_response.xml", XjcEpp.class),
new Good("host_update.xml", XjcEpp.class),
new Good("login_response.xml", XjcEpp.class),
new Good("login.xml", XjcEpp.class),
new Good("logout_response.xml", XjcEpp.class),
new Good("logout.xml", XjcEpp.class),

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -1,11 +0,0 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>