From ea144863f9b0d034f96f825f566c320551e22404 Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Tue, 5 Aug 2025 21:35:43 +0200 Subject: [PATCH] Fix incorrect type in player path request response --- plugins/minimap/messages.ts | 2 +- test/integration/instance.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/minimap/messages.ts b/plugins/minimap/messages.ts index 6cb67a19..aa989de0 100644 --- a/plugins/minimap/messages.ts +++ b/plugins/minimap/messages.ts @@ -369,6 +369,6 @@ export class GetPlayerPathRequest { } static Response = lib.plainJson(Type.Object({ - "positions": Type.Optional(Type.String()), + "positions": Type.Union([Type.String(), Type.Null()]), })); } diff --git a/test/integration/instance.js b/test/integration/instance.js index 8224105d..eb4e617b 100644 --- a/test/integration/instance.js +++ b/test/integration/instance.js @@ -144,7 +144,7 @@ describe("Clusterio Instance", function() { it("should respond to a player whitelist add and remove event", async function() { await execCtl(`instance config set ${instName} factorio.sync_whitelist bidirectional`); await sendRcon(instId, "/whitelist add WhitelistPlayer"); - await lib.wait(15); // Propagation time, 10ms worked for me, so i made it 15ms + await lib.wait(30); // Propagation time, had issues with 15ms in ci so i made it 30ms const userAdded = await getUser("WhitelistPlayer"); assert(userAdded.isWhitelisted, "Player is not whitelisted"); const isAltAdded = await sendRcon(instAltId, "/whitelist get WhitelistPlayer"); @@ -154,7 +154,7 @@ describe("Clusterio Instance", function() { ); await sendRcon(instId, "/whitelist remove WhitelistPlayer"); - await lib.wait(15); // Propagation time, 10ms worked for me, so i made it 15ms + await lib.wait(30); // Propagation time, had issues with 15ms in ci so i made it 30ms const userRemoved = await getUser("WhitelistPlayer"); assert(!userRemoved.isWhitelisted, "Player is not unwhitelisted"); const isAltRemoved = await sendRcon(instAltId, "/whitelist get WhitelistPlayer");