Skip to content

Commit 2cf8266

Browse files
committed
Fix test in CI environment
1 parent cd8134e commit 2cf8266

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ public void wrappedSingleFileTest() throws IOException {
102102

103103
@Test
104104
public void dirTest() throws IOException {
105-
NamedStreamable dir = new NamedStreamable.FileWrapper(new File("java"));
105+
Path test = Files.createTempDirectory("test");
106+
Files.write(test.resolve("file.txt"), "G'day IPFS!".getBytes());
107+
NamedStreamable dir = new NamedStreamable.FileWrapper(test.toFile());
106108
List<MerkleNode> add = ipfs.add(dir);
107109
MerkleNode addResult = add.get(add.size() - 1);
108110
List<MerkleNode> ls = ipfs.ls(addResult.hash);

0 commit comments

Comments
 (0)