Skip to content

Commit

Permalink
test: fix missing fs/promise issue (#3414)
Browse files Browse the repository at this point in the history
Description
---
- Ensure that `lts/erbium` is being used in dailies
- Update fs/promises imports 

Motivation and Context
---
Fix daily cron

How Has This Been Tested?
---
Cron script starts
  • Loading branch information
sdbondi authored Oct 5, 2021
1 parent eb4b560 commit 1231cc0
Show file tree
Hide file tree
Showing 6 changed files with 2,463 additions and 5,823 deletions.
1 change: 1 addition & 0 deletions applications/daily_tests/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/erbium
2 changes: 1 addition & 1 deletion applications/daily_tests/automatic_recovery_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require("fs/promises");
const fs = require("fs").promises;
const yargs = require("yargs");
const path = require("path");
const helpers = require("./helpers");
Expand Down
2 changes: 1 addition & 1 deletion applications/daily_tests/automatic_sync_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require("fs/promises");
const fs = require("fs").promises;
const yargs = require("yargs");
const path = require("path");
const helpers = require("./helpers");
Expand Down
2 changes: 1 addition & 1 deletion applications/daily_tests/cron_jobs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { CronJob } = require("cron");
const fs = require("fs/promises");
const { promises: fs } = require("fs");
const {
sendWebhookNotification,
getWebhookUrl,
Expand Down
2 changes: 1 addition & 1 deletion applications/daily_tests/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function readLastNLines(file, n) {
}

async function emptyFile(file) {
const fs = require("fs/promises");
const fs = require("fs").promises;
await fs.mkdir(path.dirname(file), { recursive: true });
try {
await fs.truncate(file, 0);
Expand Down
Loading

0 comments on commit 1231cc0

Please sign in to comment.