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

Find better and unique names for all occurrences of "test" #320

Open tkilias opened 1 year ago

tkilias commented 1 year ago

A review finding of PR #194 was the word "test" being used too often in many places of the ITDE, its documentation and code.

Here are some examples:

The word can refer to different artifacts and semantics, e.g.

The current ticket therefore requests to

tkilias commented 1 year ago
with docker_isolation_fixture() as iso:
  with start_database(iso)  as db:
     ...
tkilias commented 1 year ago

Rename CLI commands accordingly or make them shorter.

Nicoretti commented 1 year ago

test/test_build_test_container.py (3 times "test", 36 percent of all characters in the path) def test_build_test_container(self):

The naming convention for, test functions and the names of the modules containing tests, stems for pytest and unittest loader/executor conventions. Removing test_ from those would cause more harm than good. With renaming other things in the ITDE I highly agree. May main suggestion to fix the long tedious and repetitive names is to take the context more into account and make the context more explixit e.g. using module names (similar to the Bucketfs-Refactoring).

e.g.

Example status qou:

from exasol_integration_test_docker_environment.lib.api.api_errors import TaskRuntimeError

def usage():
    raise TaskRuntimeError()

Example future api:

from exasol.itde.docker.api.errors import TaskRuntimeError

def usage():
    raise TaskRuntimeError()

# if more context is expected needed by the reader make use of package/module imports
from exasol.itde.docker import api

def usage():
     raise api.errors.TaskRuntimeError()

Migration

For migration a exasol/itde package can be started in parallel (with the new structure). It just could rexport and rename things.

e.g.:

exasol/itde/__init__.py

from exasol_integration_test_docker_environment.lib import api as api
from exasol_integration_test_docker_environment.lib import test_environment as environment
...

New access then would then look like

from exasol.itde import api
from exasol.itde import environment

At some point in the future the old package can be made private so only the new package structure is visible.

ckunki commented 1 year ago

I perfectly agree, especially