Skip to content

Commit 48b875a

Browse files
committed
graph(ipfs-tests): task 2 — make test IPFS upload URL configurable via env var
1 parent d81528c commit 48b875a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graph/src/ipfs/test_utils.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use reqwest::multipart;
22
use serde::Deserialize;
33

4+
use crate::ipfs;
5+
46
#[derive(Clone, Debug)]
57
pub struct IpfsAddFile {
68
path: String,
@@ -53,7 +55,7 @@ where
5355
}
5456

5557
let resp = reqwest::Client::new()
56-
.post("http://127.0.0.1:5001/api/v0/add")
58+
.post(format!("{}api/v0/add", ipfs::ServerAddress::test_rpc_api()))
5759
.multipart(form)
5860
.send()
5961
.await?

0 commit comments

Comments
 (0)