You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcpcfg/t
dzenichev 282e0c1dfd
TT#168102 instances-validator: add additional checks
3 years ago
..
fixtures TT#168102 instances-validator: add additional checks 3 years ago
Dockerfile TT#168102 ngcp-instances-validator: Fix link interface check 3 years ago
README.adoc TT#71952 Parallelize templated output generation 5 years ago
basic-ngcp-config.tar.gz TT#83358 status: add test 4 years ago
conftest.py TT#17600 pytest: import fixtures as plugins instead of importing them 8 years ago
default-git-repository.tar.gz MT#16391 Initial tests using pytest 8 years ago
empty-git-repository.tar.gz TT#139455 test: some dirs must be a git repository 3 years ago
pytest.ini TT#168102 ngcp-instances-validator: Fix link interface check 3 years ago
test_fixture_ngcpcfg.py TT#139455 test: some dirs must be a git repository 3 years ago
test_git.py TT#171400 Adjust git repos for new safe.directory behavior 3 years ago
test_ngcp_instances_validator.py TT#168102 instances-validator: add additional checks 3 years ago
test_ngcpcfg.py TT#177600 Move ngcpcfg specific configuration under /etc/ngcp-ngcpcfg 3 years ago
test_ngcpcfg_apply.py TT#139455 test: some dirs must be a git repository 3 years ago
test_ngcpcfg_apply_instances.py TT#177600 Rename ngcpcfg.instances to instances.yml 3 years ago
test_ngcpcfg_build_instances.py TT#177600 Rename ngcpcfg.instances to instances.yml 3 years ago
test_ngcpcfg_build_network_interfaces.py TT#139455 test: some dirs must be a git repository 3 years ago
test_ngcpcfg_build_syntax.py TT#139455 test: some dirs must be a git repository 3 years ago
test_ngcpcfg_cat.py TT#149202 cat: Add new action to concatenate configuration files 3 years ago
test_ngcpcfg_get.py TT#154105 Improve error output for 'ngcpcfg get' 3 years ago
test_ngcpcfg_instance_info.py TT#139459 Rework script get_all_ips_of_connection_for_instance after connections changes 3 years ago
test_ngcpcfg_lib_get_all_ips.py TT#139455 test: some dirs must be a git repository 3 years ago
test_ngcpcfg_lib_get_all_ips_of_connection_for_instance.py TT#177600 Rename ngcpcfg.instances to instances.yml 3 years ago
test_ngcpcfg_lib_status.py TT#139455 test: some dirs must be a git repository 3 years ago
test_ngcpcfg_patch.py TT#160855 patch: don't use static match for PRO/CARRIER 3 years ago
test_ngcpcfg_set_and_del.py TT#139455 tests: OUTPUT_DIRECTORY by default 3 years ago
test_ngcpcfg_status.py TT#139455 test: some dirs must be a git repository 3 years ago
testrunner TT#139455 test: define cache_dir inside results 3 years ago

README.adoc

README
======

Purpose of this directory
-------------------------

This directory provides system tests for ngcpcfg, using pytest (a mature full-featured Python testing tool).

Tips for working with tests
---------------------------

If you're working on a new feature, try to simulate a specific behavior, or need to run ngcpcfg for any other reason,
you might need to run ngcpcfg with a certain environment.
This can be achieved by injecting according environment variables to ngcpcfg.
The following command line provides an example invocation:

[source,bash]
cd t # we're assuming in the following command line that you're inside this testing folder
HELPER=../helper \
HOOKS=../hooks \
CONFIG_POOL=/etc/ \
NGCPCFG=./fixtures/ngcpcfg.cfg \
SCRIPTS=../scripts/ \
FUNCTIONS=../functions/ \
NGCP_BASE_TT2=/tmp/pytest-of-root/pytest-XX/test_YYY/ \
OUTPUT_DIRECTORY=/tmp/  \
TEMPLATE_POOL_BASE=/tmp/pytest-of-root/pytest-XX/test_YYY \
../sbin/ngcpcfg [...]

Test runs
----------

It's recommended to run the tests inside a docker container (see Dockerfile for usage instructions).
Running all available tests from inside the ``t`` directory then is as simple as:

[source,bash]
py.test-3 -v

To run only the tests matching 'test_patch_action' execute:

[source,bash]
py.test-3 -v  -k test_patch_action