Skip to content

Commit 0c29bb4

Browse files
committed
Update publish test
1 parent c38cc32 commit 0c29bb4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,15 @@ public void bulkBlockTest() throws IOException {
385385
System.out.println();
386386
}
387387

388-
@Ignore // Ignored because ipfs frequently times out internally in the publish call
388+
// @Ignore // Ignored because ipfs frequently times out internally in the publish call
389389
@Test
390390
public void publish() throws Exception {
391391
// JSON document
392392
String json = "{\"name\":\"blogpost\",\"documents\":[]}";
393393

394394
// Add a DAG node to IPFS
395395
MerkleNode merkleNode = ipfs.dag.put("json", json.getBytes());
396-
Assert.assertEquals("expected to be zdpuAknRh1Kro2r2xBDKiXyTiwA3Nu5XcmvjRPA1VNjH41NF7" , "zdpuAknRh1Kro2r2xBDKiXyTiwA3Nu5XcmvjRPA1VNjH41NF7", merkleNode.hash.toString());
396+
Assert.assertEquals("expected to be bafyreiafmbgul64c4nyybvgivswmkuhifamc24cdfuj4ij5xtnhpsfelky" , "bafyreiafmbgul64c4nyybvgivswmkuhifamc24cdfuj4ij5xtnhpsfelky", merkleNode.hash.toString());
397397

398398
// Get a DAG node
399399
byte[] res = ipfs.dag.get((Cid) merkleNode.hash);
@@ -403,7 +403,7 @@ public void publish() throws Exception {
403403
Map result = ipfs.name.publish(merkleNode.hash);
404404

405405
// Resolve from IPNS
406-
String resolved = ipfs.name.resolve(Multihash.fromBase58((String) result.get("Name")));
406+
String resolved = ipfs.name.resolve(Cid.decode((String) result.get("Name")));
407407
Assert.assertEquals("Should be equals", resolved, "/ipfs/" + merkleNode.hash.toString());
408408
}
409409

0 commit comments

Comments
 (0)