diff --git a/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java b/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java index 1a733e9c73e..ab87564fed4 100644 --- a/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java +++ b/src/test/java/io/vertx/test/fakedns/FakeDNSServer.java @@ -262,6 +262,24 @@ public Set getRecords(QuestionRecord questionRecord) throws org. }); } + public FakeDNSServer testResolveDNAME(final String dname) { + return store(new RecordStore() { + @Override + public Set getRecords(QuestionRecord questionRecord) throws org.apache.directory.server.dns.DnsException { + Set set = new HashSet<>(); + + ResourceRecordModifier rm = new ResourceRecordModifier(); + rm.setDnsClass(RecordClass.IN); + rm.setDnsName("dns.vertx.io"); + rm.setDnsTtl(100); + rm.setDnsType(RecordType.DNAME); + rm.put(DnsAttribute.DOMAIN_NAME, dname); + set.add(rm.getEntry()); + return set; + } + }); + } + public FakeDNSServer testLookup4(final String ip) { return store(new RecordStore() { @Override