toil.test.server.serverTest
¶
Module Contents¶
Classes¶
Tests for the utility functions used by the Toil server. |
|
Test file-based state storage. |
|
Test file-based state storage using URLs instead of local paths. |
|
Base class for tests that need a bucket. |
|
Test AWS-based state storage. |
|
Class for server tests that provides a self.app in testing mode. |
|
Tests for Toil's Workflow Execution Service API that don't run workflows. |
|
Tests of the WES server running workflows. |
|
End-to-end workflow-running tests against Celery. |
|
Test the server with Celery and state stored in S3. |
Attributes¶
- toil.test.server.serverTest.logger¶
- class toil.test.server.serverTest.ToilServerUtilsTest(methodName='runTest')¶
Bases:
toil.test.ToilTest
Tests for the utility functions used by the Toil server.
- test_workflow_canceling_recovery()¶
Make sure that a workflow in CANCELING state will be recovered to a terminal state eventually even if the workflow runner Celery task goes away without flipping the state.
Bases:
toil.test.ToilTest
Basic tests for state stores.
Make a state store to test, on a single fixed URL.
- Return type
Make sure that the state store under test can store and load keys.
- Return type
None
- class toil.test.server.serverTest.FileStateStoreTest(methodName='runTest')¶
Bases:
hidden
Test file-based state storage.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- Return type
None
- get_state_store()¶
Make a state store to test, on a single fixed local path.
- Return type
- class toil.test.server.serverTest.FileStateStoreURLTest(methodName='runTest')¶
Bases:
hidden
Test file-based state storage using URLs instead of local paths.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- Return type
None
- get_state_store()¶
Make a state store to test, on a single fixed URL.
- Return type
- class toil.test.server.serverTest.BucketUsingTest(methodName='runTest')¶
Bases:
toil.test.ToilTest
Base class for tests that need a bucket.
- s3_resource: Optional[mypy_boto3_s3.S3ServiceResource]¶
- bucket: Optional[mypy_boto3_s3.service_resource.Bucket]¶
- classmethod setUpClass()¶
Set up the class with a single pre-existing AWS bucket for all tests.
- Return type
None
- classmethod tearDownClass()¶
Hook method for deconstructing the class fixture after running all tests in the class.
- Return type
None
- class toil.test.server.serverTest.AWSStateStoreTest(methodName='runTest')¶
Bases:
hidden
,BucketUsingTest
Test AWS-based state storage.
- bucket_path = 'prefix/of/keys'¶
- get_state_store()¶
Make a state store to test, on a single fixed URL.
- Return type
- test_state_store_paths()¶
Make sure that the S3 state store puts things in the right places.
We don’t really care about the exact internal structure, but we do care about actually being under the path we are supposed to use.
- Return type
None
- class toil.test.server.serverTest.AbstractToilWESServerTest(*args, **kwargs)¶
Bases:
toil.test.ToilTest
Class for server tests that provides a self.app in testing mode.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- Return type
None
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- Return type
None
- class toil.test.server.serverTest.ToilWESServerBenchTest(*args, **kwargs)¶
Bases:
AbstractToilWESServerTest
Tests for Toil’s Workflow Execution Service API that don’t run workflows.
- test_home()¶
Test the homepage endpoint.
- Return type
None
- test_health()¶
Test the health check endpoint.
- Return type
None
- test_get_service_info()¶
Test the GET /service-info endpoint.
- Return type
None
- class toil.test.server.serverTest.ToilWESServerWorkflowTest(*args, **kwargs)¶
Bases:
AbstractToilWESServerTest
Tests of the WES server running workflows.
- run_zip_workflow(zip_path, include_message=True, include_params=True)¶
We have several zip file tests; this submits a zip file and makes sure it ran OK.
If include_message is set to False, don’t send a “message” argument in workflow_params. If include_params is also set to False, don’t send workflow_params at all.
- test_run_workflow_relative_url_no_attachments_fails()¶
Test run example CWL workflow from relative workflow URL but with no attachments.
- Return type
None
- test_run_workflow_relative_url()¶
Test run example CWL workflow from relative workflow URL.
- Return type
None
- test_run_workflow_https_url()¶
Test run example CWL workflow from the Internet.
- Return type
None
- test_run_workflow_single_file_zip()¶
Test run example CWL workflow from single-file ZIP.
- Return type
None
- test_run_workflow_multi_file_zip()¶
Test run example CWL workflow from multi-file ZIP.
- Return type
None
- test_run_workflow_manifest_zip()¶
Test run example CWL workflow from ZIP with manifest.
- Return type
None
- test_run_workflow_inputs_zip()¶
Test run example CWL workflow from ZIP without manifest but with inputs.
- Return type
None
- test_run_workflow_manifest_and_inputs_zip()¶
Test run example CWL workflow from ZIP with manifest and inputs.
- Return type
None
- test_run_workflow_no_params_zip()¶
Test run example CWL workflow from ZIP without workflow_params.
- Return type
None
- test_run_and_cancel_workflows()¶
Run two workflows, cancel one of them, and make sure they all exist.
- Return type
None
- class toil.test.server.serverTest.ToilWESServerCeleryWorkflowTest(*args, **kwargs)¶
Bases:
ToilWESServerWorkflowTest
End-to-end workflow-running tests against Celery.
- class toil.test.server.serverTest.ToilWESServerCeleryS3StateWorkflowTest(*args, **kwargs)¶
Bases:
ToilWESServerWorkflowTest
,BucketUsingTest
Test the server with Celery and state stored in S3.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- Return type
None