swarm-controller: fix test helper's forge::Client initializer
The stub-client helper in forge.rs built Client { api } after #4703
added a url field, breaking compilation of swarm-controller's test
target on main. Clone the URL the helper already builds for
Forgejo::new so it can also populate Client.url.
Closes #4709
This commit is contained in:
parent
f62ec349d5
commit
21c17772b8
1 changed files with 2 additions and 2 deletions
|
|
@ -1492,8 +1492,8 @@ mod tests {
|
||||||
let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap();
|
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();
|
let url = url::Url::parse(&format!("http://{}/", listener.local_addr().unwrap())).unwrap();
|
||||||
tokio::spawn(async move { axum::serve(listener, app).await });
|
tokio::spawn(async move { axum::serve(listener, app).await });
|
||||||
let api = Forgejo::new(Auth::Token("stub-token"), url).unwrap();
|
let api = Forgejo::new(Auth::Token("stub-token"), url.clone()).unwrap();
|
||||||
(Client { api }, seen)
|
(Client { api, url }, seen)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The `PATCH` [`Client::ensure_agent_user`] sent, if any.
|
/// The `PATCH` [`Client::ensure_agent_user`] sent, if any.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue