The CNTI Test Catalog can be run in production mode (using an executable) or in developer mode (using crystal lang directly). See the pseudo code documentation for examples of how the internals of WIP tests might work.
# Production mode
./cnf-testsuite <testname>
# Developer mode
crystal src/cnf-testsuite.cr <testname>
⭐ *Note: All usage commands in this document will use the production (binary executable) syntax unless otherwise stated.
- ✔️ indicates implemented into stable release
- 💡 indicates Proof of Concept
- 📝 indicates To Do
- ❌ indicates WARNINGS*
- ✔️ PASSED indicates it meets best practice, positive points given.
- ⏭ SKIPPED indicates the test was skipped (output should provide a reason), no points given.
- ❌ FAILED indicates the test failed, negative points given.
- LOG_LEVEL environment variable: sets minimal log level to display: error (default); info; debug.
- LOG_PATH environment variable: if set - all logs would be appended to the file defined by that variable.
This is the command to build the binary executable if in developer mode or using the source install method (requires crystal):
crystal build src/cnf-testsuite.cr
./cnf-testsuite validate_config cnf-config=[PATH_TO]/cnf-testsuite.yml
./cnf-testsuite cnf_setup cnf-config=./cnf-testsuite.yml
./cnf-testsuite cnf_setup cnf-config=./cnf-testsuite.yml skip_wait_for_install
./cnf-testsuite all cnf-config=<path_to_your_config_file>/cnf-testsuite.yml
./cnf-testsuite all poc cnf-config=<path_to_your_config_file>/cnf-testsuite.yml
crystal src/cnf-testsuite.cr workload
cnf-config=<path_to_your_config_file>/cnf-testsuite.yml
./cnf-testsuite cert
./cnf-testsuite cert essential
./cnf-testsuite cert exclude="increase_decrease_capacity single_process_type"
./cnf-testsuite workload
./cnf-testsuite platform
./cnf-testsuite help
./cnf-testsuite cleanup
# cmd line
./cnf-testsuite -l debug test
crystal src/cnf-testsuite.cr -- -l debug test
LOGLEVEL=DEBUG ./cnf-testsuite test
⭐ Note: When setting log level, the following is the order of precedence:
- CLI or Command line flag
- Environment variable
- CNF-Testsuite Config file
Also setting the verbose option for many tasks will add extra output to help with debugging
./cnf-testsuite test_name verbose
Timeouts are controlled by these environment variables, set them if default values aren't suitable:
CNF_TESTSUITE_GENERIC_OPERATION_TIMEOUT=60
CNF_TESTSUITE_RESOURCE_CREATION_TIMEOUT=120
CNF_TESTSUITE_NODE_READINESS_TIMEOUT=240
CNF_TESTSUITE_POD_READINESS_TIMEOUT=180
CNF_TESTSUITE_LITMUS_CHAOS_TEST_TIMEOUT=1800
CNF_TESTSUITE_NODE_DRAIN_TOTAL_CHAOS_DURATION=90
Ameba (https://github.com/crystal-ameba/ameba) is a static code linter for crystal-lang. To run Ameba, testsuite needs to be installed in developer mode (Source Install) and Ameba needs to be installed using source method, which is mentioned in Ameba readme.md:
git clone https://github.com/crystal-ameba/ameba && cd ameba
make install
After that, follow the usage guidelines from the Ameba repository.
It's located in TEST_DOCUMENTATION, Check for needed category or test there.