Skip to content

Commit e33d3c7

Browse files
committed
Move tmpdata to ignored target dir
1 parent 2d1ffbc commit e33d3c7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
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)