diff --git a/test/integration/clusterio.js b/test/integration/clusterio.js index 3bd00e3b..38710887 100644 --- a/test/integration/clusterio.js +++ b/test/integration/clusterio.js @@ -88,39 +88,39 @@ describe("Integration of Clusterio", function() { }); describe("create-save", function() { - slowTest(this); it("creates a save", async function() { + slowTest(this); await clusterctl._commands.get("create-save").run({instance: "test"}, testControl); }); }); describe("start-instance", function() { - slowTest(this); it("starts the instance", async function() { + slowTest(this); await clusterctl._commands.get("start-instance").run({instance: "test"}, testControl); // TODO check that the instance actually stopped }); }); describe("send-rcon", function() { - slowTest(this); it("sends the command", async function() { + slowTest(this); await clusterctl._commands.get("send-rcon").run({instance: "test", command: "test"}, testControl); // TODO check that the command was received }); }); describe("stop-instance", function() { - slowTest(this); it("stops the instance", async function() { + slowTest(this); await clusterctl._commands.get("stop-instance").run({instance: "test"}, testControl); // TODO check that the instance actually stopped }); }); describe("delete-instance", function() { - slowTest(this); it("deletes the instance", async function() { + slowTest(this); await clusterctl._commands.get("delete-instance").run({instance: "test"}, testControl); assert(!await fs.exists(path.join(instancesDir, "test")), "Instance was not deleted"); }); diff --git a/test/integration/patch.js b/test/integration/patch.js index 87edc342..25e8b1f8 100644 --- a/test/integration/patch.js +++ b/test/integration/patch.js @@ -10,9 +10,17 @@ const factorio = require("lib/factorio"); require("./server") describe("Integration of lib/factorio/patch", function() { + // Mark that this test depeneds on a test that takes a lot of time. + function slowTest(test) { + if (process.env.FAST_TEST) { + test.skip(); + } + } + describe("patch()", function() { let savePath = path.join("test", "temp", "integration", "saves", "test.zip"); it("should patch a freeplay game", async function() { + slowTest(this); await factorio.patch(savePath, [{ name: "test", files: [{ path: "test.lua", content: "-- test" }] @@ -23,6 +31,7 @@ describe("Integration of lib/factorio/patch", function() { assert.equal(content, "-- test"); }); it("should remove old modules in a save", async function() { + slowTest(this); await factorio.patch(savePath, [{ name: "test", files: [] }]); let zip = await jszip.loadAsync(await fs.readFile(savePath)); assert.equal(zip.file("test/modules/test.lua"), null);