mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[node] Fix 11-symlinks integration test fixture (#7823)
The `symlink` symlink wasn't being persisted through Turbo's cache, so this test was failing. So move the symlink directly into the git repo since there's no need to create it at build-time (git can store symlinks just fine). Additionally, the test itself was not testing that the symlink was indeed re-created as a symlink from within the lambda environment (it actually wasn't, due to the upload code not considering symlinks), so the test has been updated to test for that as well.
This commit is contained in:
@@ -257,9 +257,16 @@ async function testDeployment(
|
||||
dot: true,
|
||||
});
|
||||
const bodies = globResult.reduce((b, f) => {
|
||||
let data;
|
||||
const r = path.relative(fixturePath, f);
|
||||
b[r] = fs.readFileSync(f);
|
||||
b[r][fileModeSymbol] = fs.statSync(f).mode;
|
||||
const stat = fs.lstatSync(f);
|
||||
if (stat.isSymbolicLink()) {
|
||||
data = Buffer.from(fs.readlinkSync(f), 'utf8');
|
||||
} else {
|
||||
data = fs.readFileSync(f);
|
||||
}
|
||||
data[fileModeSymbol] = stat.mode;
|
||||
b[r] = data;
|
||||
return b;
|
||||
}, {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user