Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/inmanta/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def get_file_internal(self, file_hash):
file_name = os.path.join(self._server_storage["files"], file_hash)

if not os.path.exists(file_name):
return 404
return 404, None

else:
with open(file_name, "rb") as fd:
Expand Down
9 changes: 9 additions & 0 deletions tests/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ def test_client_files(client):
assert result.result["content"] == body


@pytest.mark.gen_test
def test_client_files_lost(client):
(hash, content, body) = make_random_file()

# Get the file
result = yield client.get_file(id=hash)
assert result.code == 404


@pytest.mark.gen_test
def test_sync_client_files(client):
done = []
Expand Down