backup: fix listDir to return path instead of fullPath
This commit is contained in:
@@ -123,7 +123,7 @@ describe('Storage', function () {
|
||||
}
|
||||
|
||||
const expectedFiles = execSync(`find . -type f -printf '%P\n'`, { cwd: sourceDir, encoding: 'utf8' }).trim().split('\n');
|
||||
expect(allFiles.map(function (f) { return f.fullPath; }).sort()).to.eql(expectedFiles.sort());
|
||||
expect(allFiles.map(function (f) { return f.path; }).sort()).to.eql(expectedFiles.sort());
|
||||
});
|
||||
|
||||
it('can copy', async function () {
|
||||
@@ -295,7 +295,7 @@ describe('Storage', function () {
|
||||
marker = result.marker;
|
||||
}
|
||||
|
||||
expect(allFiles.map(function (f) { return f.fullPath; })).to.contain('uploadtest/test.txt');
|
||||
expect(allFiles.map(function (f) { return f.path; })).to.contain('uploadtest/test.txt');
|
||||
});
|
||||
|
||||
it('can copy', async function () {
|
||||
@@ -344,7 +344,6 @@ describe('Storage', function () {
|
||||
function getFullWritablePath(key) {
|
||||
const fullPath = path.join(bucketPathNoPrefix, key);
|
||||
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
||||
console.log(fullPath);
|
||||
return fullPath;
|
||||
}
|
||||
|
||||
@@ -433,7 +432,7 @@ describe('Storage', function () {
|
||||
marker = result.marker;
|
||||
}
|
||||
|
||||
expect(allFiles.map(function (f) { return f.fullPath; })).to.contain('uploadtest/test.txt');
|
||||
expect(allFiles.map(function (f) { return f.path; })).to.contain('uploadtest/test.txt');
|
||||
});
|
||||
|
||||
it('can copy', async function () {
|
||||
|
||||
Reference in New Issue
Block a user