diff --git a/test/cases/api.sh b/test/cases/api.sh index b504b64726..5b1d6287ac 100755 --- a/test/cases/api.sh +++ b/test/cases/api.sh @@ -409,6 +409,7 @@ case "${IMAGE_TYPE}" in , "openscap": { "profile_id": "pci-dss", + "policy_id": "1af6cced-581c-452c-89cd-33b7bddb816a", "tailoring": { "unselected": [ "rpm_verify_permissions" ] } diff --git a/test/cases/api/common/common.sh b/test/cases/api/common/common.sh index 5faf25bb0f..5b9665cda3 100644 --- a/test/cases/api/common/common.sh +++ b/test/cases/api/common/common.sh @@ -40,11 +40,24 @@ function _instanceCheck() { FACTS=$($_ssh sudo subscription-manager facts) if ! grep -q "image-builder.osbuild-composer.api-type: cloudapi-v2" <<< "$FACTS"; then - echo "System doesn't contain the expected osbuild facts" + echo "System doesn't contain the expected image-builder.osbuild-composer facts" echo "$FACTS" | grep image-builder exit 1 fi + if [ -n "$OPENSCAP_CUSTOMIZATION_BLOCK" ]; then + if ! grep -q "image-builder.insights.openscap-profile-id: pci-dss" <<< "$FACTS"; then + echo "System doesn't contain the expected image-builder.insights facts (profile-id)" + echo "$FACTS"| grep image-builder + exit 1 + fi + if ! grep -q "image-builder.insights.compliance-policy-id: 1af6cced-581c-452c-89cd-33b7bddb816a" <<< "$FACTS"; then + echo "System doesn't contain the expected image-builder.insights facts (policy-id)" + echo "$FACTS"| grep image-builder + exit 1 + fi + fi + # Unregister subscription $_ssh sudo subscription-manager unregister else