X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=tests%2Fruntests.sh;fp=tests%2Fruntests.sh;h=6c3cb7ba4c36c2add3903eab5908a83416624a54;hb=ac8f04d5c1368e094653116d793ce670375ee5c1;hp=4604350e0a453c8cb61fa61572c1703a83cdf7b6;hpb=3440fbd2ed4257b46a8df712b1129d555a3e5423;p=openstack-build%2Fceilometer-build.git diff --git a/tests/runtests.sh b/tests/runtests.sh index 4604350..6c3cb7b 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -162,8 +162,6 @@ install_and_setup_mysql() { ${command_to_install} mysql-client mysql-server mysql-libs MySQL-python MYSQL_PASSWORD=$(cat /root/.mysql_secret | head -1 | awk -F': ' '{print $2}') fi - mycnf=$(find /etc/ -name my.cnf) - cat $mycnf service mysql restart sleep 10 if [ ! -z "${MYSQL_PASSWORD}" ]; then @@ -253,10 +251,11 @@ send_fake_instance_notification() { pip install pika==0.9.8 echo '#!/usr/bin/env python import pika +import uuid connection = pika.BlockingConnection(pika.ConnectionParameters(host="127.0.0.1")) channel = connection.channel() channel.queue_declare(queue="notifications.info") -test=r'"'"'{"event_type": "compute.instance.update", "_unique_id": "fake", "payload": {"ephemeral_gb": 0, "instance_id": "fake", "user_id": "fake", "root_gb": 0, "tenant_id": "fake", "memory_mb": 64, "vcpus": 1}, "priority": "INFO"}'"'"' +test='"'"'{"event_type": "compute.instance.create", "payload": {"instance_id": "fake", "memory_mb": 512, "disk_gb": 20, "root_gb": 20, "ephemeral_gb": 0, "vcpus": 1, "instance_type_id": 1, "state": "fake"}, "publisher_id": "fake", "priority":"INFO", "message_id": "%s"}'"'"' % uuid.uuid4() channel.basic_publish(exchange="nova", routing_key="notifications.info", properties=pika.BasicProperties(priority=0, delivery_mode=2, headers="", content_encoding="utf-8", content_type="application/json"), body=test) @@ -345,9 +344,9 @@ case ${package_to_test} in fi # Events - #if [ -z "$(ceilometer ${ceilometer_auth_string} event-list | grep fake)" ]; then - # exit_on_error 1 "Events wasn't created" - #fi + if [ -z "$(ceilometer ${ceilometer_auth_string} event-list | grep fake)" ]; then + exit_on_error 1 "Events wasn't created" + fi # Alarming ceilometer -dv ${ceilometer_auth_string} alarm-threshold-create --name cpu_high --description 'instance running hot' \