mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
Fix hang on missing/wrong Factorio version
Fix the start command hanging if the configured Factorio version for the instance started is not available on the slave.
This commit is contained in:
1 parent
a0f5864324
commit
09e4256c18
2 files changed
+16
-1
No files matched your search
@@ -315,7 +315,12 @@ class Instance extends libLink.Link {
|
||||
|
||||
async init(pluginInfos) {
|
||||
this.notifyStatus("starting");
|
||||
await this.server.init();
|
||||
try {
|
||||
await this.server.init();
|
||||
} catch (err) {
|
||||
this.notifyExit();
|
||||
throw err;
|
||||
}
|
||||
|
||||
// load plugins
|
||||
for (let pluginInfo of pluginInfos) {
|
||||
|
||||
@@ -173,6 +173,16 @@ describe("Integration of Clusterio", function() {
|
||||
});
|
||||
|
||||
describe("instance start", function() {
|
||||
it("should not hang if factorio version does not exist", async function() {
|
||||
slowTest(this);
|
||||
try {
|
||||
await execCtl("instance config set 44 factorio.version 0.1.2");
|
||||
await assert.rejects(execCtl("instance start test"));
|
||||
|
||||
} finally {
|
||||
await execCtl("instance config set 44 factorio.version latest");
|
||||
}
|
||||
});
|
||||
it("starts the given save", async function() {
|
||||
slowTest(this);
|
||||
await execCtl("instance start test --save world.zip");
|
||||
|
||||
Reference in new issue
Block a user