diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cb9cabb0c7f..89a79f24901 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -50,6 +50,12 @@ add_test( ) set_tests_properties("stable-profile-ids" PROPERTIES LABELS quick) +add_test( + NAME "shorthand-to-oval" + COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/utils/shorthand_to_oval.py" "${CMAKE_CURRENT_SOURCE_DIR}/data/utils/shorthand_oval.xml" "${CMAKE_CURRENT_BINARY_DIR}/oval.xml" +) +set_tests_properties("shorthand-to-oval" PROPERTIES LABELS quick) + add_test( NAME "stable-profiles" COMMAND env "PYTHONPATH=$ENV{PYTHONPATH}" "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/test_profile_stability.py" "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/data/profile_stability" diff --git a/tests/data/utils/shorthand_oval.xml b/tests/data/utils/shorthand_oval.xml new file mode 100644 index 00000000000..e30fd5898fe --- /dev/null +++ b/tests/data/utils/shorthand_oval.xml @@ -0,0 +1,22 @@ + + + + Prevent Login to Accounts With Empty Password + + multi_platform_all + + The file /etc/pam.d/system-auth should not contain the nullok option + + + + + + + + + + ^/etc/pam.d/(system|password)-auth$ + ^[^#]*\bnullok\b.*$ + 1 + +