mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Fix error starting instance on unlisted versions
The FactorioServer.checkForUpdates function would wrongfully assume that the version running would always be listed on Wube's archive page, and throw an error if this was not the case. Ignore version checking logic if no suitable latest version could be found.
This commit is contained in:
1 parent
f56605600f
commit
25d98d2ab3
3 files changed
+124
-256
No files matched your search
+6
@@ -121,6 +121,12 @@ describe("FactorioVersions", function() {
|
||||
assert.equal(versions.filter(v => v.stable).length, 48);
|
||||
assert.equal(versions.filter(v => !v.stable).length, 57);
|
||||
});
|
||||
it("parses versions from empty html file", async function() {
|
||||
mockFetch("");
|
||||
|
||||
const versions = await fetchFactorioVersions();
|
||||
assert.equal(versions.length, 0);
|
||||
});
|
||||
it("parses versions from live api", async function() {
|
||||
slowTest(this);
|
||||
global.fetch = originalFetch;
|
||||
|
||||
Reference in new issue
Block a user