* test: migrate cpu_hog functional test to tests_v2 (closes #1390) Migrate the legacy CI/tests/test_cpu_hog.sh to the v2 pytest framework under CI/tests_v2/scenarios/cpu_hog/, preserving parity with the legacy flow and adding stronger functional and negative coverage. - Add scenario_base.yaml (flat hog_scenarios config, patched per test) - Add test_cpu_hog.py with TestCpuHog(BaseScenarioTest): - success: hog pod created on node-selector target, run exits 0, pod cleaned up - negative: node-selector matching zero nodes fails gracefully - negative: missing mandatory hog-type fails at config parsing - Register cpu_hog marker in pytest.ini - Document cpu_hog coverage in README.md * test: kill background Kraken proc on any cpu_hog success-test failure Broaden the success-path teardown so a poll/assert failure before proc.communicate() also kills the background Kraken process, preventing a lingering cpu-hog- pod from stressing the node and racing --reruns. Addresses Deep Code Review feedback on PR #1391. --------- Signed-off-by: augmentcode[bot] <185243770+augmentcode[bot]@users.noreply.github.com> Co-authored-by: augmentcode[bot] <185243770+augmentcode[bot]@users.noreply.github.com>
CI Tests
First steps
Edit functional_tests with tests you want to run
How to run
./CI/run.sh
This will run kraken using python, make sure python3 is set up and configured properly with all requirements
Adding a test case
-
Add in simple scenario yaml file to execute under ../CI/scenarios/
-
Copy test_application_outages.sh for example on how to get started
-
Lines to change for bash script
a. 11: Set scenario type to be your new scenario name
b. 12: Add pointer to scenario file for the test
c. 13: If a post action file is needed; add in pointer
d. 14: Set filled in config yaml file name specific to your scenario
e. 15: Make sure name of config in line 14 matches what you pass on this line
-
Add test name to functional_tests file
a. This will be the name of the file without ".sh"
-
If any changes to the main config (other than the scenario list), please be sure to add them into the common_config