Handling quota limit error (#437)

This commit is contained in:
Montassar Ghanmy
2024-03-26 09:04:36 +01:00
committed by GitHub
parent 389d42fe4f
commit cb5a2ad3b7
14 changed files with 235 additions and 35 deletions
@@ -54,8 +54,9 @@ export const e2e_createVersion = async (
});
};
export const e2e_createDocumentFile = async (platform: TestPlatform) => {
const filePath = `${__dirname}/assets/test.txt`;
export const e2e_createDocumentFile = async (platform: TestPlatform, documentPath?: string) => {
const subFilePath = documentPath ?? "assets/test.txt";
const filePath = `${__dirname}/${subFilePath}`;
const token = await platform.auth.getJWTToken();
const form = formAutoContent({ file: fs.createReadStream(filePath) });
form.headers["authorization"] = `Bearer ${token}`;