Do not enqueue DNS updates when flow doesn't affect nameservers (#1785)

This commit is contained in:
Pavlo Tkach
2022-09-16 16:59:04 -04:00
committed by GitHub
parent 372c854268
commit 775f672f2a
3 changed files with 37 additions and 3 deletions
@@ -47,6 +47,7 @@ import static google.registry.testing.DomainSubject.assertAboutDomains;
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
import static google.registry.testing.HistoryEntrySubject.assertAboutHistoryEntries;
import static google.registry.testing.TaskQueueHelper.assertDnsTasksEnqueued;
import static google.registry.testing.TaskQueueHelper.assertNoDnsTasksEnqueued;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import static org.joda.money.CurrencyUnit.USD;
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -1727,4 +1728,10 @@ class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow, Domain
runFlowAsSuperuser();
assertAboutDomains().that(reloadResourceByForeignKey()).hasNoAutorenewEndTime();
}
@Test
void testDnsTaskIsNotTriggeredWhenNoDSChangeSubmitted() throws Exception {
setEppInput("domain_update_no_ds_change.xml");
assertNoDnsTasksEnqueued();
}
}
@@ -0,0 +1,18 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<update>
<domain:update
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example.tld</domain:name>
<domain:add>
<domain:contact type="admin">mak21</domain:contact>
<domain:contact type="billing">mak21</domain:contact>
<domain:contact type="tech">mak21</domain:contact>
<domain:status s="serverHold"
lang="en">Server hold.</domain:status>
</domain:add>
</domain:update>
</update>
<clTRID>ABC-12345</clTRID>
</command>
</epp>