Debian Codegraph @

tests/probes/rpm/rpmverify/test_probes_rpmverify_not_equals_operation_offline.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 . $builddir/tests/test_common.sh
4 . $srcdir/../rpm_common.sh
5
6 set -e -o pipefail
7
8
9 function perform_test {
10 probecheck "rpmverify" || return 255
11
12 DF="$srcdir/test_probes_rpmverify_not_equals_operation_offline.xml"
13 RF="results.xml"
14
15 rm -f $RF
16
17 $OSCAP oval eval --results $RF $DF
18
19 result=$RF
20
21 $OSCAP oval validate --results $result
22
23 assert_exists 1 'oval_results/results/system/tests/test[@test_id="oval:x:tst:1"][@result="true"]'
24 sc='oval_results/results/system/oval_system_characteristics/'
25 sd=$sc'system_data/'
26 assert_exists 2 $sc'collected_objects/object'
27 assert_exists 2 $sc'collected_objects/object[@flag="complete"]'
28 assert_exists 1 $sc'collected_objects/object[@id="oval:x:obj:1"]'
29 assert_exists 1 $sc'collected_objects/object[@id="oval:x:obj:2"]'
30
31 rm -f $RF
32 }
33
34
35 rpm_prepare_offline
36
37 test_run "rpmverify probe test not equals operation (offline)" perform_test
38
39 rpm_cleanup_offline