feature/upstream-service #13

Merged
GW_MC merged 43 commits from feature/upstream-service into master 2026-01-01 10:49:32 +08:00
Showing only changes of commit 3cc6b40e61 - Show all commits

View File

@@ -70,7 +70,13 @@ impl From<crate::services::nginx::info::upstream_target::UpstreamTargetInfo>
updated_at: info.updated_at,
//
upstream_id: info.upstream_id,
upstream: None,
upstream: info.upstream.map(|u| UpstreamBasicInfo {
id: u.id,
name: u.name,
protocol: u.protocol,
created_at: u.created_at,
updated_at: u.updated_at,
}),
}
}
}
@@ -165,7 +171,6 @@ mod tests {
let res = server.get(&url).await;
res.assert_status_ok();
let text = res.text();
println!("response body: {}", text);
let body: UpstreamTargetInfo = serde_json::from_str(&text).expect("failed to parse json");
assert_eq!(body.upstream_id, up_id);
assert!(body.upstream.is_some());