Skip to content

Commit

Permalink
bug-1910180: fix file upload upload info try_symbols value
Browse files Browse the repository at this point in the history
This carries the try_symbols value from the Upload instance to the file
upload upload info section in the frontend.
  • Loading branch information
willkg committed Aug 15, 2024
1 parent 203996d commit 590dc81
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions tecken/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ def upload_file(request, id):
"user": {"id": upload_obj.user.id, "email": upload_obj.user.email},
"size": upload_obj.size,
"bucket_name": upload_obj.bucket_name,
"try_symbols": upload_obj.try_symbols,
"skipped_keys": upload_obj.skipped_keys or [],
"ignored_keys": upload_obj.ignored_keys or [],
"download_url": upload_obj.download_url,
Expand Down
38 changes: 36 additions & 2 deletions tecken/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,42 @@ def test_file_upload_try_upload(client):
url = reverse("api:upload_file", args=(file_upload.id,))
response = client.get(url)
assert response.status_code == 200
data = response.json()["file"]
assert data["url"] == "/foo.pdb/deadbeaf123/foo.sym?try"
data = response.json()
assert data == {
"file": {
"bucket_name": "",
"code_file": None,
"code_id": None,
"completed_at": None,
"compressed": False,
"created_at": ANY,
"debug_filename": None,
"debug_id": None,
"generator": None,
"id": file_upload.id,
"key": "foo.pdb/deadbeaf123/foo.sym",
"size": 1234,
"update": False,
"upload": {
"bucket_name": "",
"completed_at": None,
"created_at": ANY,
"download_url": None,
"filename": "",
"id": upload.id,
"ignored_keys": [],
"redirect_urls": [],
"size": 123_456,
"skipped_keys": [],
"try_symbols": True,
"user": {
"email": "peterbe@example.com",
"id": user.id,
},
},
"url": "/foo.pdb/deadbeaf123/foo.sym?try",
}
}


class Test_syminfo:
Expand Down

0 comments on commit 590dc81

Please sign in to comment.