From d38914a4d62b2ad9d011a530bf39b4acf76e5b1b Mon Sep 17 00:00:00 2001 From: Evgeny Kolesnikov Date: Tue, 15 Apr 2025 15:05:07 +0200 Subject: [PATCH] tests: OVAL/API/skip_paths Modify the test so it could catch the regression with environment variable modified during execution. See #2168. --- tests/API/OVAL/skip_paths/test_skip_paths.sh | 4 ++-- tests/API/OVAL/skip_paths/test_skip_paths.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/API/OVAL/skip_paths/test_skip_paths.sh b/tests/API/OVAL/skip_paths/test_skip_paths.sh index 4b69c9aa33..26dc5b395a 100755 --- a/tests/API/OVAL/skip_paths/test_skip_paths.sh +++ b/tests/API/OVAL/skip_paths/test_skip_paths.sh @@ -15,8 +15,8 @@ cp "$srcdir/test.xml" "$root/b/" mkdir -p "$root/c" touch "$root/c/z" cp "$srcdir/test.xml" "$root/c/" -# oscap probes will skip directories "b" and "c" -export OSCAP_PROBE_IGNORE_PATHS="$root/b:$root/c" +# oscap probes will skip directories "$root/n", "$root/b" and "$root/c" +export OSCAP_PROBE_IGNORE_PATHS="$root/n:$root/c:$root/b" $OSCAP oval eval --results $result "$srcdir/test_skip_paths.xml" assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1" and @result="true"]' assert_exists 1 '/oval_results/results/system/oval_system_characteristics/collected_objects/object[@id="oval:x:obj:1" and @flag="complete"]' diff --git a/tests/API/OVAL/skip_paths/test_skip_paths.xml b/tests/API/OVAL/skip_paths/test_skip_paths.xml index a03196153b..57048f3ef7 100644 --- a/tests/API/OVAL/skip_paths/test_skip_paths.xml +++ b/tests/API/OVAL/skip_paths/test_skip_paths.xml @@ -90,12 +90,12 @@ /tmp/oscap_test_skip_paths/a/x ^.*$ - 1 + 1 /tmp/oscap_test_skip_paths/b/y ^.*$ - 1 + 1 /tmp/oscap_test_skip_paths/a/x