test: new weldr client compatibility for test scripts
- Handle the array responses from the new weldr-client (>= 35.6). - Move the `get_build_info` function to shared_libs.sh to source and reuse in multiple places.
This commit is contained in:
parent
8e24f5720d
commit
3b14828669
25 changed files with 57 additions and 247 deletions
|
|
@ -9,6 +9,8 @@ OSBUILD_COMPOSER_TEST_DATA=/usr/share/tests/osbuild-composer/
|
|||
# Get OS data.
|
||||
source /etc/os-release
|
||||
|
||||
source /usr/libexec/tests/osbuild-composer/shared_lib.sh
|
||||
|
||||
# Colorful output.
|
||||
function greenprint {
|
||||
echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m"
|
||||
|
|
@ -125,15 +127,6 @@ gen_iso () {
|
|||
# scans and check results
|
||||
sudo dnf install -y xmlstarlet openscap-utils scap-security-guide
|
||||
|
||||
get_build_info() {
|
||||
key="$1"
|
||||
fname="$2"
|
||||
if rpm -q --quiet weldr-client; then
|
||||
key=".body${key}"
|
||||
fi
|
||||
jq -r "${key}" "${fname}"
|
||||
}
|
||||
|
||||
# Get the compose log.
|
||||
get_compose_log () {
|
||||
COMPOSE_ID=$1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue