From 642b909d24285c8d641f5fe529b311932007c79d Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Thu, 6 Dec 2018 16:09:19 +0200 Subject: [PATCH] Teach OpenStack test to distinguish between RHEL and Fedora --- tests/cli/test_build_and_deploy_openstack.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/cli/test_build_and_deploy_openstack.sh b/tests/cli/test_build_and_deploy_openstack.sh index 7c0a8bcc..67777874 100755 --- a/tests/cli/test_build_and_deploy_openstack.sh +++ b/tests/cli/test_build_and_deploy_openstack.sh @@ -110,8 +110,14 @@ __EOF__ rlPhaseEnd 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 - 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 rlPhaseStartCleanup