From bae3cb06bca7e46188ae8a1c5d6c89b04ab93e2b Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Mon, 13 Jan 2020 17:04:19 +0100 Subject: [PATCH] tests: Check for cloud-init presence in azure image This tests if the cloud-init is installed and running. --- tests/cli/test_build_and_deploy_azure.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/cli/test_build_and_deploy_azure.sh b/tests/cli/test_build_and_deploy_azure.sh index e4d60161..3bb895d9 100755 --- a/tests/cli/test_build_and_deploy_azure.sh +++ b/tests/cli/test_build_and_deploy_azure.sh @@ -137,8 +137,10 @@ __EOF__ rlPhaseEnd rlPhaseStartTest "Verify VM instance" - # run generic tests to verify the instance + # run generic tests to verify the instance and check if cloud-init is installed and running verify_image azure-user "$IP_ADDRESS" "-i $SSH_KEY_DIR/id_rsa" + rlRun -t -c "ssh -o StrictHostKeyChecking=no -i $SSH_KEY_DIR/id_rsa azure-user@$IP_ADDRESS 'rpm -q cloud-init'" + rlRun -t -c "ssh -o StrictHostKeyChecking=no -i $SSH_KEY_DIR/id_rsa azure-user@$IP_ADDRESS 'systemctl status cloud-init'" rlPhaseEnd rlPhaseStartCleanup