mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Add integration test for starting an instance with a release channel
Configures an instance with the "experimental" channel and starts it, exercising channel resolution end to end across the controller and host. The resolved version may or may not be installed depending on the host's Factorio install, so the test asserts the instance reaches a terminal state rather than a specific outcome. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f793ec33b3
commit
dfe132699e
1 file changed
+22
@@ -704,6 +704,28 @@ describe("Integration of Clusterio", function() {
|
||||
await execCtl("instance config set 44 factorio.version latest");
|
||||
}
|
||||
});
|
||||
it("should resolve a release channel target when starting", async function() {
|
||||
slowTest(this);
|
||||
try {
|
||||
// "experimental" is resolved to a concrete version through the
|
||||
// controller's latest-releases data before the server starts.
|
||||
// Whether that version is installed (or downloadable) depends on
|
||||
// the host's Factorio install - CI uses a fixed direct install -
|
||||
// so the start may succeed or fail, but the channel must resolve
|
||||
// and the instance must reach a terminal state rather than hang.
|
||||
await execCtl("instance config set 44 factorio.version experimental");
|
||||
await execCtl(`instance ${cmd} test`).catch(() => {});
|
||||
const status = (await getInstances()).get(44).status;
|
||||
assert(
|
||||
["running", "stopped"].includes(status),
|
||||
`instance stuck in unexpected state '${status}'`
|
||||
);
|
||||
|
||||
} finally {
|
||||
await execCtl("instance stop 44").catch(() => {});
|
||||
await execCtl("instance config set 44 factorio.version latest");
|
||||
}
|
||||
});
|
||||
it("should not leave the instance in the stopping state if it fails", async function() {
|
||||
slowTest(this);
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user