Skip to content

Commit 5a6a978

Browse files
committed
Expand tests
1 parent b40bcb1 commit 5a6a978

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@
5555
<pathelement location="lib/multiaddr.jar" />
5656
<pathelement location="dist/ipfs.jar" />
5757
</classpath>
58-
<test name="io.ipfs.api.APITest" haltonfailure="yes">
58+
<batchtest haltonfailure="yes">
59+
<fileset dir="src/test/java">
60+
</fileset>
5961
<formatter type="plain"/>
6062
<formatter type="xml"/>
61-
</test>
63+
</batchtest>
6264
</junit>
6365
<exec executable="./print_test_errors.sh" failonerror="true">
6466
<arg value="./TEST*"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ private byte[] retrieve(String path) throws IOException {
678678
private static byte[] get(URL target, int timeout) throws IOException {
679679
HttpURLConnection conn = configureConnection(target, "POST", timeout);
680680
conn.setDoOutput(true);
681-
/* See IFFS commit for why this is a POST and not a GET https://github.com/ipfs/go-ipfs/pull/7097
681+
/* See IPFS commit for why this is a POST and not a GET https://github.com/ipfs/go-ipfs/pull/7097
682682
This commit upgrades go-ipfs-cmds and configures the commands HTTP API Handler
683683
to only allow POST/OPTIONS, disallowing GET and others in the handling of
684684
command requests in the IPFS HTTP API (where before every type of request

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.ipfs.api;
22

3-
import java.io.*;
43
import java.nio.file.*;
54
import java.util.*;
65

@@ -21,8 +20,7 @@ public void testAdd() throws Exception {
2120

2221
String EXPECTED = "QmX5fZ6aUxNTAS7ZfYc8f4wPoMx6LctuNbMjuJZ9EmUSr6";
2322

24-
Path base = TMPDATA;
25-
base.toFile().mkdirs();
23+
Path base = Files.createTempDirectory("test");
2624
Files.write(base.resolve("index.html"), "<html></html>".getBytes());
2725
Path js = base.resolve("js");
2826
js.toFile().mkdirs();

0 commit comments

Comments
 (0)