Commit ad598dc
test: Add integration test for DELETE /api/admin/crawlinginfo/all endpoint (#2942)
Add test coverage for the crawlinginfo bulk deletion endpoint that was
previously untested. The new test verifies that DELETE /api/admin/crawlinginfo/all
successfully deletes all old crawling sessions except currently running ones.
Changes:
- Add crawlingInfoDeleteAllTest() test method with @order(3) annotation
- Add testDeleteAllCrawlingInfo() implementation that:
* Reads crawling info logs before deletion (if any exist)
* Calls DELETE /api/admin/crawlinginfo/all endpoint
* Confirms all old sessions are deleted (result should be 0)
* Works correctly even if logs were already deleted by previous tests
- Add @TestMethodOrder annotation to ensure proper test execution order
- Import necessary JUnit OrderAnnotation classes
Test execution order:
1. jobLogTest() - Job log CRUD operations
2. crawlingInfoTest() - Individual crawling info operations
3. crawlingInfoDeleteAllTest() - Bulk deletion (NEW)
4. failureUrlTest() - Failure URL operations
5. searchListTest() - Search list operations
This test follows the existing pattern in CrawlerLogTests.java and uses
the same testing approach as other admin API integration tests.
Resolves #1016
Co-authored-by: Claude <[email protected]>1 parent e102b54 commit ad598dc
File tree
1 file changed
+43
-0
lines changed- src/test/java/org/codelibs/fess/it/admin
1 file changed
+43
-0
lines changedLines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| 123 | + | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| 131 | + | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
133 | 147 | | |
134 | 148 | | |
135 | 149 | | |
136 | 150 | | |
137 | 151 | | |
138 | 152 | | |
139 | 153 | | |
| 154 | + | |
140 | 155 | | |
141 | 156 | | |
142 | 157 | | |
| |||
268 | 283 | | |
269 | 284 | | |
270 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
271 | 314 | | |
0 commit comments