From 0311ef449df9cbeaa4cbf592fee14dcfb99fd511 Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Mon, 14 Aug 2023 12:49:17 +0100 Subject: [PATCH] test/cases: OpenSCAP cloudapi tests Run a basic check to see that the tailoring file has been created when adding tailoring rules to the OpenSCAP config. Since the OpenSCAP scan requires more memory and breaks some of the API tests, a full scan is not run in the cloudapi tests. --- test/cases/api.sh | 22 ++++++++++++++++++++++ test/cases/api/aws.sh | 2 +- test/cases/api/azure.sh | 2 +- test/cases/api/common/common.sh | 26 ++++++++++++++++++++++++++ test/cases/api/common/s3.sh | 2 +- test/cases/api/gcp.sh | 2 +- 6 files changed, 52 insertions(+), 4 deletions(-) diff --git a/test/cases/api.sh b/test/cases/api.sh index e66c11b80..441736bb2 100755 --- a/test/cases/api.sh +++ b/test/cases/api.sh @@ -394,6 +394,28 @@ esac export CUSTOM_GPG_KEY export REPOSITORY_CUSTOMIZATION_BLOCK +# Define the customizations for the images here to not have to repeat them +# in every image-type specific file. +case "${IMAGE_TYPE}" in + # The Directories and Files customization is not supported for this image type. + "$IMAGE_TYPE_EDGE_INSTALLER") + OPENSCAP_CUSTOMIZATION_BLOCK= + ;; + *) + OPENSCAP_CUSTOMIZATION_BLOCK=$(cat <