Skip to content

Commit

Permalink
Add XPATH variable to tailoring test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mildas committed Jan 24, 2019
1 parent 44cff2b commit d99456e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/API/XCCDF/tailoring/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function test_api_xccdf_tailoring_profile_generate_fix {
fix_result=`mktemp`
# tailoring profile only with "always fail" rule and generate bash fix
$OSCAP xccdf eval --tailoring-file $TAILORING --profile "xccdf_com.example.www_profile_customized" --results-arf $tailoring_result $INPUT || [ "$?" == "2" ]
tailoring_id=$(xpath -q -e 'string(//ds:component-ref[contains(@id, "_tailoring")]/@id)' $tailoring_result)
tailoring_id=$($XPATH $tailoring_result 'string(//ds:component-ref[contains(@id, "_tailoring")]/@id)')
$OSCAP xccdf generate fix --tailoring-id $tailoring_id --result-id xccdf_org.open-scap_test-result_xccdf-com.example.www_profile_customized --results $fix_result $tailoring_result

if ! grep -q "echo \"Fix the first rule\"" $fix_result; then
Expand Down

0 comments on commit d99456e

Please sign in to comment.