diff options
-rw-r--r-- | ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml | 34 | ||||
-rw-r--r-- | ceilometer/tests/integration/gabbi/test_gabbi_live.py | 2 | ||||
-rwxr-xr-x | ceilometer/tests/integration/hooks/post_test_hook.sh | 1 | ||||
-rw-r--r-- | ceilometer/tests/tempest/scenario/test_autoscaling.py | 4 | ||||
-rw-r--r-- | tox.ini | 2 |
5 files changed, 40 insertions, 3 deletions
diff --git a/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml b/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml index 52c3cde0..b4428ab9 100644 --- a/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml +++ b/ceilometer/tests/integration/gabbi/gabbits-live/autoscaling.yaml @@ -75,6 +75,40 @@ tests: - '"id": "$RESPONSE["$.servers[0].id"]"' - '"id": "$RESPONSE["$.servers[1].id"]"' + - name: list servers again + desc: grab servers to check for events + url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail + method: GET + poll: + count: 5 + delay: 1 + response_json_paths: + $.servers.`len`: 2 + + - name: check event + desc: Check panko for new instance.create.end event + url: $ENVIRON['PANKO_SERVICE_URL']/v2/events + method: GET + request_headers: + content-type: application/json + data: + q: + - field: event_type + op: eq + type: string + value: compute.instance.create.end + - field: resource_id + op: eq + type: string + value: $RESPONSE['$.servers[0].id'] + poll: + count: 30 + delay: 1 + response_json_paths: + $.`len`: 1 + $[0].event_type: compute.instance.create.end + $[0].traits[?(@.name='resource_id')].value: $RESPONSE['$.servers[0].id'] + - name: check alarm desc: Check the aodh alarm and its state url: $ENVIRON['AODH_SERVICE_URL']/v2/alarms diff --git a/ceilometer/tests/integration/gabbi/test_gabbi_live.py b/ceilometer/tests/integration/gabbi/test_gabbi_live.py index b347b556..925fbf3f 100644 --- a/ceilometer/tests/integration/gabbi/test_gabbi_live.py +++ b/ceilometer/tests/integration/gabbi/test_gabbi_live.py @@ -26,7 +26,7 @@ TESTS_DIR = 'gabbits-live' def load_tests(loader, tests, pattern): """Provide a TestSuite to the discovery process.""" NEEDED_ENV = ["AODH_SERVICE_URL", "GNOCCHI_SERVICE_URL", - "HEAT_SERVICE_URL", "NOVA_SERVICE_URL", + "HEAT_SERVICE_URL", "NOVA_SERVICE_URL", "PANKO_SERVICE_URL", "GLANCE_IMAGE_NAME", "ADMIN_TOKEN"] for env_variable in NEEDED_ENV: diff --git a/ceilometer/tests/integration/hooks/post_test_hook.sh b/ceilometer/tests/integration/hooks/post_test_hook.sh index 36634190..8ce3ecac 100755 --- a/ceilometer/tests/integration/hooks/post_test_hook.sh +++ b/ceilometer/tests/integration/hooks/post_test_hook.sh @@ -89,6 +89,7 @@ fi openstack catalog list export AODH_SERVICE_URL=$(openstack catalog show alarming -c endpoints -f value | awk '/public/{print $2}') +export PANKO_SERVICE_URL=$(openstack catalog show event -c endpoints -f value | awk '/public/{print $2}') export GNOCCHI_SERVICE_URL=$(openstack catalog show metric -c endpoints -f value | awk '/public/{print $2}') export HEAT_SERVICE_URL=$(openstack catalog show orchestration -c endpoints -f value | awk '/public/{print $2}') export NOVA_SERVICE_URL=$(openstack catalog show compute -c endpoints -f value | awk '/public/{print $2}') diff --git a/ceilometer/tests/tempest/scenario/test_autoscaling.py b/ceilometer/tests/tempest/scenario/test_autoscaling.py index e9b5ba0f..9da14494 100644 --- a/ceilometer/tests/tempest/scenario/test_autoscaling.py +++ b/ceilometer/tests/tempest/scenario/test_autoscaling.py @@ -24,7 +24,7 @@ class TestAutoscalingGabbi(manager.ScenarioTest): @classmethod def skip_checks(cls): super(TestAutoscalingGabbi, cls).skip_checks() - for name in ["aodh_plugin", "gnocchi", "nova", "heat", + for name in ["aodh_plugin", "gnocchi", "nova", "heat", "panko", "ceilometer", "glance"]: cls._check_service(name) @@ -50,6 +50,8 @@ class TestAutoscalingGabbi(manager.ScenarioTest): auth, "alarming_plugin") os.environ["GNOCCHI_SERVICE_URL"] = cls._get_endpoint_for( auth, "metric") + os.environ["PANKO_SERVICE_URL"] = cls._get_endpoint_for( + auth, "event") os.environ["HEAT_SERVICE_URL"] = cls._get_endpoint_for( auth, "orchestration") os.environ["NOVA_SERVICE_URL"] = cls._get_endpoint_for(auth, "compute") @@ -29,7 +29,7 @@ whitelist_externals = bash setenv = OS_TEST_PATH=./ceilometer/tests/integration OS_TEST_TIMEOUT=2400 GABBI_LIVE_FAIL_IF_NO_TEST=1 -passenv = {[testenv]passenv} HEAT_* CEILOMETER_* GNOCCHI_* AODH_* GLANCE_* NOVA_* ADMIN_* +passenv = {[testenv]passenv} HEAT_* CEILOMETER_* GNOCCHI_* AODH_* PANKO_* GLANCE_* NOVA_* ADMIN_* # NOTE(sileht): run gabbi-run to failfast in case of error because testr # doesn't support --failfast, but we loose the testr report. commands = |