Commit 0498937
committed
fix(ApiDataFactory): Ensure uppercase DELETE method and add better logging
Changes:
1. Convert HTTP method to uppercase (DELETE not 'delete') for strict servers
2. Add detailed logging for delete operations (request + response)
3. Add error handling and logging for failed deletions
4. Check index exists before splicing from created array
5. Make afterEach async and add 200ms delay for Docker file sync
The lowercase 'delete' method came from using the config object key directly.
Some servers/proxies may reject lowercase HTTP methods.
Added comprehensive logging to help diagnose deletion issues in CI:
- Logs DELETE request details before sending
- Logs successful deletion with status code
- Logs and re-throws deletion errors
The additional 200ms delay in afterEach (on top of the 100ms in _after)
gives Docker environments extra time for file system synchronization.1 parent fa36608 commit 0498937
File tree
2 files changed
+17
-5
lines changed- lib/helper
- test/rest
2 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
416 | 418 | | |
417 | | - | |
418 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
419 | 427 | | |
420 | 428 | | |
421 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
0 commit comments