Skip to content

Commit fdaa72c

Browse files
committed
clear global storage instead of deleting
1 parent 539f0e7 commit fdaa72c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/core/src/test/awsService/ec2/sshKeyPair.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ describe('SshKeyPair', async function () {
4545
const content1 = await fs.readFileBytes(keyPair2.getPrivateKeyPath())
4646
const content2 = await fs.readFileBytes(keyPair.getPrivateKeyPath())
4747
assert.notStrictEqual(content1, content2)
48+
await keyPair2.delete()
4849
})
4950

5051
it('sets permission of the file to read/write owner', async function () {

packages/core/src/test/globalSetup.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,13 @@ export const mochaHooks = {
101101
globals.telemetry.clearRecords()
102102
globals.telemetry.logger.clear()
103103
TelemetryDebounceInfo.instance.clear()
104-
await fs.delete(globals.context.globalStorageUri.fsPath, { recursive: true, force: true })
105104

106105
// mochaGlobalSetup() set this to a fake, so it's safe to clear it here.
107106
await globals.globalState.clear()
108107

109108
await testUtil.closeAllEditors()
109+
await fs.delete(globals.context.globalStorageUri.fsPath, { recursive: true, force: true })
110+
await fs.mkdir(globals.context.globalStorageUri.fsPath)
110111
},
111112
async afterEach(this: Mocha.Context) {
112113
if (openExternalStub.called && openExternalStub.returned(sinon.match.typeOf('undefined'))) {

0 commit comments

Comments
 (0)