Skip to content

Commit

Permalink
Added integration tests for API log endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mluypaert committed Oct 18, 2024
1 parent 97a9c4b commit 5e76187
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/tests/b_integration/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def test_success_pipeline_workflow() -> None:
with open('../tests/resources/integration-test-results.aln', mode='r') as expected_result_file:
assert response.text == expected_result_file.read()

# Collect pipeline logs and ensure non-empty result
response = client.get(f'/api/pipeline-job/{job_uuid}/logs')

assert response.status_code == 200, f'Log retrieval for {job_uuid} did not return success.'
assert response.text != ""


def test_invalid_pipeline_submission() -> None:

Expand Down Expand Up @@ -86,3 +92,9 @@ def test_fail_pipeline_workflow() -> None:
response = client.get(f'/api/pipeline-job/{job_uuid}/alignment-result')

assert response.status_code == 404, f'Result retrieval for {job_uuid} did not return not-found.'

# Collect pipeline logs and ensure non-empty result
response = client.get(f'/api/pipeline-job/{job_uuid}/logs')

assert response.status_code == 200, f'Log retrieval for {job_uuid} did not return success.'
assert response.text != ""

0 comments on commit 5e76187

Please sign in to comment.