test fixes

This commit is contained in:
SPRINX0\prochazka
2024-12-09 16:52:02 +01:00
parent 5405b9bf72
commit 7f367a1f84
9 changed files with 23 additions and 29 deletions

View File

@@ -23,6 +23,12 @@ class JsonLinesDatabase {
await fs.writeFile(this.filename, this.data.map(x => JSON.stringify(x)).join('\n'));
}
async unload() {
this.data = [];
this.loadedOk = false;
this.loadPerformed = false;
}
async _ensureLoaded() {
if (!this.loadPerformed) {
await lock.acquire('reader', async () => {

View File

@@ -96,7 +96,7 @@ function packagedPluginsDir() {
// return path.resolve(__dirname, '../../plugins');
// }
}
if (processArgs.runPackerBuild) {
if (processArgs.runE2eTests) {
return path.resolve('packer/build/plugins');
}
return null;

View File

@@ -14,7 +14,7 @@ const workspaceDir = getNamedArg('--workspace-dir');
const processDisplayName = getNamedArg('--process-display-name');
const listenApi = process.argv.includes('--listen-api');
const listenApiChild = process.argv.includes('--listen-api-child') || listenApi;
const runPackerBuild = process.argv.includes('--run-packer-build');
const runE2eTests = process.argv.includes('--run-e2e-tests');
function getPassArgs() {
const res = [];
@@ -24,8 +24,8 @@ function getPassArgs() {
if (listenApiChild) {
res.push('listen-api-child');
}
if (runPackerBuild) {
res.push('--run-packer-build');
if (runE2eTests) {
res.push('--run-e2e-tests');
}
return res;
}
@@ -40,5 +40,5 @@ module.exports = {
listenApi,
listenApiChild,
processDisplayName,
runPackerBuild,
runE2eTests,
};