avocado_i2n.cartgraph.worker module

Utility for the main test suite substructures like test objects.

SUMMARY

Copyright: Intra2net AG

INTERFACE

class avocado_i2n.cartgraph.worker.TestEnvironment(id: str)[source]

Bases: object

Generic environment isolating a given test.

class avocado_i2n.cartgraph.worker.TestSwarm(id: str, workers: list[TestWorker] = None)[source]

Bases: TestEnvironment

A wrapper for a test swarm of workers traversing the graph.

run_swarms = {}
class avocado_i2n.cartgraph.worker.TestWorker(id_net: NetObject)[source]

Bases: TestEnvironment

A wrapper for a test worker traversing the graph.

property params: Params

Parameters (cache) property.

property restrs: dict[str, str]

Restrictions property.

overwrite_with_slot(slot: str) None[source]

Overwrite worker parameters with configuration extrapolated from a slot string.

Parameters:

slot – slot string in the format “gateway/host”

start() bool[source]

Start the environment for executing a test node.

Returns:

whether the environment is available after current or previous start

Raises:

ValueError when environment ID could not be parsed

stop() bool[source]

Stop the environment for executing a test node.

Returns:

whether the environment stopping succeded

Raises:

ValueError when environment ID could not be parsed