The ignitetest
framework provides basic functionality and services to write integration tests for Apache Ignite. This framework bases on the ducktape
test framework, for information about it check the links:
ducktape
.ducktape
.Structure of the tests
directory is:
./ignitetest/services
contains basic services functionality../ignitetest/utils
contains utils for testing../ignitetest/tests
contains tests../checks
contains unit tests of utils, tests' decorators etc.Docker is used to emulate distributed environment. Single container represents a running node.
To just start tests locally the only requirement is preinstalled docker
. For development process requirements are python
>= 3.7.
${IGNITE_HOME}
${IGNITE_HOME}/scripts/build-module.sh ducktests
${IGNITE_HOME}/modules/ducktests/tests
./docker/run_tests.sh
./docker/run_tests.sh --help
${IGNITE_HOME}/results
directory../docker/clean_up.sh
Ducktape allow runs on Custom cluster, Vagrant, K8s, Mesos, Docker, cloud providers, etc.
./docker/Dockerfile
for servers setup hints.${IGNITE_HOME}
${IGNITE_HOME}/scripts/build-module.sh ducktests
ducktape --results-root=./results --cluster-file=./cluster.json --repeat 1 --max-parallel 16 ./modules/ducktests/tests/ignitetest
Any version of Apache Ignite, or it's fork, can be tested. Binary releases supported as well as compiled sources.
/opt
directory, eg. /opt/ignite-2.11.0
./opt
directory, but should be compiled before the first use../scripts/build-module.sh ducktests
You may replace /opt
with custom directory by setting install_root
globals param.
For example, --globals-json, eg: {"install_root": "/dir42"}
You may set versions (products) using @ignite_versions
decorator at code
@ignite_versions(str(DEV_BRANCH), str(LATEST))
or passing versions set via globals during the execution
--globals-json, eg: {"ignite_versions":["2.8.1", "dev"]}
You may also specify product prefix by project
param at globals, for example:
--globals-json, eg: {"project": "fork" ,"ignite_versions": ["ignite-2.8.1", "2.8.1", "dev"]}
will execute tests on ignite-2.8.1, fork-2.8.1, fork-dev
TBD
TBD
TBD
python3 -m venv ~/.virtualenvs/ignite-ducktests-dev source ~/.virtualenvs/ignite-ducktests-dev/bin/activate
${IGNITE_HOME}/modules/ducktests/tests
. We refer to it as ${DUCKTESTS_DIR}
.ignitetests
as editable using following commands:pip install -r docker/requirements-dev.txt pip install -e .
pytest
in ${DUCKTESTS_DIR}
.flake8
in ${DUCKTESTS_DIR}
.All commits and PR‘s are checked against multiple python’s version, namely 3.6, 3.7 and 3.8. If you want to check your PR as it will be checked on Travis CI, you should do following steps:
pyenv
, see installation instruction here.3.7.9
and 3.8.5
)pyenv shell 3.7.9 3.8.5
tox
by invoking a command pip install tox
${DUCKTESTS_DIR}
and invoke tox