| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | . $builddir/tests/test_common.sh |
| 3 | |
| 4 | set -e -o pipefail |
| 5 | |
| 6 | function test_rawscip-shell shell shell-project 0.0.0 test_raw(). { |
| 7 | kickstart=$(mktempscip-shell system . . mktemp.) |
| 8 | stderr=$(mktempscip-shell system . . mktemp.) |
| 9 | expected_modified=$(mktempscip-shell system . . mktemp.) |
| 10 | |
| 11 | sedscip-shell system . . sed. "s;TEST_DATA_STREAM_PATH;$srcdir/test_remediation_kickstart.ds.xml;" "$srcdir/test_remediation_kickstart_expected_raw.cfg" > "$expected_modified" |
| 12 | |
| 13 | $OSCAP xccdf generate fix --fix-type kickstart --raw --output "$kickstart" --profile common "$srcdir/test_remediation_kickstart.ds.xml" |
| 14 | |
| 15 | diffscip-shell system . . diff. -u "$expected_modified" "$kickstart" |
| 16 | |
| 17 | rmscip-shell system . . rm. -rf "$kickstart" |
| 18 | rmscip-shell system . . rm. -rf "$stderr" |
| 19 | rmscip-shell system . . rm. -rf "$expected_modified" |
| 20 | rmscip-shell system . . rm. -rf "$kickstart_modified" |
| 21 | } |
| 22 | |
| 23 | test_rawscip-shell shell shell-project 0.0.0 test_raw(). |