mirror of
https://github.com/google/nomulus
synced 2026-09-13 11:34:31 +00:00
Ignore test TLDs when logging transaction creates/deletes
The probers make a constant stream of create and delete calls, which we don't want to account for when constructing transaction reports. This change will cause only real TLDs to log create and delete transaction records. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=166737801
This commit is contained in:
@@ -127,6 +127,7 @@ import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.poll.PollMessage;
|
||||
import google.registry.model.registry.Registry;
|
||||
import google.registry.model.registry.Registry.TldState;
|
||||
import google.registry.model.registry.Registry.TldType;
|
||||
import google.registry.model.reporting.DomainTransactionRecord;
|
||||
import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField;
|
||||
import google.registry.model.reporting.HistoryEntry;
|
||||
@@ -2010,6 +2011,17 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
||||
1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIcannTransactionRecord_testTld_notStored() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
persistResource(Registry.get("tld").asBuilder().setTldType(TldType.TEST).build());
|
||||
runFlow();
|
||||
DomainResource domain = reloadResourceByForeignKey();
|
||||
HistoryEntry historyEntry = getHistoryEntries(domain).get(0);
|
||||
// No transaction records should be stored for test TLDs
|
||||
assertThat(historyEntry.getDomainTransactionRecords()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEppMetric_isSuccessfullyCreated() throws Exception {
|
||||
persistContactsAndHosts();
|
||||
|
||||
Reference in New Issue
Block a user