test(ordrestyring): isolate MariaDB fixtures in CI
This commit is contained in:
@@ -20,7 +20,7 @@ beforeAll(async () => {
|
||||
root = await fs.mkdtemp(path.join(os.tmpdir(), 'canonical-runner-test-'));
|
||||
socketPath = path.join(root, 'db.sock');
|
||||
execFileSync('mariadb-install-db', ['--no-defaults', `--datadir=${root}/data`,
|
||||
'--auth-root-authentication-method=normal', '--skip-test-db'], { stdio: 'ignore' });
|
||||
'--auth-root-authentication-method=normal', '--skip-test-db'], { stdio: 'ignore', cwd: root });
|
||||
server = spawn('mariadbd', ['--no-defaults', `--datadir=${root}/data`, `--socket=${socketPath}`,
|
||||
`--pid-file=${root}/db.pid`, '--skip-networking', `--log-error=${root}/server.log`], { stdio: 'ignore' });
|
||||
for (let attempt = 0; attempt < 100; attempt++) {
|
||||
|
||||
@@ -18,7 +18,7 @@ beforeAll(async () => {
|
||||
const install = spawnSync('mariadb-install-db', [
|
||||
'--no-defaults', `--datadir=${directory}`, '--auth-root-authentication-method=normal',
|
||||
'--skip-test-db'
|
||||
], { encoding: 'utf8' });
|
||||
], { encoding: 'utf8', cwd: directory });
|
||||
if (install.status !== 0) throw new Error('Isolated fixture initialization failed');
|
||||
const socketPath = path.join(directory, 'db.sock');
|
||||
server = spawn('mariadbd', ['--no-defaults', `--datadir=${directory}`,
|
||||
|
||||
Reference in New Issue
Block a user