1- import { API_KEY , getTestApp , setupE2E , teardownE2E } from '@tests/e2e/setup/e2e-setup.js' ;
1+ import { getTestApp , setupE2E , teardownE2E } from '@tests/e2e/setup/e2e-setup.js' ;
22import { cleanDatabase , ensureDefaultProfile } from '@tests/helpers/database.js' ;
33import { FIXTURES , readFixture } from '@tests/helpers/fixtures.js' ;
44import { ERRORS } from '@tests/mocks/python-worker-mock.js' ;
@@ -28,7 +28,6 @@ describe('E2E: Error Handling', () => {
2828 method : 'POST' ,
2929 url : '/api/documents' ,
3030 headers : {
31- 'X-API-Key' : API_KEY ,
3231 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
3332 } ,
3433 payload : createMultipartPayload ( 'protected.pdf' , pdfBuffer , 'application/pdf' ) ,
@@ -48,7 +47,6 @@ describe('E2E: Error Handling', () => {
4847 const statusResponse = await app . inject ( {
4948 method : 'GET' ,
5049 url : `/api/documents/${ documentId } ` ,
51- headers : { 'X-API-Key' : API_KEY } ,
5250 } ) ;
5351
5452 expect ( statusResponse . json ( ) . status ) . toBe ( 'FAILED' ) ;
@@ -66,7 +64,6 @@ describe('E2E: Error Handling', () => {
6664 method : 'POST' ,
6765 url : '/api/documents' ,
6866 headers : {
69- 'X-API-Key' : API_KEY ,
7067 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
7168 } ,
7269 payload : createMultipartPayload ( 'short.pdf' , pdfBuffer , 'application/pdf' ) ,
@@ -101,7 +98,6 @@ describe('E2E: Error Handling', () => {
10198 const statusResponse = await app . inject ( {
10299 method : 'GET' ,
103100 url : `/api/documents/${ documentId } ` ,
104- headers : { 'X-API-Key' : API_KEY } ,
105101 } ) ;
106102
107103 expect ( statusResponse . json ( ) . status ) . toBe ( 'FAILED' ) ;
@@ -116,7 +112,6 @@ describe('E2E: Error Handling', () => {
116112 method : 'POST' ,
117113 url : '/api/documents' ,
118114 headers : {
119- 'X-API-Key' : API_KEY ,
120115 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
121116 } ,
122117 payload : createMultipartPayload ( 'noisy.pdf' , pdfBuffer , 'application/pdf' ) ,
@@ -151,7 +146,6 @@ describe('E2E: Error Handling', () => {
151146 const statusResponse = await app . inject ( {
152147 method : 'GET' ,
153148 url : `/api/documents/${ documentId } ` ,
154- headers : { 'X-API-Key' : API_KEY } ,
155149 } ) ;
156150
157151 expect ( statusResponse . json ( ) . status ) . toBe ( 'FAILED' ) ;
@@ -169,7 +163,6 @@ describe('E2E: Error Handling', () => {
169163 method : 'POST' ,
170164 url : '/api/documents' ,
171165 headers : {
172- 'X-API-Key' : API_KEY ,
173166 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
174167 } ,
175168 payload : createMultipartPayload ( 'first.pdf' , pdfBuffer , 'application/pdf' ) ,
@@ -182,7 +175,6 @@ describe('E2E: Error Handling', () => {
182175 method : 'POST' ,
183176 url : '/api/documents' ,
184177 headers : {
185- 'X-API-Key' : API_KEY ,
186178 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
187179 } ,
188180 payload : createMultipartPayload ( 'second.pdf' , pdfBuffer , 'application/pdf' ) ,
@@ -202,7 +194,6 @@ describe('E2E: Error Handling', () => {
202194 method : 'POST' ,
203195 url : '/api/documents' ,
204196 headers : {
205- 'X-API-Key' : API_KEY ,
206197 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
207198 } ,
208199 payload : createMultipartPayload ( 'image.png' , Buffer . from ( 'fake' ) , 'image/png' ) ,
@@ -222,7 +213,6 @@ describe('E2E: Error Handling', () => {
222213 method : 'POST' ,
223214 url : '/api/documents' ,
224215 headers : {
225- 'X-API-Key' : API_KEY ,
226216 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
227217 } ,
228218 payload : createMultipartPayload ( 'large.pdf' , largeBuffer , 'application/pdf' ) ,
@@ -242,7 +232,6 @@ describe('E2E: Error Handling', () => {
242232 method : 'POST' ,
243233 url : '/api/documents' ,
244234 headers : {
245- 'X-API-Key' : API_KEY ,
246235 'Content-Type' : 'multipart/form-data; boundary=---e2e' ,
247236 } ,
248237 payload : createMultipartPayload ( 'corrupt.pdf' , corruptBuffer , 'application/pdf' ) ,
@@ -261,7 +250,6 @@ describe('E2E: Error Handling', () => {
261250 const statusResponse = await app . inject ( {
262251 method : 'GET' ,
263252 url : `/api/documents/${ documentId } ` ,
264- headers : { 'X-API-Key' : API_KEY } ,
265253 } ) ;
266254
267255 expect ( statusResponse . json ( ) . status ) . toBe ( 'FAILED' ) ;
0 commit comments