eslint: add no-shadow
This commit is contained in:
@@ -97,10 +97,10 @@ describe('Storage', function () {
|
||||
|
||||
it('can download file', async function () {
|
||||
const sourceFile = path.join(gBackupConfig.backupDir, gBackupConfig.prefix, '/uploadtest/test.txt');
|
||||
const [error, stream] = await safe(filesystem.download(gBackupConfig, 'uploadtest/test.txt'));
|
||||
const [error, downloadStream] = await safe(filesystem.download(gBackupConfig, 'uploadtest/test.txt'));
|
||||
expect(error).to.be(null);
|
||||
expect(stream).to.be.an('object');
|
||||
const data = await consumers.buffer(stream);
|
||||
expect(downloadStream).to.be.an('object');
|
||||
const data = await consumers.buffer(downloadStream);
|
||||
expect(fs.readFileSync(sourceFile)).to.eql(data); // buffer compare
|
||||
});
|
||||
|
||||
@@ -314,8 +314,8 @@ describe('Storage', function () {
|
||||
}
|
||||
file(key) { // already has prefix
|
||||
// console.log('gcs file object:', key);
|
||||
function getFullWritablePath(key) {
|
||||
const fullPath = path.join(bucketPathNoPrefix, key);
|
||||
function getFullWritablePath(keyPath) {
|
||||
const fullPath = path.join(bucketPathNoPrefix, keyPath);
|
||||
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
||||
return fullPath;
|
||||
}
|
||||
@@ -390,9 +390,9 @@ describe('Storage', function () {
|
||||
|
||||
it('can download file', async function () {
|
||||
const sourceKey = 'uploadtest/test.txt';
|
||||
const [error, stream] = await safe(gcs.download(backupConfig, sourceKey));
|
||||
const [error, downloadStream] = await safe(gcs.download(backupConfig, sourceKey));
|
||||
expect(error).to.be(null);
|
||||
expect(stream).to.be.an('object');
|
||||
expect(downloadStream).to.be.an('object');
|
||||
});
|
||||
|
||||
it('list dir lists contents of source dir', async function () {
|
||||
|
||||
Reference in New Issue
Block a user