Skip to content

Commit 69f09ab

Browse files
committed
fix tests to be windows/mac specific
1 parent 6b1bf0f commit 69f09ab

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/core/src/test/shared/utilities/pathFind.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ describe('pathFind', function () {
9797
// On non-windows, we can overwrite path and create our own executable to find.
9898
const workspace = await testutil.createTestWorkspaceFolder()
9999
// We move the ssh to a temp directory temporarily to test if cache works.
100-
const tempLocation = path.join(workspace.uri.fsPath, 'temp-ssh')
101100
const fakeSshPath = path.join(workspace.uri.fsPath, `ssh`)
102101

103102
testutil.setEnv(testutil.envWithNewPath(workspace.uri.fsPath))
@@ -106,13 +105,11 @@ describe('pathFind', function () {
106105

107106
const ssh1 = (await findSshPath(true))!
108107

109-
await fs.rename(ssh1, tempLocation)
108+
await fs.delete(fakeSshPath)
110109

111110
const ssh2 = await findSshPath(true)
112111

113112
assert.strictEqual(ssh1, ssh2)
114-
115-
await fs.rename(tempLocation, ssh1)
116113
})
117114

118115
it('finds valid executable path (Windows CI)', async function () {
@@ -126,7 +123,7 @@ describe('pathFind', function () {
126123
await testutil.createExecutableFile(expectedPathInCI, '')
127124
}
128125
const ssh = (await findSshPath(true))!
129-
const result = await tryRun(ssh, [])
126+
const result = await tryRun(ssh, ['-G', 'x'], 'noresult')
130127
assert.ok(result)
131128
})
132129
})

0 commit comments

Comments
 (0)