Skip to content

Commit 8c0e46d

Browse files
authored
Merge pull request #104 from tdiesler/ghi103
[Ignore #103] DNS test cannot resolve name
2 parents 2d1ffbc + 6d1eb26 commit 8c0e46d

File tree

3 files changed

+27
-46
lines changed

3 files changed

+27
-46
lines changed

pom.xml

+20-42
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
<properties>
3333
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3434
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
35-
<junit.version>4.12</junit.version>
36-
<hamcrest.version>1.3</hamcrest.version>
35+
<version.junit>4.12</version.junit>
36+
<version.hamcrest>1.3</version.hamcrest>
37+
<version.multiaddr>v1.3.0</version.multiaddr>
3738
</properties>
3839

3940
<repositories>
@@ -44,46 +45,23 @@
4445
</repositories>
4546

4647
<dependencies>
47-
<dependency>
48-
<groupId>junit</groupId>
49-
<artifactId>junit</artifactId>
50-
<version>${junit.version}</version>
51-
<scope>test</scope>
52-
</dependency>
53-
<dependency>
54-
<groupId>org.hamcrest</groupId>
55-
<artifactId>hamcrest-core</artifactId>
56-
<version>${hamcrest.version}</version>
57-
<scope>test</scope>
58-
</dependency>
59-
<dependency>
60-
<groupId>com.github.multiformats</groupId>
61-
<artifactId>java-multiaddr</artifactId>
62-
<version>v1.3.1</version>
63-
<scope>system</scope>
64-
<systemPath>${project.basedir}/lib/multiaddr.jar</systemPath>
65-
</dependency>
66-
<dependency>
67-
<groupId>com.github.multiformats</groupId>
68-
<artifactId>java-multihash</artifactId>
69-
<version>v1.2.1</version>
70-
<scope>system</scope>
71-
<systemPath>${project.basedir}/lib/multihash.jar</systemPath>
72-
</dependency>
73-
<dependency>
74-
<groupId>com.github.multiformats</groupId>
75-
<artifactId>java-multibase</artifactId>
76-
<version>v1.0.1</version>
77-
<scope>system</scope>
78-
<systemPath>${project.basedir}/lib/multibase.jar</systemPath>
79-
</dependency>
80-
<dependency>
81-
<groupId>com.github.ipld</groupId>
82-
<artifactId>java-cid</artifactId>
83-
<version>v1.1.1</version>
84-
<scope>system</scope>
85-
<systemPath>${project.basedir}/lib/cid.jar</systemPath>
86-
</dependency>
48+
<dependency>
49+
<groupId>com.github.multiformats</groupId>
50+
<artifactId>java-multiaddr</artifactId>
51+
<version>${version.multiaddr}</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>junit</groupId>
55+
<artifactId>junit</artifactId>
56+
<version>${version.junit}</version>
57+
<scope>test</scope>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.hamcrest</groupId>
61+
<artifactId>hamcrest-core</artifactId>
62+
<version>${version.hamcrest}</version>
63+
<scope>test</scope>
64+
</dependency>
8765
</dependencies>
8866

8967
<build>

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

+1
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ public void nameTest() throws IOException {
618618
}
619619

620620
@Test
621+
@Ignore("[#103] DNS test cannot resolve name")
621622
public void dnsTest() throws IOException {
622623
String domain = "ipfs.io";
623624
String dns = ipfs.dns(domain);

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ public class RecursiveAddTest {
1313

1414
private final IPFS ipfs = new IPFS(new MultiAddress("/ip4/127.0.0.1/tcp/5001"));
1515

16+
static Path TMPDATA = Paths.get("target/tmpdata");
17+
1618
@Test
1719
public void testAdd() throws Exception {
1820
System.out.println("ipfs version: " + ipfs.version());
1921

2022
String EXPECTED = "QmX5fZ6aUxNTAS7ZfYc8f4wPoMx6LctuNbMjuJZ9EmUSr6";
2123

22-
Path base = Paths.get("tmpdata");
24+
Path base = TMPDATA;
2325
base.toFile().mkdirs();
2426
Files.write(base.resolve("index.html"), "<html></html>".getBytes());
2527
Path js = base.resolve("js");
@@ -35,7 +37,7 @@ public void testAdd() throws Exception {
3537
public void binaryRecursiveAdd() throws Exception {
3638
String EXPECTED = "Qmd1dTx4Z1PHxSHDR9jYoyLJTrYsAau7zLPE3kqo14s84d";
3739

38-
Path base = Paths.get("tmpbindata");
40+
Path base = TMPDATA.resolve("bindata");
3941
base.toFile().mkdirs();
4042
byte[] bindata = new byte[1024*1024];
4143
new Random(28).nextBytes(bindata);
@@ -53,7 +55,7 @@ public void binaryRecursiveAdd() throws Exception {
5355
public void largeBinaryRecursiveAdd() throws Exception {
5456
String EXPECTED = "QmZdfdj7nfxE68fBPUWAGrffGL3sYGx1MDEozMg73uD2wj";
5557

56-
Path base = Paths.get("tmplargebindata");
58+
Path base = TMPDATA.resolve("largebindata");
5759
base.toFile().mkdirs();
5860
byte[] bindata = new byte[100 * 1024*1024];
5961
new Random(28).nextBytes(bindata);
@@ -73,7 +75,7 @@ public void largeBinaryRecursiveAdd() throws Exception {
7375
public void largeBinaryInSubdirRecursiveAdd() throws Exception {
7476
String EXPECTED = "QmUYuMwCpgaxJhNxRA5Pmje8EfpEgU3eQSB9t3VngbxYJk";
7577

76-
Path base = Paths.get("tmplargebininsubdirdata");
78+
Path base = TMPDATA.resolve("largebininsubdirdata");
7779
base.toFile().mkdirs();
7880
Path bindir = base.resolve("moredata");
7981
bindir.toFile().mkdirs();

0 commit comments

Comments
 (0)