Panel: SCOPENET Map storage and endpoints; Vantage proxy removed

This commit is contained in:
Claude committed 2026-10-01 00:20:04 +00:00
1 parent c0daa0507a
commit 9102e2fc52
15 files changed
+751 -1286

No files matched your search

+1 -15
View File
@@ -23,7 +23,7 @@ async fn world() -> World {
}
let (alex, steve) = (t.login("Alex", "password123").await, t.login("Steve", "password123").await);
let (alex_uuid, steve_uuid) = (t.uuid("Alex").await, t.uuid("Steve").await);
let (s, srv) = t.call("POST", "/api/admin/servers", Some(&admin), Some(json!({"name": "SMP", "instance_id": "smp", "map_address": "https://map.example.com"}))).await;
let (s, srv) = t.call("POST", "/api/admin/servers", Some(&admin), Some(json!({"name": "SMP", "instance_id": "smp"}))).await;
assert_eq!(s, StatusCode::OK, "{srv}");
let sid = srv["server"]["id"].as_i64().unwrap();
let server = srv["token"].as_str().unwrap().to_string();
@@ -41,20 +41,6 @@ impl World {
}
}
#[tokio::test]
async fn map_address_is_validated_and_shown_to_launchers() {
let w = world().await;
let (_, list) = w.t.call("GET", "/api/v1/servers/public", None, None).await;
assert_eq!(list["servers"][0]["map_address"], "https://map.example.com");
for bad in ["not a url", "ftp://map.example.com", "https://user:pw@map.example.com", "https://map.example.com/#x"] {
let (s, _) = w.t.call("PUT", &format!("/api/admin/servers/{}", w.sid), Some(&w.admin), Some(json!({"name": "SMP", "instance_id": "smp", "map_address": bad}))).await;
assert_eq!(s, StatusCode::BAD_REQUEST, "{bad}");
}
let (s, r) = w.t.call("PUT", &format!("/api/admin/servers/{}", w.sid), Some(&w.admin), Some(json!({"name": "SMP", "instance_id": "smp", "map_address": ""}))).await;
assert_eq!(s, StatusCode::OK, "{r}");
assert_eq!(r["map_address"], "");
}
#[tokio::test]
async fn tpa_and_messages_are_queued_once_for_the_game_server() {
let w = world().await;