mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +09:00
fix: prevent restart downgrades (#951)
Co-authored-by: Loi Nguyen <1948922+lntutor@users.noreply.github.com>
This commit is contained in:
1 parent
9ff090c30b
commit
08651b5917
7 files changed
+189
-1
No files matched your search
@@ -252,6 +252,23 @@ describe("controller/src/Controller", function() {
|
||||
assert.equal(controller.config.restartRequired, true);
|
||||
});
|
||||
});
|
||||
describe(".checkRestartDowngrade()", function() {
|
||||
it("returns null when the installed version matches", async function() {
|
||||
controller.config.set("controller.version", controllerVersion);
|
||||
assert.equal(await controller.checkRestartDowngrade(), null);
|
||||
});
|
||||
it("returns null when the installed version is newer", async function() {
|
||||
controller.config.set("controller.version", "0.0.0");
|
||||
assert.equal(await controller.checkRestartDowngrade(), null);
|
||||
});
|
||||
it("returns both versions when the installed version is older", async function() {
|
||||
controller.config.set("controller.version", "999.0.0");
|
||||
assert.deepEqual(await controller.checkRestartDowngrade(), {
|
||||
installedVersion: controllerVersion,
|
||||
runningVersion: "999.0.0",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe(".factorioVersions", function() {
|
||||
const _fetch = global.fetch;
|
||||
|
||||
Reference in new issue
Block a user