Fix Rust formatting
Server integrations / Paper and protocol tests (push) Failing after 20s
Server integrations / fabric / 1.20.1 (push) Failing after 11s
Server integrations / fabric / 1.21.1 (push) Failing after 14s
Server integrations / fabric / 26.1.2 (push) Failing after 17s
Server integrations / fabric / 26.2 (push) Failing after 12s
Server integrations / fabric / 26.3 (push) Failing after 6s
Server integrations / forge / 1.20.1 (push) Failing after 6s
Server integrations / forge / 1.21.1 (push) Failing after 8s
Server integrations / forge / 26.1.2 (push) Failing after 8s
Server integrations / forge / 26.2 (push) Failing after 8s
Server integrations / forge / 26.3 (push) Failing after 7s
CI / Web UIs (type-check + build) (panel/web) (push) Canceled after 0s
CI / Launcher (Windows build check) (push) Canceled after 2m53s
CI / Real installs (Mojang, Fabric, Quilt, Forge, NeoForge) (push) Canceled after 0s
CI / Docker image builds (push) Canceled after 0s
CI / Rust (fmt, clippy, tests) (push) Canceled after 1m22s
CI / Web UIs (type-check + build) (launcher) (push) Canceled after 1m27s
Server integrations / Paper and protocol tests (push) Failing after 20s
Server integrations / fabric / 1.20.1 (push) Failing after 11s
Server integrations / fabric / 1.21.1 (push) Failing after 14s
Server integrations / fabric / 26.1.2 (push) Failing after 17s
Server integrations / fabric / 26.2 (push) Failing after 12s
Server integrations / fabric / 26.3 (push) Failing after 6s
Server integrations / forge / 1.20.1 (push) Failing after 6s
Server integrations / forge / 1.21.1 (push) Failing after 8s
Server integrations / forge / 26.1.2 (push) Failing after 8s
Server integrations / forge / 26.2 (push) Failing after 8s
Server integrations / forge / 26.3 (push) Failing after 7s
CI / Web UIs (type-check + build) (panel/web) (push) Canceled after 0s
CI / Launcher (Windows build check) (push) Canceled after 2m53s
CI / Real installs (Mojang, Fabric, Quilt, Forge, NeoForge) (push) Canceled after 0s
CI / Docker image builds (push) Canceled after 0s
CI / Rust (fmt, clippy, tests) (push) Canceled after 1m22s
CI / Web UIs (type-check + build) (launcher) (push) Canceled after 1m27s
This commit is contained in:
1 parent
ce49447b6e
commit
60edc99780
58 files changed
+3533
-1375
No files matched your search
@@ -32,13 +32,22 @@ async fn claim_index_follows_claims_and_membership() {
|
||||
assert!(same.get("claims").is_none());
|
||||
|
||||
// A guild, then a claim: the revision moves and the index lists the chunk.
|
||||
let (_, g) = t.call("POST", "/api/v1/guilds", Some(&tokens[0]), Some(json!({"instance_id": "smp", "name": "Iron", "tag": "IRON"}))).await;
|
||||
let (_, g) =
|
||||
t.call("POST", "/api/v1/guilds", Some(&tokens[0]), Some(json!({"instance_id": "smp", "name": "Iron", "tag": "IRON"}))).await;
|
||||
let gid = g["id"].as_str().unwrap().to_string();
|
||||
let (_, r1) = index(Some(rev0.clone())).await;
|
||||
assert_eq!(r1["unchanged"], false, "guild creation bumps the revision");
|
||||
let claim = |x: i32| {
|
||||
let (t, tok, gid) = (&t, tokens[0].clone(), gid.clone());
|
||||
async move { t.call("POST", &format!("/api/v1/guilds/{gid}/claim"), Some(&tok), Some(json!({"server_id": sid, "dimension": "minecraft:overworld", "chunk_x": x, "chunk_z": -4}))).await }
|
||||
async move {
|
||||
t.call(
|
||||
"POST",
|
||||
&format!("/api/v1/guilds/{gid}/claim"),
|
||||
Some(&tok),
|
||||
Some(json!({"server_id": sid, "dimension": "minecraft:overworld", "chunk_x": x, "chunk_z": -4})),
|
||||
)
|
||||
.await
|
||||
}
|
||||
};
|
||||
let (s, c1) = claim(3).await;
|
||||
assert_eq!(s, StatusCode::OK, "{c1}");
|
||||
@@ -53,7 +62,12 @@ async fn claim_index_follows_claims_and_membership() {
|
||||
assert_eq!(index(Some(rev2.clone())).await.1["unchanged"], true);
|
||||
|
||||
// Membership changes bump it too.
|
||||
sqlx::query("INSERT INTO guild_members (guild_id, uuid, name, role, joined_at) VALUES (?, ?, 'Steve', 'member', 'now')").bind(&gid).bind(&steve_uuid).execute(&t.db).await.unwrap();
|
||||
sqlx::query("INSERT INTO guild_members (guild_id, uuid, name, role, joined_at) VALUES (?, ?, 'Steve', 'member', 'now')")
|
||||
.bind(&gid)
|
||||
.bind(&steve_uuid)
|
||||
.execute(&t.db)
|
||||
.await
|
||||
.unwrap();
|
||||
let (_, idx) = index(Some(rev2.clone())).await;
|
||||
assert_eq!(idx["unchanged"], false);
|
||||
assert_eq!(idx["members"][&gid].as_array().unwrap().len(), 2);
|
||||
|
||||
Reference in new issue
Block a user