Skip to content

Commit 13c50e7

Browse files
committed
fix(test): update ImportExportTest to expect 400 for multipart uploads with missing file
1 parent a70c38f commit 13c50e7

File tree

1 file changed

+5
-5
lines changed
  • rest/resource-server/src/test/java/org/eclipse/sw360/rest/resourceserver/integration

1 file changed

+5
-5
lines changed

rest/resource-server/src/test/java/org/eclipse/sw360/rest/resourceserver/integration/ImportExportTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public void should_fail_upload_component_without_file() throws IOException {
456456
requestEntity,
457457
String.class);
458458

459-
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
459+
assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode());
460460
}
461461

462462
@Test
@@ -475,7 +475,7 @@ public void should_fail_upload_release_without_file() throws IOException {
475475
requestEntity,
476476
String.class);
477477

478-
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
478+
assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode());
479479
}
480480

481481
@Test
@@ -494,7 +494,7 @@ public void should_fail_upload_attachment_without_file() throws IOException {
494494
requestEntity,
495495
String.class);
496496

497-
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
497+
assertEquals(HttpStatus.BAD_REQUEST, response.getStatusCode());
498498
}
499499

500500
@Test
@@ -651,8 +651,8 @@ public void should_verify_error_response_structure() throws IOException {
651651
String.class);
652652

653653
// Verify error response
654-
assertEquals("HTTP status should be INTERNAL_SERVER_ERROR",
655-
HttpStatus.INTERNAL_SERVER_ERROR, response.getStatusCode());
654+
assertEquals("HTTP status should be BAD_REQUEST",
655+
HttpStatus.BAD_REQUEST, response.getStatusCode());
656656

657657
// Verify error response body
658658
String responseBody = response.getBody();

0 commit comments

Comments
 (0)