toil.test.lib.dockerTest

Attributes

logger

Classes

TestDocker

Tests dockerCall and ensures no containers are left around.

Module Contents

toil.test.lib.dockerTest.logger
class toil.test.lib.dockerTest.TestDocker

Tests dockerCall and ensures no containers are left around.

dockerTestLogLevel = 'INFO'
testDockerClean(tmp_path, caching=False, detached=True, rm=True, deferParam=None)

Run the test container that creates a file in the work dir, and sleeps for 5 minutes. Ensure that the calling job gets SIGKILLed after a minute, leaving behind the spooky/ghost/zombie container. Ensure that the container is killed on batch system shutdown (through the deferParam mechanism).

Parameters:
Return type:

None

testDockerClean_CRx_FORGO(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CRx_STOP(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CRx_RM(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CRx_None(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CxD_FORGO(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CxD_STOP(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CxD_RM(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_CxD_None(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_Cxx_FORGO(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_Cxx_STOP(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_Cxx_RM(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_Cxx_None(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xRx_FORGO(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xRx_STOP(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xRx_RM(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xRx_None(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxD_FORGO(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxD_STOP(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxD_RM(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxD_None(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxx_FORGO(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxx_STOP(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxx_RM(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerClean_xxx_None(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerPipeChain(tmp_path, caching=False)

Test for piping API for dockerCall(). Using this API (activated when list of argument lists is given as parameters), commands a piped together into a chain. ex: parameters=[ ['printf', 'x\n y\n'], ['wc', '-l'] ] should execute: printf 'x\n y\n' | wc -l

Parameters:
Return type:

None

testDockerPipeChainErrorDetection(tmp_path, caching=False)

By default, executing cmd1 | cmd2 | … | cmdN, will only return an error if cmdN fails. This can lead to all manor of errors being silently missed. This tests to make sure that the piping API for dockerCall() throws an exception if non-last commands in the chain fail.

Parameters:
Return type:

None

testNonCachingDockerChain(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testNonCachingDockerChainErrorDetection(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerLogs(tmp_path, stream=False, demux=False)

Test for the different log outputs when deatch=False.

Parameters:
Return type:

None

testDockerLogs_Stream(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerLogs_Demux(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None

testDockerLogs_Demux_Stream(tmp_path)
Parameters:

tmp_path (pathlib.Path)

Return type:

None