Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit f00061b

Browse files
author
Joonas Koivunen
committed
fix: tests had gone a bit out of sync....
1 parent cb81c5a commit f00061b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

http/src/v0/refs.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ async fn all_refs_from_root() {
420420
"QmRgutAxd8t7oGkSm4wmeuByG6M51wcTso6cubDdQtuEfL",
421421
);
422422

423-
let all_edges: Vec<_> = refs_path(ipfs, IpfsPath::try_from(root).unwrap(), None)
423+
let all_edges: Vec<_> = refs_paths(ipfs, vec![IpfsPath::try_from(root).unwrap()], None, false)
424424
.await
425425
.unwrap()
426-
.map_ok(|(source, dest)| (source.to_string(), dest.to_string()))
426+
.map_ok(|(source, dest, _)| (source.to_string(), dest.to_string()))
427427
.try_collect()
428428
.await
429429
.unwrap();
@@ -462,14 +462,16 @@ async fn all_unique_refs_from_root() {
462462
"QmRgutAxd8t7oGkSm4wmeuByG6M51wcTso6cubDdQtuEfL",
463463
);
464464

465-
let all_edges: Vec<_> = refs_path(ipfs, IpfsPath::try_from(root).unwrap(), None)
465+
let all_edges: Vec<_> = refs_paths(ipfs, vec![IpfsPath::try_from(root).unwrap()], None, false)
466466
.await
467467
.unwrap()
468-
.map_ok(|(source, dest)| (source.to_string(), dest.to_string()))
468+
.map_ok(|(source, dest, _)| (source.to_string(), dest.to_string()))
469469
.try_collect()
470470
.await
471471
.unwrap();
472472

473+
// if this test would have only the <dst> it might work?
474+
473475
// go-ipfs output:
474476
// bafyreihpc3vupfos5yqnlakgpjxtyx3smkg26ft7e2jnqf3qkyhromhb64 -> bafyreidquig3arts3bmee53rutt463hdyu6ff4zeas2etf2h2oh4dfms44
475477
// bafyreihpc3vupfos5yqnlakgpjxtyx3smkg26ft7e2jnqf3qkyhromhb64 -> QmPJ4A6Su27ABvvduX78x2qdWMzkdAYxqeH5TVrHeo3xyy
@@ -497,10 +499,10 @@ async fn refs_with_path() {
497499

498500
for path in paths.iter() {
499501
let path = IpfsPath::try_from(*path).unwrap();
500-
let all_edges: Vec<_> = refs_path(ipfs.clone(), path, None)
502+
let all_edges: Vec<_> = refs_paths(ipfs.clone(), vec![path], None, false)
501503
.await
502504
.unwrap()
503-
.map_ok(|(source, dest)| (source.to_string(), dest.to_string()))
505+
.map_ok(|(source, dest, _)| (source.to_string(), dest.to_string()))
504506
.try_collect()
505507
.await
506508
.unwrap();

0 commit comments

Comments
 (0)