Skip to content

Commit 1fa6529

Browse files
NicoHinderlingchromy
authored andcommitted
return created instead of OK
1 parent cf98eae commit 1fa6529

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def post(self, request: Request, project) -> Response:
188188

189189
return Response(
190190
{
191-
"state": ChunkFileState.OK,
191+
"state": ChunkFileState.CREATED,
192192
"missingChunks": [],
193193
"artifact_url": artifact_url,
194194
}

tests/sentry/preprod/api/endpoints/test_organization_preprod_artifact_assemble.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def test_assemble_basic(
374374
HTTP_AUTHORIZATION=f"Bearer {self.token.token}",
375375
)
376376
assert response.status_code == 200, response.content
377-
assert response.data["state"] == ChunkFileState.OK
377+
assert response.data["state"] == ChunkFileState.CREATED
378378
assert set(response.data["missingChunks"]) == set()
379379
assert response.data["artifactId"] == artifact_id
380380

@@ -440,7 +440,7 @@ def test_assemble_with_metadata(
440440
HTTP_AUTHORIZATION=f"Bearer {self.token.token}",
441441
)
442442
assert response.status_code == 200, response.content
443-
assert response.data["state"] == ChunkFileState.OK
443+
assert response.data["state"] == ChunkFileState.CREATED
444444
assert set(response.data["missingChunks"]) == set()
445445
assert response.data["artifactId"] == artifact_id
446446

@@ -500,7 +500,7 @@ def test_assemble_with_missing_chunks(self) -> None:
500500
)
501501

502502
assert response.status_code == 200, response.content
503-
assert response.data["state"] == ChunkFileState.OK
503+
assert response.data["state"] == ChunkFileState.CREATED
504504

505505
def test_assemble_response(self) -> None:
506506
content = b"test response content"
@@ -518,7 +518,7 @@ def test_assemble_response(self) -> None:
518518
)
519519

520520
assert response.status_code == 200, response.content
521-
assert response.data["state"] == ChunkFileState.OK
521+
assert response.data["state"] == ChunkFileState.CREATED
522522

523523
def test_assemble_with_pending_deletion_project(self) -> None:
524524
self.project.status = ObjectStatus.PENDING_DELETION
@@ -637,7 +637,7 @@ def test_check_existing_assembly_status(self) -> None:
637637

638638
# Even if assembly status exists, endpoint doesn't check it
639639
set_assemble_status(
640-
AssembleTask.PREPROD_ARTIFACT, self.project.id, checksum, ChunkFileState.OK
640+
AssembleTask.PREPROD_ARTIFACT, self.project.id, checksum, ChunkFileState.CREATED
641641
)
642642

643643
response = self.client.post(
@@ -671,7 +671,7 @@ def test_integration_task_sets_status_api_can_read_it(self) -> None:
671671

672672
# Even if task sets status, this endpoint doesn't read it
673673
set_assemble_status(
674-
AssembleTask.PREPROD_ARTIFACT, self.project.id, total_checksum, ChunkFileState.OK
674+
AssembleTask.PREPROD_ARTIFACT, self.project.id, total_checksum, ChunkFileState.CREATED
675675
)
676676

677677
response = self.client.post(

0 commit comments

Comments
 (0)