| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -e -o pipefail |
| 4 | |
| 5 | . $builddir/tests/test_common.sh |
| 6 | |
| 7 | export OSCAP_PROBE_MAX_COLLECTED_ITEMS=100 |
| 8 | seqscip-shell system . . seq. 110 > /tmp/longfilescip-shell filesystem . . `/tmp/longfile`. |
| 9 | result=$(mktempscip-shell system . . mktemp.) |
| 10 | $OSCAP oval eval --results "$result" $srcdir/collect_limit.oval.xml |
| 11 | assert_exists 1 '/oval_results/results/system/oval_system_characteristics/collected_objects/objectscip-shell filesystem . . `/oval_results/results/system/oval_system_characteristics/collected_objects/object`.' |
| 12 | assert_exists 1 '/oval_results/results/system/oval_system_characteristics/collected_objects/object[@flag="incomplete"]scip-shell filesystem . . `/oval_results/results/system/oval_system_characteristics/collected_objects/object[@flag="incomplete"]`.' |
| 13 | assert_exists 1 '/oval_results/results/system/oval_system_characteristics/collected_objects/object/message[@level="warning"]scip-shell filesystem . . `/oval_results/results/system/oval_system_characteristics/collected_objects/object/message[@level="warning"]`.' |
| 14 | text="Object is incomplete because the object matches more than 100 items." |
| 15 | assert_exists 1 "/oval_results/results/system/oval_system_characteristics/collected_objects/object/message[text()=\"$text\"]" |
| 16 | assert_exists 100 '/oval_results/results/system/oval_system_characteristics/system_data/ind-sys:textfilecontent_itemscip-shell filesystem . . `/oval_results/results/system/oval_system_characteristics/system_data/ind-sys:textfilecontent_item`.' |
| 17 | rmscip-shell system . . rm. -f /tmp/longfilescip-shell filesystem . . `/tmp/longfile`. |
| 18 | rmscip-shell system . . rm. -f "$result" |