Teach OpenStack test to distinguish between RHEL and Fedora

This commit is contained in:
Alexander Todorov 2018-12-06 16:09:19 +02:00 committed by Alexander Todorov
parent 543a4d88d9
commit 642b909d24

View File

@ -110,8 +110,14 @@ __EOF__
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest "Verify VM instance" rlPhaseStartTest "Verify VM instance"
# cloud-init default config differs between RHEL and Fedora
CLOUD_USER="cloud-user"
if [ -f "/etc/fedora-release" ]; then
CLOUD_USER="fedora"
fi
# verify we can login into that instance # verify we can login into that instance
rlRun -t -c "ssh -oStrictHostKeyChecking=no -i $SSH_KEY_DIR/id_rsa cloud-user@$IP_ADDRESS 'cat /etc/redhat-release'" rlRun -t -c "ssh -oStrictHostKeyChecking=no -i $SSH_KEY_DIR/id_rsa $CLOUD_USER@$IP_ADDRESS 'cat /etc/redhat-release'"
rlPhaseEnd rlPhaseEnd
rlPhaseStartCleanup rlPhaseStartCleanup