mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-22 11:25:56 +00:00
Compare character start gaps against a saved pre-update baseline
This commit is contained in:
1 parent
1aade1dcf9
commit
324e9810cc
17 files changed
+550
-27
No files matched your search
@@ -52,6 +52,19 @@ test("refresh after recovery returns the latest disk state, then its absence", a
|
||||
assert.equal(await refreshServerUpdateState("recovery-case"), null);
|
||||
});
|
||||
|
||||
test("successful update keeps the existing-character warning across disk refresh", async () => {
|
||||
const original = globalThis.__hotfixApi.applyUpdate;
|
||||
try {
|
||||
applyFailure = false;
|
||||
stateFailure = false;
|
||||
pending = null;
|
||||
globalThis.__hotfixApi.applyUpdate = async () => ({ txn: { state: "committed", to_version: "2" }, preexisting_character_count: 174 });
|
||||
assert.equal(await applyServerUpdate("old-character-warnings", { choices: {} }), true);
|
||||
await refreshServerUpdateState("old-character-warnings");
|
||||
assert.deepEqual(useServerUpdate("old-character-warnings").result, { committed: "2", preexistingCharacters: 174 });
|
||||
} finally { globalThis.__hotfixApi.applyUpdate = original; }
|
||||
});
|
||||
|
||||
test("a stopped server is left stopped after a successful update by default", async () => {
|
||||
calls.length = 0;
|
||||
serverRunning = false;
|
||||
|
||||
Reference in new issue
Block a user