pat2vec.util.docker_elastic

Classes

ElasticContainer([image,Β port])

Manages a transient Elasticsearch Docker container for testing.

class pat2vec.util.docker_elastic.ElasticContainer(image=None, port=19200)[source]

Bases: object

Manages a transient Elasticsearch Docker container for testing.

Parameters:
  • image (str | None)

  • port (int)

static cleanup_orphans()[source]

Finds and removes any orphaned pat2vec test containers.

start(timeout=180)[source]

Starts an Elasticsearch container. Returns True if successful.

Return type:

bool

Parameters:

timeout (int)

stop()[source]

Stops and removes the container.

Return type:

None

get_credentials()[source]

Returns (host_url, username, password).

Return type:

Tuple[str, str, str]