Skip to content

Commit

Permalink
change naming to reflect it downloads from output
Browse files Browse the repository at this point in the history
  • Loading branch information
hacktobeer committed Aug 7, 2024
1 parent 5f14c21 commit 7cbcd1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions turbinia/api/api_server_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,14 @@ def testGetJobs(self):
result = json.loads(result.content)
self.assertEqual(expected_result, result)

def testDownloadNotFound(self):
"""Test downloading non existent file path."""
def testDownloadOutputNotFound(self):
"""Test downloading non existent output file path."""
file_path = '/non-existing/path with space/does-not-exist.txt'
response = self.client.get(f'/api/download/output/{file_path}')
self.assertEqual(response.status_code, 404)

def testDownload(self):
"""Test downloading file path."""
def testDownloadOutput(self):
"""Test downloading output file path."""
turbinia_config.OUTPUT_DIR = str(
os.path.dirname(os.path.realpath(__file__)))
file_path = f'{turbinia_config.OUTPUT_DIR}/api_server_test.py'
Expand Down
2 changes: 1 addition & 1 deletion turbinia/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ paths:
get:
description: "Download by path.\n\nRaises:\nHTTPException: if another\
\ exception is caught."
operationId: download_file_path
operationId: download_output_path
parameters:
- in: path
name: file_path
Expand Down
4 changes: 2 additions & 2 deletions turbinia/api/routes/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@


@router.get('/output/{file_path:path}')
async def download_file_path(request: Request, file_path):
"""Downloads evidence file path.
async def download_output_path(request: Request, file_path):
"""Downloads output file path.
Args:
file_path (str): Path to file.
Expand Down

0 comments on commit 7cbcd1e

Please sign in to comment.