Skip to content

Commit dbf28c1

Browse files
committed
fix for fs feature config sync
1 parent 9c30e13 commit dbf28c1

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

tests/e2e/docker.web.docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ services:
77
dockerfile: static-server.Dockerfile
88
volumes:
99
- ./remote:/app/remote
10-
- ./test-data/features-configs:/app/test-data/features-configs
1110
ports:
1211
- 5551:5551
1312

tests/e2e/helpers/insights.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as fs from 'fs';
1+
import * as fs from 'fs-extra';
22
import * as path from 'path';
33
import { BasePage } from '../pageObjects';
44
import { deleteRowsFromTableInDB, updateColumnValueInDBTable } from './database-scripts';
@@ -13,10 +13,12 @@ const basePage = new BasePage();
1313
export async function modifyFeaturesConfigJson(filePath: string): Promise<void> {
1414
const configFileName = 'features-config.json';
1515
const remoteConfigPath = process.env.REMOTE_FOLDER_PATH || './remote';
16+
const targetFilePath = path.join(remoteConfigPath, configFileName);
1617

1718
return new Promise((resolve, reject) => {
1819
try {
19-
fs.writeFileSync(path.join(remoteConfigPath, configFileName), fs.readFileSync(filePath));
20+
fs.ensureFileSync(targetFilePath);
21+
fs.writeFileSync(targetFilePath, fs.readFileSync(filePath));
2022
resolve();
2123
}
2224
catch (err) {

tests/e2e/static.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
const express = require('express');
2-
const fs = require('fs-extra');
3-
4-
fs.mkdirSync('./remote', { recursive: true });
5-
fs.copyFileSync('./test-data/features-configs/insights-default-remote.json', './remote/features-config.json');
62

73
const app = express();
84
app.use('/remote', express.static('./remote'));

0 commit comments

Comments
 (0)