From d46804e5dbdce2eaaad8a16ff9908814cd102b4b Mon Sep 17 00:00:00 2001 From: Evgeny Kolesnikov Date: Wed, 14 Aug 2024 09:48:17 +0200 Subject: [PATCH] Fix test for Kickstart remediation The bug was triggered with version bump. --- tests/API/XCCDF/unittests/test_remediation_kickstart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/API/XCCDF/unittests/test_remediation_kickstart.sh b/tests/API/XCCDF/unittests/test_remediation_kickstart.sh index 22bdc92118..a829f02f42 100755 --- a/tests/API/XCCDF/unittests/test_remediation_kickstart.sh +++ b/tests/API/XCCDF/unittests/test_remediation_kickstart.sh @@ -10,13 +10,13 @@ function test_normal { kickstart_modified=$(mktemp) sed "/This file was generated by OpenSCAP .* using:/d" "$srcdir/test_remediation_kickstart_expected.cfg" > "$expected_modified" - sed "/rootpw .*/d" "$srcdir/test_remediation_kickstart_expected.cfg" > "$expected_modified" + sed -i "/rootpw .*/d" "$expected_modified" sed -i "s;TEST_DATA_STREAM_PATH;$srcdir/test_remediation_kickstart.ds.xml;" "$expected_modified" $OSCAP xccdf generate fix --fix-type kickstart --output "$kickstart" --profile common "$srcdir/test_remediation_kickstart.ds.xml" sed "/This file was generated by OpenSCAP .* using:/d" "$kickstart" > "$kickstart_modified" - sed "/rootpw .*/d" "$kickstart" > "$kickstart_modified" + sed -i "/rootpw .*/d" "$kickstart_modified" diff -u "$expected_modified" "$kickstart_modified"