Synchronize domains with DNS on import

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146813124
This commit is contained in:
Wolfgang Meyers 2017-02-07 11:47:04 -08:00 committed by Ben McIlwain
parent 5d4a88e5ce
commit 60a3d2a53b
3 changed files with 20 additions and 0 deletions

View file

@ -22,6 +22,7 @@ import static google.registry.testing.DatastoreHelper.newDomainResource;
import static google.registry.testing.DatastoreHelper.persistActiveContact;
import static google.registry.testing.DatastoreHelper.persistResource;
import static google.registry.testing.DatastoreHelper.persistSimpleResource;
import static google.registry.testing.TaskQueueHelper.assertDnsTasksEnqueued;
import com.google.appengine.tools.cloudstorage.GcsFilename;
import com.google.appengine.tools.cloudstorage.GcsService;
@ -126,6 +127,14 @@ public class RdeDomainImportActionTest extends MapreduceTestCase<RdeDomainImport
checkHistoryEntry(historyEntries.get(0), domain);
}
/** Ensures that DNS publishing is kicked off on domain import */
@Test
public void test_mapreducePublishesToDns() throws Exception {
pushToGcs(DEPOSIT_1_DOMAIN);
runMapreduce();
assertDnsTasksEnqueued("example1.test");
}
/** Verify history entry fields are correct */
private void checkHistoryEntry(HistoryEntry entry, DomainResource parent) {
assertThat(entry.getType()).isEqualTo(HistoryEntry.Type.RDE_IMPORT);