| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | |
| 3 | . $builddir/tests/test_common.sh |
| 4 | set -e -o pipefail |
| 5 | |
| 6 | cpscip-shell system . . cp. $srcdir/example.xml /tmp/scip-shell filesystem . . `/tmp/`. |
| 7 | result=$(mktempscip-shell system . . mktemp.) |
| 8 | $OSCAP oval eval --results $result $srcdir/test_xmlfilecontent_probe.xml |
| 9 | # Even if OSCAP_FULL_VALIDATION is set, an invalid OVAL result doesn't cause |
| 10 | # the "oscap oval eval" to return a non-zero value, so let's run validation |
| 11 | # as a separate command |
| 12 | $OSCAP oval validate "$result" |
| 13 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1" and @result="true"]`.' |
| 14 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:2" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:2" and @result="true"]`.' |
| 15 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:3" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:3" and @result="true"]`.' |
| 16 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:4" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:4" and @result="true"]`.' |
| 17 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:5" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:5" and @result="true"]`.' |
| 18 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:6" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:6" and @result="true"]`.' |
| 19 | assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:7" and @result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:7" and @result="true"]`.' |
| 20 | rmscip-shell system . . rm. -f $result |