Skip to content

Commit 80ee09b

Browse files
committed
tests: OVAL/API/skip_paths
Modify the test so it could catch the regression with environment variable modified during execution. See #2168.
1 parent 061e9ca commit 80ee09b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/API/OVAL/skip_paths/test_skip_paths.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mkdir -p "$root/c"
1616
touch "$root/c/z"
1717
cp "$srcdir/test.xml" "$root/c/"
1818
# oscap probes will skip directories "b" and "c"
19-
export OSCAP_PROBE_IGNORE_PATHS="$root/b:$root/c"
19+
export OSCAP_PROBE_IGNORE_PATHS="$root/n:$root/c:$root/b"
2020
$OSCAP oval eval --results $result "$srcdir/test_skip_paths.xml"
2121
assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1" and @result="true"]'
2222
assert_exists 1 '/oval_results/results/system/oval_system_characteristics/collected_objects/object[@id="oval:x:obj:1" and @flag="complete"]'

tests/API/OVAL/skip_paths/test_skip_paths.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@
9090
<textfilecontent54_object xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" version="1" id="oval:x:obj:3">
9191
<filepath>/tmp/oscap_test_skip_paths/a/x</filepath>
9292
<pattern>^.*$</pattern>
93-
<instance datatype="int" operation="greater than or equal">1</instance>
93+
<instance datatype="int">1</instance>
9494
</textfilecontent54_object>
9595
<textfilecontent54_object xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" version="1" id="oval:x:obj:4">
9696
<filepath>/tmp/oscap_test_skip_paths/b/y</filepath>
9797
<pattern>^.*$</pattern>
98-
<instance datatype="int" operation="greater than or equal">1</instance>
98+
<instance datatype="int">1</instance>
9999
</textfilecontent54_object>
100100
<filehash58_object xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" version="1" id="oval:x:obj:5">
101101
<filepath>/tmp/oscap_test_skip_paths/a/x</filepath>

0 commit comments

Comments
 (0)