X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=tests%2Fruntests.sh;h=f92d02cdf679f399bae4b550e3c940755d7489ac;hb=refs%2Fheads%2Fopenstack-ci%2Ffuel-8.0%2Fliberty;hp=4604350e0a453c8cb61fa61572c1703a83cdf7b6;hpb=3440fbd2ed4257b46a8df712b1129d555a3e5423;p=openstack-build%2Fceilometer-build.git diff --git a/tests/runtests.sh b/tests/runtests.sh index 4604350..163281e 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -58,7 +58,8 @@ if [[ `cat /etc/*-release | head -n 1 | awk '{print $1}'` =~ Ubuntu ]]; then policy.json ) else - setenforce 0 && service firewalld stop + setenforce 0 || : + service firewalld stop || : os="centos" packages_list="python-pip curl" command_to_install="yum install -y" @@ -162,8 +163,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 +252,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 +345,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' \