mirror of https://gitee.com/bigwinds/arangodb
switch the temp path too (#9000)
This commit is contained in:
parent
84d3d5dc5b
commit
5171771dc8
|
@ -29,6 +29,7 @@
|
|||
// server is started in unicode directory
|
||||
|
||||
const tu = require('@arangodb/test-utils');
|
||||
const fs = require("fs");
|
||||
|
||||
const functionsDocumentation = {
|
||||
'paths': 'paths test for server'
|
||||
|
@ -40,7 +41,18 @@ const testPaths = {
|
|||
|
||||
function paths_server(options) {
|
||||
let testCases = tu.scanTestPaths(testPaths.paths_server);
|
||||
return tu.performTests(options, testCases, require("fs").join('server_paths', "some dog", "ла́ять", "犬", "Kläffer") , tu.runThere);
|
||||
let weirdNames = ["some dog", "ла́ять", "犬", "Kläffer"]
|
||||
let tmpPath = fs.getTempPath();
|
||||
let tmp = fs.join(tmpPath, "x", weirdNames[0], weirdNames[1], weirdNames[2], weirdNames[3]);
|
||||
process.env.TMPDIR = tmp;
|
||||
process.env.TEMP = tmp;
|
||||
process.env.TMP = tmp;
|
||||
fs.makeDirectoryRecursive(process.env.TMPDIR);
|
||||
let rc = tu.performTests(options, testCases, fs.join('server_paths', weirdNames[0], weirdNames[1], weirdNames[2], weirdNames[3]), tu.runThere);
|
||||
process.env.TMPDIR = tmpPath;
|
||||
process.env.TEMP = tmpPath;
|
||||
process.env.TMP = tmpPath;
|
||||
return rc;
|
||||
}
|
||||
|
||||
exports.setup = function (testFns, defaultFns, opts, fnDocs, optionsDoc, allTestPaths) {
|
||||
|
|
Loading…
Reference in New Issue