Skip to content

Commit

Permalink
Merge pull request #120 from jefft0/testCatFile-change-cid
Browse files Browse the repository at this point in the history
fix: In testCatFile, fetch a reliable sample file
  • Loading branch information
jefft0 authored Aug 23, 2022
2 parents a2c7eff + 509952f commit 51c7581
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ public void testDNSRequest() throws Exception {
@Test
public void testCatFile() throws Exception {
byte[] latestRaw = ipfs.newRequest("cat")
.withArgument("/ipns/xkcd.hacdias.com/latest/info.json")
.withArgument("/ipfs/Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu")
.send();

try {
new JSONObject(new String(latestRaw));
} catch (JSONException e) {
fail("error while parsing fetched JSON: " + new String(latestRaw));
}
assertEquals(
"response should have the correct length",
12435,
latestRaw.length
);
}
}

0 comments on commit 51c7581

Please sign in to comment.