mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Move test/temp to temp/test
Move the temporary files generated by the the tests to the top level directory temp.
This commit is contained in:
1 parent
028f00e58a
commit
f9f0e5b5f7
12 files changed
+18
-17
No files matched your search
+1
-1
@@ -42,7 +42,7 @@ static/pictures/spritesheet.js
|
|||||||
static/pictures/spritesheet.png
|
static/pictures/spritesheet.png
|
||||||
static/external
|
static/external
|
||||||
saves
|
saves
|
||||||
/test/temp/
|
/temp/
|
||||||
|
|
||||||
# weird pattern to ignore sharedPlugins except not ignore some core modules
|
# weird pattern to ignore sharedPlugins except not ignore some core modules
|
||||||
!sharedPlugins/
|
!sharedPlugins/
|
||||||
|
|||||||
+1
-1
@@ -7,5 +7,5 @@ before_install:
|
|||||||
- npm install -g codecov
|
- npm install -g codecov
|
||||||
script:
|
script:
|
||||||
- npm run-script ci-cover
|
- npm run-script ci-cover
|
||||||
- cat test/temp/integration/log.txt
|
- cat temp/test/integration/log.txt
|
||||||
- codecov -f coverage/lcov.info
|
- codecov -f coverage/lcov.info
|
||||||
@@ -32,11 +32,11 @@ let slaveProcess;
|
|||||||
|
|
||||||
let url = "https://localhost:4443/";
|
let url = "https://localhost:4443/";
|
||||||
let token = jwt.sign({ id: "api" }, "TestSecretDoNotUse");
|
let token = jwt.sign({ id: "api" }, "TestSecretDoNotUse");
|
||||||
let instancesDir = path.join("test", "temp", "instances");
|
let instancesDir = path.join("temp", "test", "instances");
|
||||||
let databaseDir = path.join("test", "temp", "databse");
|
let databaseDir = path.join("temp", "test", "databse");
|
||||||
let masterConfigPath = path.join("test", "temp", "master-integration.json");
|
let masterConfigPath = path.join("temp", "test", "master-integration.json");
|
||||||
let slaveConfigPath = path.join("test", "temp", "slave-integration.json");
|
let slaveConfigPath = path.join("temp", "test", "slave-integration.json");
|
||||||
let controlConfigPath = path.join("test", "temp", "control-integration.json");
|
let controlConfigPath = path.join("temp", "test", "control-integration.json");
|
||||||
|
|
||||||
async function exec(...args) {
|
async function exec(...args) {
|
||||||
console.log(args[0]);
|
console.log(args[0]);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ require("./server")
|
|||||||
|
|
||||||
describe("Integration of lib/factorio/patch", function() {
|
describe("Integration of lib/factorio/patch", function() {
|
||||||
describe("patch()", function() {
|
describe("patch()", function() {
|
||||||
let savePath = path.join("test", "temp", "integration", "saves", "test.zip");
|
let savePath = path.join("temp", "test", "integration", "saves", "test.zip");
|
||||||
it("should patch a freeplay game", async function() {
|
it("should patch a freeplay game", async function() {
|
||||||
slowTest(this);
|
slowTest(this);
|
||||||
await factorio.patch(savePath, [{
|
await factorio.patch(savePath, [{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ describe("Integration of lib/factorio/server", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("class FactorioServer", function() {
|
describe("class FactorioServer", function() {
|
||||||
let writePath = path.join("test", "temp", "integration");
|
let writePath = path.join("temp", "test", "integration");
|
||||||
let server = new factorio.FactorioServer("factorio", writePath, {});
|
let server = new factorio.FactorioServer("factorio", writePath, {});
|
||||||
let logFile;
|
let logFile;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
const assert = require("assert").strict;
|
const assert = require("assert").strict;
|
||||||
const fs = require("fs-extra");
|
const fs = require("fs-extra");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
const database = require("lib/database");
|
const database = require("lib/database");
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ describe("lib/database", function() {
|
|||||||
|
|
||||||
describe("saveMapAsJson()", function() {
|
describe("saveMapAsJson()", function() {
|
||||||
it("should save a mapping as JSON", async function() {
|
it("should save a mapping as JSON", async function() {
|
||||||
let testFile = 'test/temp/save_map.json';
|
let testFile = path.join("temp", "test", "save_map.json");
|
||||||
async function deleteTestFile() {
|
async function deleteTestFile() {
|
||||||
try {
|
try {
|
||||||
await fs.unlink(testFile);
|
await fs.unlink(testFile);
|
||||||
@@ -134,7 +135,7 @@ describe("lib/database", function() {
|
|||||||
|
|
||||||
describe("saveMapAsJsonArray()", function() {
|
describe("saveMapAsJsonArray()", function() {
|
||||||
it("should save a mapping as JSON", async function() {
|
it("should save a mapping as JSON", async function() {
|
||||||
let testFile = 'test/temp/save_array_map.json';
|
let testFile = path.join("temp", "test", "save_array_map.json");
|
||||||
async function deleteTestFile() {
|
async function deleteTestFile() {
|
||||||
try {
|
try {
|
||||||
await fs.unlink(testFile);
|
await fs.unlink(testFile);
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ describe("lib/factorio", function() {
|
|||||||
it("should throw on unknown scenario", async function() {
|
it("should throw on unknown scenario", async function() {
|
||||||
let zip = new jszip();
|
let zip = new jszip();
|
||||||
zip.file("world/control.lua", "-- unknown\n");
|
zip.file("world/control.lua", "-- unknown\n");
|
||||||
let zipPath = path.join("test", "temp", "patch.zip");
|
let zipPath = path.join("temp", "test", "patch.zip");
|
||||||
await fs.outputFile(zipPath, await zip.generateAsync({type: "nodebuffer"}))
|
await fs.outputFile(zipPath, await zip.generateAsync({type: "nodebuffer"}))
|
||||||
|
|
||||||
await assert.rejects(
|
await assert.rejects(
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ describe("lib/factorio/server", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("class FactorioServer", function() {
|
describe("class FactorioServer", function() {
|
||||||
let writePath = path.join("test", "temp", "should_not_exist");
|
let writePath = path.join("temp", "test", "server");
|
||||||
let server = new factorio.FactorioServer(path.join("test", "file", "factorio"), writePath, {});
|
let server = new factorio.FactorioServer(path.join("test", "file", "factorio"), writePath, {});
|
||||||
|
|
||||||
describe(".init()", function() {
|
describe(".init()", function() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const path = require('path');
|
|||||||
const fileOps = require('lib/fileOps');
|
const fileOps = require('lib/fileOps');
|
||||||
|
|
||||||
describe("fileOps.js", function(){
|
describe("fileOps.js", function(){
|
||||||
let baseDir = path.join("test", "temp", "fileOps");
|
let baseDir = path.join("temp", "test", "fileOps");
|
||||||
async function setupTestingEnv() {
|
async function setupTestingEnv() {
|
||||||
await fs.ensureDir(path.join(baseDir, "test", "folder"));
|
await fs.ensureDir(path.join(baseDir, "test", "folder"));
|
||||||
await fs.ensureDir(path.join(baseDir, "test", "another folder"));
|
await fs.ensureDir(path.join(baseDir, "test", "another folder"));
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const path = require("path");
|
|||||||
const generateSSLcert = require("lib/generateSSLcert")
|
const generateSSLcert = require("lib/generateSSLcert")
|
||||||
|
|
||||||
describe("generateSSLcert.js(options)", ()=>{
|
describe("generateSSLcert.js(options)", ()=>{
|
||||||
let testDir = "test/temp/certTest";
|
let testDir = path.join("temp", "test", "certTest");
|
||||||
before(async function() {
|
before(async function() {
|
||||||
await fs.remove(testDir);
|
await fs.remove(testDir);
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ describe("lib/plugin", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("loadPluginInfos()", function() {
|
describe("loadPluginInfos()", function() {
|
||||||
let baseDir = path.join('test', 'temp', 'plugin');
|
let baseDir = path.join("temp", "test", "plugin");
|
||||||
let emptyDir = path.join(baseDir, 'emptyDir');
|
let emptyDir = path.join(baseDir, 'emptyDir');
|
||||||
let emptyPlugin = path.join(baseDir, 'emptyPlugin');
|
let emptyPlugin = path.join(baseDir, 'emptyPlugin');
|
||||||
let testPlugin = path.join(baseDir, 'testPlugin');
|
let testPlugin = path.join(baseDir, 'testPlugin');
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ describe("Slave testing", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("symlinkMods()", function() {
|
describe("symlinkMods()", function() {
|
||||||
let testDir = path.join("test", "temp", "symlink");
|
let testDir = path.join("temp", "test", "symlink");
|
||||||
let discardingLogger = {
|
let discardingLogger = {
|
||||||
warning: function() { },
|
warning: function() { },
|
||||||
log: function() { },
|
log: function() { },
|
||||||
|
|||||||
Reference in new issue
Block a user