test/cases/api: add modules
This commit is contained in:
parent
ec93197b7a
commit
d08cedf73b
6 changed files with 31 additions and 4 deletions
|
|
@ -529,6 +529,22 @@ fi
|
|||
export EXTRA_PAYLOAD_REPOS_BLOCK
|
||||
export EXTRA_PACKAGES_BLOCK
|
||||
|
||||
ENABLED_MODULES_BLOCK=
|
||||
# Only test modularity on rhel 8 and 9
|
||||
if [[ ($ID == rhel || $ID == centos) && ${VERSION_ID%.*} -lt 10 ]]; then
|
||||
ENABLED_MODULES_BLOCK=$(cat <<EndOfMessage
|
||||
,
|
||||
"enabled_modules": [
|
||||
{
|
||||
"name": "nodejs",
|
||||
"stream" :"20"
|
||||
}
|
||||
]
|
||||
EndOfMessage
|
||||
)
|
||||
fi
|
||||
export ENABLED_MODULES_BLOCK
|
||||
|
||||
# generate a temp key for user tests
|
||||
ssh-keygen -t rsa-sha2-512 -f "${WORKDIR}/usertest" -C "usertest" -N ""
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ function createReqFile() {
|
|||
}${EXTRA_PAYLOAD_REPOS_BLOCK}
|
||||
],
|
||||
"packages": [
|
||||
"nodejs",
|
||||
"postgresql",
|
||||
"dummy"${EXTRA_PACKAGES_BLOCK}
|
||||
],
|
||||
|
|
@ -64,7 +65,7 @@ function createReqFile() {
|
|||
"key": "$(cat "${WORKDIR}/usertest.pub")"
|
||||
}
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${RPM_CUSTOMIZATION_BLOCK}${RHSM_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${RPM_CUSTOMIZATION_BLOCK}${RHSM_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}${ENABLED_MODULES_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
|
|
@ -82,10 +82,11 @@ function createReqFile() {
|
|||
}
|
||||
],
|
||||
"packages": [
|
||||
"nodejs",
|
||||
"postgresql",
|
||||
"dummy"
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}${RPM_CUSTOMIZATION_BLOCK}${RHSM_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}${RPM_CUSTOMIZATION_BLOCK}${RHSM_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}${ENABLED_MODULES_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
|
|
@ -37,6 +37,13 @@ function _instanceCheck() {
|
|||
# Check if postgres is installed
|
||||
$_ssh rpm -q postgresql dummy
|
||||
|
||||
|
||||
MODULE=$(cat "$REQUEST_FILE" | jq -r .customizations.enabled_modules[0])
|
||||
if [ "$MODULE" = "nodejs:20" ]; then
|
||||
echo "checking if nodejs 20 is installed: $($_ssh rpm -q nodejs)"
|
||||
$_ssh rpm -q nodejs | grep -q nodejs-20
|
||||
fi
|
||||
|
||||
# Verify subscribe status. Loop check since the system may not be registered such early(RHEL only)
|
||||
if [[ "$ID" == "rhel" ]]; then
|
||||
set +eu
|
||||
|
|
|
|||
|
|
@ -69,10 +69,11 @@ function createReqFile() {
|
|||
}
|
||||
],
|
||||
"packages": [
|
||||
"nodejs",
|
||||
"postgresql",
|
||||
"dummy"
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}${RPM_CUSTOMIZATION_BLOCK}${RHSM_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}${RPM_CUSTOMIZATION_BLOCK}${RHSM_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}${ENABLED_MODULES_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
|
|
@ -74,10 +74,11 @@ function createReqFile() {
|
|||
}
|
||||
],
|
||||
"packages": [
|
||||
"nodejs",
|
||||
"postgresql",
|
||||
"dummy"
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${CACERTS_CUSTOMIZATION_BLOCK}${ENABLED_MODULES_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue