mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Add save copying and start options when creating an instance
The create instance modal can now copy the active save of the instance whose config is copied, optionally saving the running game first, and start the new instance once the copy is done. The new instance is assigned to the host of the source so the save can be transferred. Saving a running game is a new InstanceSaveGameRequest handled by the host through /server-save, which waits for the save to finish. It is also exposed as clusterioctl instance save-game. Closes #405 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
e09e1c5f80
commit
c997fd8ea7
7 files changed
+149
-12
No files matched your search
@@ -914,6 +914,20 @@ describe("Integration of Clusterio", function() {
|
||||
}
|
||||
assert(received, "InstanceSaveDetailsUpdatesEvent not sent");
|
||||
});
|
||||
it("should save the running game with save-game", async function() {
|
||||
slowTest(this);
|
||||
getControl().saveUpdates = [];
|
||||
await execCtl("instance save-game test");
|
||||
let received = false;
|
||||
for (let x = 0; x < 10; x++) {
|
||||
if (getControl().saveUpdates.length) {
|
||||
received = true;
|
||||
break;
|
||||
}
|
||||
await wait(100);
|
||||
}
|
||||
assert(received, "InstanceSaveDetailsUpdatesEvent not sent");
|
||||
});
|
||||
it("should prevent execution of script commands when disabled", async function() {
|
||||
slowTest(this);
|
||||
await execCtl("instance send-rcon test /c");
|
||||
|
||||
Reference in new issue
Block a user