mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Test: Don't depend on a specific version of clusterio_lib
This commit is contained in:
1 parent
edfe32c59e
commit
fbdf206e31
1 file changed
+7
-3
@@ -199,12 +199,16 @@ describe("Integration of Clusterio", function() {
|
|||||||
it("should download mods from controller", async function() {
|
it("should download mods from controller", async function() {
|
||||||
slowTest(this);
|
slowTest(this);
|
||||||
await runWithAltHost(async () => {
|
await runWithAltHost(async () => {
|
||||||
const clusterioLib = path.join("temp", "test", "alt-mods", "clusterio_lib_0.1.2.zip");
|
// Use the latest vesion in /dist instead of a hardcoded version
|
||||||
assert(!await fs.pathExists(clusterioLib), "mod was downloaded before the test");
|
async function checkModDownloaded() {
|
||||||
|
let files = await fs.readdir(path.join("temp", "test", "alt-mods"));
|
||||||
|
return files.find(name => name.startsWith("clusterio_lib_"));
|
||||||
|
}
|
||||||
|
assert(!await checkModDownloaded(), "mod was downloaded before the test");
|
||||||
await execCtl("instance create alt-mod --id 98");
|
await execCtl("instance create alt-mod --id 98");
|
||||||
await execCtl("instance assign alt-mod 5");
|
await execCtl("instance assign alt-mod 5");
|
||||||
await execCtl("instance save create alt-mod");
|
await execCtl("instance save create alt-mod");
|
||||||
assert(await fs.pathExists(clusterioLib), "mod was not downloaded by the test");
|
assert(await checkModDownloaded(), "mod was not downloaded by the test");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("should auto start instances with auto_start enabled", async function() {
|
it("should auto start instances with auto_start enabled", async function() {
|
||||||
|
|||||||
Reference in new issue
Block a user