Skip to content

Commit

Permalink
test: fix dir removal
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Aug 17, 2023
1 parent c309c99 commit 8ab0476
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/helpers/suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function runForFolders(folders: Folder[], fn: (folder: Folder) => P
}

async function clearStorageDir() {
return rm(getStorageDir(), { recursive: true, force: true });
return rm(getStorageDir(), { recursive: true, force: true, maxRetries: 3 });
}

function getStorageDir() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite-integration/validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ suite(`Integration - Validation: ${process.env.ROOT_PATH}`, function () {
await runForFolders(folders, async (folder) => {
const existingResource = resolve(folder.uri.fsPath, 'pod-errors.yaml');

await rm(existingResource);
await rm(existingResource, { force: true });

const result = await waitForValidationResults(folder);
assertValidationResults(result);
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite-policies/policies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ suite(`Policies - Remote: ${process.env.ROOT_PATH}`, function () {
ok(configRemote.isValid);
ok(configRemote.path);

await rm(configRemote.path);
await rm(configRemote.path, { force: true });

ok(existsSync(configRemote.path) === false);

Expand Down

0 comments on commit 8ab0476

Please sign in to comment.