fix install config

This commit is contained in:
Ildar Kamalov
2025-02-18 17:31:04 +03:00
parent 0a3346d911
commit 58faa7c537
5 changed files with 9 additions and 21 deletions

View File

@@ -1,16 +1,12 @@
import { existsSync, renameSync, unlinkSync } from 'fs';
import { CONFIG_FILE, TEMP_CONFIG_FILE } from './globalSetup';
import { existsSync, unlinkSync } from 'fs';
export const CONFIG_FILE = '/tmp/AdGuard.temp.e2e.yaml';
async function globalTeardown() {
// Remove the test config file
if (existsSync(CONFIG_FILE)) {
unlinkSync(CONFIG_FILE);
}
// Restore the original config file if it exists
if (existsSync(TEMP_CONFIG_FILE)) {
renameSync(TEMP_CONFIG_FILE, CONFIG_FILE);
}
}
export default globalTeardown;