Respect custom VS Code SSH config paths
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
This commit is contained in:
@@ -4,6 +4,8 @@ const assert = require('node:assert/strict');
|
||||
const {
|
||||
shellQuote,
|
||||
sshBlock,
|
||||
sshConfigPathWord,
|
||||
sshIncludeTarget,
|
||||
sshConfigWord,
|
||||
windowsCommandWord
|
||||
} = require('./extension');
|
||||
@@ -48,3 +50,36 @@ test('ssh block quotes proxy command for the target platform', () => {
|
||||
);
|
||||
assert.doesNotMatch(block, /'C:\\Program Files\\Dosh\\dosh\.exe'/);
|
||||
});
|
||||
|
||||
test('ssh include target stays relative for generated config beside main config', () => {
|
||||
assert.equal(
|
||||
sshIncludeTarget('/Users/palav/.ssh/config', '/Users/palav/.ssh/config.dosh', 'darwin'),
|
||||
'config.dosh'
|
||||
);
|
||||
});
|
||||
|
||||
test('ssh include target uses absolute path for custom generated config location', () => {
|
||||
assert.equal(
|
||||
sshIncludeTarget(
|
||||
'/Users/palav/.ssh/config',
|
||||
'/Users/palav/Library/Application Support/Dosh/config.dosh',
|
||||
'darwin'
|
||||
),
|
||||
'"/Users/palav/Library/Application Support/Dosh/config.dosh"'
|
||||
);
|
||||
});
|
||||
|
||||
test('ssh include target handles Windows custom generated config paths', () => {
|
||||
assert.equal(
|
||||
sshIncludeTarget(
|
||||
'C:\\Users\\palav\\.ssh\\config',
|
||||
'C:\\Users\\palav\\AppData\\Roaming\\Dosh Remote\\config.dosh',
|
||||
'win32'
|
||||
),
|
||||
'"C:/Users/palav/AppData/Roaming/Dosh Remote/config.dosh"'
|
||||
);
|
||||
assert.equal(
|
||||
sshConfigPathWord('C:\\Users\\palav\\.ssh\\config.dosh', 'win32'),
|
||||
'C:/Users/palav/.ssh/config.dosh'
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user