Open tkilias opened 1 year ago
test-container
SidecarContainer
TestRunner
, though this repeats the name "test" one more time 🙁 test-environment
(module lib, cli)
(Docker)Environment
exaslct-test-environment
(module testing)
DockerIsolationFixture
with docker_isolation_fixture() as iso:
with start_database(iso) as db:
...
api-test-environment
exaslct-test-environment
exaslct_docker_test_environment.py
spawned_environment
, spawned_database
, or database_config
integration-test-docker-environment
Rename CLI commands accordingly or make them shorter.
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.
exasol
itde
cli
, docker
, api
, logging
, environment
....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()
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.
I perfectly agree, especially
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:
class BuildTestContainerTest(unittest.TestCase):
self.test_environment
test/test_build_test_container.py
(3 times "test", 36 percent of all characters in the path)def test_build_test_container(self):
The word can refer to different artifacts and semantics, e.g.
TestContainer
(non-exasol project for using Docker containers) inherits from Python classTestCase
: These names cannot be changedtest_*_test_environment
in folderexasol_integration_test_docker_environment/test
*
can beapi
orcli
exaslct-test-environment
testing.exaslct_docker_test_environment.ExaslctDockerTestEnvironment
RUN_SLC_TESTS_WITHIN_CONTAINER
is setExaslctDockerTestEnvironment
being only a set of variables and values describing the environmentThe current ticket therefore requests to