tests: Special case compose types for osbuild-composer
- alibaba - will be added later - google - will be added later, low priority b/c GCE doesn't fully support RHEL8 - live-iso - not supported for now - ext4 & partitioned disk - removed from osbuild-composer
This commit is contained in:
parent
d68e01b7e1
commit
4dd7cf8798
@ -11,18 +11,42 @@ CLI="${CLI:-./src/bin/composer-cli}"
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartTest "compose types"
|
rlPhaseStartTest "compose types"
|
||||||
|
TYPE_LIVE_ISO="live-iso"
|
||||||
|
TYPE_ALIBABA="alibaba"
|
||||||
|
TYPE_GOOGLE="google"
|
||||||
|
TYPE_HYPER_V="hyper-v"
|
||||||
|
TYPE_LIVEIMG="liveimg-tar"
|
||||||
|
TYPE_EXT4="ext4-filesystem"
|
||||||
|
TYPE_PARTITIONED_DISK="partitioned-disk"
|
||||||
|
TYPE_TAR="tar"
|
||||||
|
TYPE_IOT=""
|
||||||
|
|
||||||
|
# backend specific compose type overrides
|
||||||
|
if [ "$BACKEND" == "osbuild-composer" ]; then
|
||||||
|
TYPE_LIVE_ISO=""
|
||||||
|
TYPE_ALIBABA=""
|
||||||
|
TYPE_GOOGLE=""
|
||||||
|
TYPE_HYPER_V=""
|
||||||
|
TYPE_LIVEIMG=""
|
||||||
|
TYPE_EXT4=""
|
||||||
|
TYPE_PARTITIONED_DISK=""
|
||||||
|
TYPE_TAR=""
|
||||||
|
TYPE_IOT="fedora-iot-commit"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# arch specific compose type selections
|
||||||
if [ "$(uname -m)" == "x86_64" ]; then
|
if [ "$(uname -m)" == "x86_64" ]; then
|
||||||
rlAssertEquals "lists all supported types" \
|
SUPPORTED_TYPES="$TYPE_ALIBABA ami $TYPE_IOT $TYPE_EXT4 $TYPE_GOOGLE $TYPE_HYPER_V $TYPE_LIVE_ISO $TYPE_LIVEIMG openstack $TYPE_PARTITIONED_DISK qcow2 $TYPE_TAR vhd vmdk"
|
||||||
"`$CLI compose types | xargs`" "alibaba ami ext4-filesystem google hyper-v live-iso liveimg-tar openstack partitioned-disk qcow2 tar vhd vmdk"
|
|
||||||
elif [ "$(uname -m)" == "aarch64" ]; then
|
elif [ "$(uname -m)" == "aarch64" ]; then
|
||||||
# ami is supported on aarch64
|
# ami is supported on aarch64
|
||||||
rlAssertEquals "lists all supported types" \
|
SUPPORTED_TYPES="ami $TYPE_EXT4 $TYPE_LIVE_ISO $TYPE_LIVEIMG openstack $TYPE_PARTITIONED_DISK qcow2 $TYPE_TAR"
|
||||||
"`$CLI compose types | xargs`" "ami ext4-filesystem live-iso liveimg-tar openstack partitioned-disk qcow2 tar"
|
|
||||||
else
|
else
|
||||||
# non-x86 architectures disable alibaba
|
SUPPORTED_TYPES="$TYPE_EXT4 $TYPE_LIVE_ISO $TYPE_LIVEIMG openstack $TYPE_PARTITIONED_DISK qcow2 $TYPE_TAR"
|
||||||
rlAssertEquals "lists all supported types" \
|
|
||||||
"`$CLI compose types | xargs`" "ext4-filesystem live-iso liveimg-tar openstack partitioned-disk qcow2 tar"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# truncate white space in case some types are not available
|
||||||
|
SUPPORTED_TYPES=$(echo "$SUPPORTED_TYPES" | tr -s ' ' | sed 's/^[[:space:]]*//')
|
||||||
|
rlAssertEquals "lists all supported types" "`$CLI compose types | xargs`" "$SUPPORTED_TYPES"
|
||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
@ -57,7 +81,7 @@ rlJournalStart
|
|||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start again"
|
rlPhaseStartTest "compose start again"
|
||||||
UUID=`$CLI compose start example-http-server tar`
|
UUID=`$CLI compose start example-http-server ami`
|
||||||
rlAssertEquals "exit code should be zero" $? 0
|
rlAssertEquals "exit code should be zero" $? 0
|
||||||
|
|
||||||
UUID=`echo $UUID | cut -f 2 -d' '`
|
UUID=`echo $UUID | cut -f 2 -d' '`
|
||||||
|
Loading…
Reference in New Issue
Block a user