mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-25 18:43:50 +08:00
test(e2e): add rar smoke coverage and align archive deps
This commit is contained in:
@@ -28,6 +28,7 @@ test.beforeAll(async () => {
|
||||
'sample.tar',
|
||||
'sample.tgz',
|
||||
'sample.7z',
|
||||
'sample.rar',
|
||||
];
|
||||
|
||||
try {
|
||||
@@ -115,6 +116,11 @@ test('15 7z preview', async ({ request }) => {
|
||||
expect(resp.status()).toBe(200);
|
||||
});
|
||||
|
||||
test('16 rar preview', async ({ request }) => {
|
||||
const resp = await openPreview(request, `${fixtureBase}/sample.rar`);
|
||||
expect(resp.status()).toBe(200);
|
||||
});
|
||||
|
||||
test('17 security: block 10.x host in onlinePreview', async ({ request }) => {
|
||||
const resp = await openPreview(request, `http://10.1.2.3/a.pdf`);
|
||||
const body = await resp.text();
|
||||
|
||||
Reference in New Issue
Block a user