fix(tapbundle_serverside): use native fs promises to create the test files directory and write the downloaded alpine tarball
This commit is contained in:
@@ -12,9 +12,9 @@ export class TestFileProvider {
|
||||
const response = await plugins.smartrequest.SmartRequest.create()
|
||||
.url(fileUrls.dockerAlpineImage)
|
||||
.get();
|
||||
await plugins.smartfsInstance.directory(paths.testFilesDir).recursive().create();
|
||||
const buffer = Buffer.from(await response.arrayBuffer());
|
||||
await plugins.smartfsInstance.file(filePath).write(buffer);
|
||||
await plugins.fs.promises.mkdir(paths.testFilesDir, { recursive: true });
|
||||
await plugins.fs.promises.writeFile(filePath, buffer);
|
||||
return filePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user