mirror of
https://github.com/google/nomulus
synced 2026-09-17 21:44:30 +00:00
Put back accidentally deleted assertion
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154300634
This commit is contained in:
@@ -1524,7 +1524,6 @@ public class DomainApplicationCreateFlowTest
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFailure_alreadyExists_triggersFailfast() throws Exception {
|
public void testFailure_alreadyExists_triggersFailfast() throws Exception {
|
||||||
// This fails fast and throws DomainAlreadyExistsException from init() as a special case.
|
|
||||||
persistContactsAndHosts();
|
persistContactsAndHosts();
|
||||||
clock.advanceOneMilli();
|
clock.advanceOneMilli();
|
||||||
persistActiveDomain(getUniqueIdFromCommand());
|
persistActiveDomain(getUniqueIdFromCommand());
|
||||||
@@ -1536,6 +1535,8 @@ public class DomainApplicationCreateFlowTest
|
|||||||
getUniqueIdFromCommand());
|
getUniqueIdFromCommand());
|
||||||
} catch (ResourceAlreadyExistsException e) {
|
} catch (ResourceAlreadyExistsException e) {
|
||||||
assertThat(e.isFailfast()).isTrue();
|
assertThat(e.isFailfast()).isTrue();
|
||||||
|
assertAboutEppExceptions().that(e).marshalsToXml().and().hasMessage(
|
||||||
|
String.format("Object with given ID (%s) already exists", getUniqueIdFromCommand()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import static google.registry.testing.DatastoreHelper.persistDeletedDomain;
|
|||||||
import static google.registry.testing.DatastoreHelper.persistReservedList;
|
import static google.registry.testing.DatastoreHelper.persistReservedList;
|
||||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||||
import static google.registry.testing.DomainResourceSubject.assertAboutDomains;
|
import static google.registry.testing.DomainResourceSubject.assertAboutDomains;
|
||||||
|
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
|
||||||
import static google.registry.testing.MemcacheHelper.setMemcacheContents;
|
import static google.registry.testing.MemcacheHelper.setMemcacheContents;
|
||||||
import static google.registry.testing.TaskQueueHelper.assertDnsTasksEnqueued;
|
import static google.registry.testing.TaskQueueHelper.assertDnsTasksEnqueued;
|
||||||
import static google.registry.testing.TaskQueueHelper.assertNoDnsTasksEnqueued;
|
import static google.registry.testing.TaskQueueHelper.assertNoDnsTasksEnqueued;
|
||||||
@@ -906,6 +907,8 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||||||
getUniqueIdFromCommand());
|
getUniqueIdFromCommand());
|
||||||
} catch (ResourceAlreadyExistsException e) {
|
} catch (ResourceAlreadyExistsException e) {
|
||||||
assertThat(e.isFailfast()).isTrue();
|
assertThat(e.isFailfast()).isTrue();
|
||||||
|
assertAboutEppExceptions().that(e).marshalsToXml().and().hasMessage(
|
||||||
|
String.format("Object with given ID (%s) already exists", getUniqueIdFromCommand()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user