Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller, swarm-ci-metrics: build forge clients through forge-client

This commit is contained in:
atlas 2026-11-15 23:02:54 +01:00
commit a77131ca3f

View file

@ -2542,7 +2542,8 @@ mod tests {
let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
let url = url::Url::parse(&format!("http://{}/", listener.local_addr().unwrap())).unwrap();
drop(listener);
let forge = forgejo_api::Forgejo::new(forgejo_api::Auth::Token("stub-token"), url).unwrap();
let forge =
forge_client::async_client(url, &forge_client::StaticToken::new("stub-token")).unwrap();
forge.user_get_current().await.expect_err("nothing listens")
}