Skip to content

Commit

Permalink
Just write blob for storage upload (#583)
Browse files Browse the repository at this point in the history
Modify write to storage, to only write the blob message
  • Loading branch information
nickbristow authored May 17, 2023
1 parent 0ec1b2b commit 81fcbbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion containers/ingestion/app/routers/cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def write_blob_to_cloud_storage_endpoint(

full_file_name = input["file_name"]
cloud_provider_connection.upload_object(
message=input,
message=input["blob"],
container_name=input["bucket_name"],
filename=full_file_name,
)
Expand Down
4 changes: 3 additions & 1 deletion containers/ingestion/tests/test_cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def test_cloud_storage_params_success(patched_blob_write, patched_get_provider):
actual_response = client.post(client_url, json=test_request)

patched_get_provider.return_value.upload_object.assert_called_with(
message=test_request, container_name="test_bucket", filename="test_file_name"
message=test_request["blob"],
container_name="test_bucket",
filename="test_file_name",
)

expected_message = (
Expand Down

0 comments on commit 81fcbbb

Please sign in to comment.