-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VS Code is now based on Node 20 Node 18 is in maintenance mode since September 2023 mock-fs is returning inconsistent result with Node 20 in our case, so removed it from test and ensure temporary folder is created/deleted Signed-off-by: Aurélien Pupier <[email protected]>
- Loading branch information
Showing
5 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import * as assert from 'assert'; | ||
import * as mock from 'mock-fs'; | ||
import * as fs from 'fs'; | ||
import { GitpodIdProvider } from '../../node/cloud/gitpodIdProvider' | ||
import env from '../../common/envVar'; | ||
import { FileSystemIdProvider } from '../../node/fileSystemIdManager'; | ||
|
@@ -8,14 +8,14 @@ const redhatDir = `${process.cwd()}/.redhat/`; | |
|
||
suite('Test gitpod Id manager', () => { | ||
setup(() => { | ||
mock({ | ||
'.redhat': { | ||
'anonymousId': 'some-uuid' | ||
} | ||
}); | ||
if (fs.existsSync(redhatDir)) { | ||
fs.rmSync(redhatDir, { recursive: true, force: true }); | ||
} | ||
}); | ||
teardown(() => { | ||
mock.restore(); | ||
if (fs.existsSync(redhatDir)) { | ||
fs.rmSync(redhatDir, { recursive: true, force: true }); | ||
} | ||
}); | ||
test('Should generate Red Hat UUID from GITPOD_GIT_USER_EMAIL env', async () => { | ||
env.GITPOD_GIT_USER_EMAIL = '[email protected]'; | ||
|