Skip to content

Commit 4f9e87b

Browse files
committed
Add recursive dns option and reenable test
1 parent bb159df commit 4f9e87b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/main/java/io/ipfs/api/IPFS.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ public Map resolve(String scheme, Multihash hash, boolean recursive) throws IOEx
134134
}
135135

136136

137-
public String dns(String domain) throws IOException {
138-
Map res = retrieveMap("dns?arg=" + domain);
137+
public String dns(String domain, boolean recursive) throws IOException {
138+
Map res = retrieveMap("dns?arg=" + domain + "&r=" + recursive);
139139
return (String)res.get("Path");
140140
}
141141

src/test/java/io/ipfs/api/APITest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,9 @@ public void nameTest() throws IOException {
618618
}
619619

620620
@Test
621-
@Ignore("[#103] DNS test cannot resolve name")
622621
public void dnsTest() throws IOException {
623622
String domain = "ipfs.io";
624-
String dns = ipfs.dns(domain);
623+
String dns = ipfs.dns(domain, true);
625624
}
626625

627626
public void mountTest() throws IOException {

0 commit comments

Comments
 (0)