exasol / integration-test-docker-environment

A docker-based environment for integration tests with the EXASOL DB.
https://exasol.github.io/integration-test-docker-environment/
MIT License
6 stars 2 forks source link

Make AbstractSpawnTestEnvironment return DbOsExecFactory #365

Open ckunki opened 11 months ago

ckunki commented 11 months ago

As DbOsExecFactory is essential for executing commands inside the OS hosting the Exasol database in a generic way, the current ticket requests to enhance AbstractSpawnTestEnvironment to return an appropriate instance of this factory.

Currently AbstractSpawnTestEnvironment._spawn_database_and_test_container() returns a tuple (DatabaseInfo, ContainerInfo), which is forwarded across multiple private methods and finally returned by run_task():

def run_task():
    test_environment_info = yield from self._attempt_database_start()
    self.return_object(test_environment_info)
def _attempt_database_start():
    yield from self._start_database(attempt)
def _start_database():
   yield from self._spawn_database_and_test_container(...)
def _spawn_database_and_test_container(...):
   return database_info, test_container_info

Acceptance criteria

  1. method _executor_factory() is moved from class SpawnTestEnvironmentWithDockerDB to class WaitForTestDockerDatabase
  2. the task based on class WaitForTestDockerDatabase returns the factory
  3. class SpawnTestEnvironmentWithDockerDB returns the factory together with DatabaseInfo and ContainerInfo