Eclipse BlueChi is a systemd service controller intended for multi-node environments with a predefined number of nodes and with a focus on highly regulated ecosystems such as those requiring functional safety.
The strstr command only checks if a substring exists within another string. The found string does not need to be a suffix. Therefore, a dedicated ends_with function is implemented and called for checking if the file name suffix is .conf. Unit tests for this new function have been added as well.
@dracher @ArtiomDivak
After merging this PR (and it being pushed to the copr snapshot repo), the Integration Tests on multihosts should pass for test_agent_invalid_port.
coverage: 84.602% (+0.01%) from 84.588%
when pulling f3517f64ef4f2c805ea703632086254aed661f46 on engelmi:fix-conf-suffix-check
into 3d19f9a4ab77f0a7e02b905eaf4f392e926189c2 on eclipse-bluechi:main.
Fixes: https://github.com/eclipse-bluechi/bluechi/issues/892
The strstr command only checks if a substring exists within another string. The found string does not need to be a suffix. Therefore, a dedicated ends_with function is implemented and called for checking if the file name suffix is .conf. Unit tests for this new function have been added as well.