chore: cross-ref enum/CHECK constraints (#9); drop dead clone + harden smoke test (#4)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 17:21:33 +02:00
parent 2bce469ed2
commit 1a91b8a242
4 changed files with 22 additions and 6 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ pub async fn run(config: Config) -> anyhow::Result<()> {
let state = AppState {
db,
app_name: config.app_name.clone(),
app_name: config.app_name,
cookie_secure: config.cookie_secure,
search,
};
+13 -5
View File
@@ -22,13 +22,21 @@ async fn serves_health_live_over_tcp() {
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
let addr: SocketAddr = listener.local_addr().unwrap();
let handle = tokio::spawn(async move {
serve(listener, state).await.unwrap();
});
let handle = tokio::spawn(async move { serve(listener, state).await });
let url = format!("http://{addr}/health/live");
let body: serde_json::Value = reqwest::get(&url)
.await
let response = reqwest::get(&url).await;
// If the request failed and the server task already ended, it errored — surface that
// (a clear server error) instead of the opaque reqwest failure.
if response.is_err() && handle.is_finished() {
match handle.await {
Ok(Err(err)) => panic!("server failed: {err:?}"),
other => panic!("server task ended unexpectedly: {other:?}"),
}
}
let body: serde_json::Value = response
.expect("request succeeds")
.json()
.await