Fix gabbi tests
When the tests have been migrated to this repository, the gabbi test generates have never raise error... This change fixes that. It also fixes tests that doesn't pass anymore. It removes useless stack downscaling, because it takes too many times for no additional value (alarm update/metric update are tested by other tests). Change-Id: I09cd0569f90e873cf4b7f05ec9c14496c9551fcc
This commit is contained in:
parent
b9fce9a5e1
commit
7f0e315a78
|
@ -11,6 +11,7 @@
|
|||
- openstack/panko
|
||||
- openstack/telemetry-tempest-plugin
|
||||
- openstack/heat
|
||||
- openstack/heat-tempest-plugin
|
||||
# following are required when DEVSTACK_GATE_HEAT, which this
|
||||
# job turns on
|
||||
- openstack/dib-utils
|
||||
|
|
|
@ -31,7 +31,7 @@ function generate_testr_results {
|
|||
}
|
||||
|
||||
function generate_telemetry_report(){
|
||||
set +x
|
||||
set -x
|
||||
set +e
|
||||
|
||||
echo "* Message queue status:"
|
||||
|
@ -54,7 +54,6 @@ function generate_telemetry_report(){
|
|||
echo "* Gnocchi instance detail:"
|
||||
gnocchi resource show -t instance $instance_id
|
||||
echo "* Gnocchi measures for instance ${instance_id}:"
|
||||
gnocchi measures show -r $instance_id cpu_util
|
||||
gnocchi metric show -r $instance_id cpu
|
||||
gnocchi --debug measures show -r $instance_id --aggregation rate:mean cpu
|
||||
done
|
||||
|
@ -94,6 +93,7 @@ sudo chown -R tempest:stack $BASE/new/tempest
|
|||
sudo chown -R tempest:stack $BASE/data/tempest
|
||||
cd $BASE/new/tempest
|
||||
sudo -H -u tempest tox -evenv-tempest -- pip install /opt/stack/new/telemetry-tempest-plugin
|
||||
sudo -H -u tempest tox -evenv-tempest -- pip install /opt/stack/new/heat-tempest-plugin
|
||||
echo "Checking installed Tempest plugins:"
|
||||
sudo -H -u tempest tox -evenv-tempest -- tempest list-plugins
|
||||
set +e
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
export DEVSTACK_GATE_EXERCISES=0
|
||||
export DEVSTACK_GATE_INSTALL_TESTONLY=1
|
||||
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
|
||||
export PROJECTS="openstack/ceilometer openstack/aodh openstack/panko openstack/telemetry-tempest-plugin openstack/heat"
|
||||
export PROJECTS="openstack/ceilometer openstack/aodh openstack/panko openstack/telemetry-tempest-plugin openstack/heat openstack/heat-tempest-plugin"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin panko git://git.openstack.org/openstack/panko"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ceilometer git://git.openstack.org/openstack/ceilometer"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin aodh git://git.openstack.org/openstack/aodh"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat git://git.openstack.org/openstack/heat"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat-tempest-plugin git://git.openstack.org/openstack/heat-tempest-plugin"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"INSTALL_TEMPEST='False'"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"CEILOMETER_BACKEND=gnocchi"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY=high"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY_TEMPEST=ceilometer-high"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY_TEMPEST=ceilometer-high-rate"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"CEILOMETER_PIPELINE_INTERVAL=15"
|
||||
function post_test_hook {
|
||||
cd /opt/stack/new/telemetry-tempest-plugin/playbooks/legacy/telemetry-dsvm-integration-tempest-plugin/
|
||||
|
|
|
@ -51,7 +51,7 @@ tests:
|
|||
cowsay: moo
|
||||
status: 400
|
||||
response_strings:
|
||||
- "Invalid input: extra keys not allowed"
|
||||
- "extra keys not allowed"
|
||||
|
||||
- name: missing definition
|
||||
desc: archive policy is missing 'definition' keyword
|
||||
|
@ -62,7 +62,7 @@ tests:
|
|||
name: medium
|
||||
status: 400
|
||||
response_strings:
|
||||
- "Invalid input: required key not provided"
|
||||
- "required key not provided"
|
||||
|
||||
- name: empty definition
|
||||
desc: empty definition for archive policy
|
||||
|
@ -74,7 +74,7 @@ tests:
|
|||
definition: []
|
||||
status: 400
|
||||
response_strings:
|
||||
- "Invalid input: length of value must be at least 1"
|
||||
- "length of value must be at least 1"
|
||||
|
||||
- name: wrong value definition
|
||||
desc: invalid type of 'definition' key
|
||||
|
@ -86,7 +86,7 @@ tests:
|
|||
definition: foobar
|
||||
status: 400
|
||||
response_strings:
|
||||
- "Invalid input: expected a list"
|
||||
- "expected a list"
|
||||
|
||||
- name: useless definition
|
||||
desc: invalid archive policy definition
|
||||
|
@ -99,7 +99,7 @@ tests:
|
|||
- cowsay: moo
|
||||
status: 400
|
||||
response_strings:
|
||||
- "Invalid input: extra keys not allowed"
|
||||
- "extra keys not allowed"
|
||||
|
||||
#
|
||||
# Create archive policy
|
||||
|
@ -125,7 +125,7 @@ tests:
|
|||
- min
|
||||
- max
|
||||
response_headers:
|
||||
location: $SCHEME://$NETLOC/v1/archive_policy/gabbilive
|
||||
location: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/archive_policy/gabbilive
|
||||
status: 201
|
||||
|
||||
# Retrieve it correctly and then poorly
|
||||
|
@ -134,7 +134,7 @@ tests:
|
|||
desc: retrieve archive policy 'gabbilive' and asster its values
|
||||
GET: $LOCATION
|
||||
response_headers:
|
||||
content-type: $ENVIRON['GNOCCHI_SERVICE_URL']/application/json/
|
||||
content-type: application/json
|
||||
response_json_paths:
|
||||
$.name: gabbilive
|
||||
$.back_window: 0
|
||||
|
@ -198,7 +198,7 @@ tests:
|
|||
points: 20
|
||||
status: 201
|
||||
response_headers:
|
||||
location: $SCHEME://$NETLOC/v1/archive_policy/%E2%9C%94%C3%A9%C3%B1%E2%98%83
|
||||
location: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/archive_policy/%E2%9C%94%C3%A9%C3%B1%E2%98%83
|
||||
response_json_paths:
|
||||
name: ✔éñ☃
|
||||
|
||||
|
@ -325,7 +325,7 @@ tests:
|
|||
whaa: foobar
|
||||
status: 400
|
||||
response_strings:
|
||||
- "Invalid input: extra keys not allowed"
|
||||
- "extra keys not allowed"
|
||||
|
||||
# get an archive policy rules
|
||||
|
||||
|
@ -461,7 +461,7 @@ tests:
|
|||
- name: root of resource
|
||||
GET: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource
|
||||
response_json_paths:
|
||||
$.generic: $SCHEME://$NETLOC/v1/resource/generic
|
||||
$.generic: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource/generic
|
||||
|
||||
- name: typo of resource
|
||||
GET: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resoue
|
||||
|
@ -489,7 +489,7 @@ tests:
|
|||
min_length: 2
|
||||
status: 201
|
||||
response_headers:
|
||||
location: $SCHEME://$NETLOC/v1/resource_type/myresource
|
||||
location: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource_type/myresource
|
||||
|
||||
- name: add an attribute
|
||||
PATCH: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource_type/myresource
|
||||
|
|
|
@ -99,45 +99,6 @@ tests:
|
|||
response_json_paths:
|
||||
$[0].state: alarm
|
||||
|
||||
- name: get stack location for update
|
||||
desc: Get the stack location
|
||||
url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test
|
||||
method: GET
|
||||
status: 302
|
||||
|
||||
- name: update stack
|
||||
desc: Update an autoscaling stack
|
||||
url: $LOCATION
|
||||
method: PUT
|
||||
request_headers:
|
||||
content-type: application/json
|
||||
data: <@update_stack.json
|
||||
status: 202
|
||||
|
||||
- name: control stack status
|
||||
desc: Checks the stack have been created successfully
|
||||
url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test
|
||||
redirects: true
|
||||
method: GET
|
||||
status: 200
|
||||
poll:
|
||||
count: 300
|
||||
delay: 1
|
||||
response_json_paths:
|
||||
$.stack.stack_status: "UPDATE_COMPLETE"
|
||||
|
||||
- name: list servers shrink
|
||||
desc: Wait the autoscaling stack shrink to one server
|
||||
url: $ENVIRON['NOVA_SERVICE_URL']/servers/detail
|
||||
method: GET
|
||||
poll:
|
||||
count: 600
|
||||
delay: 1
|
||||
response_json_paths:
|
||||
$.servers[0].metadata.'metering.server_group': $RESPONSE['$.stack.id']
|
||||
$.servers[0].status: ACTIVE
|
||||
$.servers.`len`: 1
|
||||
|
||||
- name: get stack location
|
||||
desc: Get the stack location
|
||||
url: $ENVIRON['HEAT_SERVICE_URL']/stacks/integration_test
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
{
|
||||
"template": {
|
||||
"heat_template_version": "2013-05-23",
|
||||
"description": "Integration Test AutoScaling with heat+ceilometer+gnocchi+aodh",
|
||||
"resources": {
|
||||
"asg": {
|
||||
"type": "OS::Heat::AutoScalingGroup",
|
||||
"properties": {
|
||||
"min_size": 1,
|
||||
"max_size": 2,
|
||||
"resource": {
|
||||
"type": "OS::Nova::Server",
|
||||
"properties": {
|
||||
"networks": [{ "network": "$ENVIRON['NEUTRON_NETWORK']" }],
|
||||
"flavor": "$ENVIRON['NOVA_FLAVOR_REF']",
|
||||
"image": "$ENVIRON['GLANCE_IMAGE_NAME']",
|
||||
"metadata": {
|
||||
"metering.server_group": { "get_param": "OS::stack_id" }
|
||||
},
|
||||
"user_data_format": "RAW",
|
||||
"user_data": {"Fn::Join": ["", [
|
||||
"#!/bin/sh\n",
|
||||
"echo 'Loading CPU'\n",
|
||||
"set -v\n",
|
||||
"cat /dev/urandom > /dev/null\n"
|
||||
]]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"web_server_scaledown_policy": {
|
||||
"type": "OS::Heat::ScalingPolicy",
|
||||
"properties": {
|
||||
"adjustment_type": "change_in_capacity",
|
||||
"auto_scaling_group_id": { "get_resource": "asg" },
|
||||
"cooldown": 2,
|
||||
"scaling_adjustment": -1
|
||||
}
|
||||
},
|
||||
"cpu_alarm_high": {
|
||||
"type": "OS::Ceilometer::GnocchiAggregationByResourcesAlarm",
|
||||
"properties": {
|
||||
"description": "Scale-down if the mean CPU > 10% on 1 minute",
|
||||
"metric": "$ENVIRON["CEILOMETER_METRIC_NAME"]",
|
||||
"aggregation_method": "$ENVIRON["GNOCCHI_AGGREGATION_METHOD"]",
|
||||
"granularity": $ENVIRON["AODH_GRANULARITY"],
|
||||
"evaluation_periods": 1,
|
||||
"threshold": $ENVIRON["AODH_THRESHOLD"],
|
||||
"comparison_operator": "gt",
|
||||
"alarm_actions": [
|
||||
{
|
||||
"str_replace": {
|
||||
"template": "trust+url",
|
||||
"params": {
|
||||
"url": { "get_attr": [ "web_server_scaledown_policy", "signal_url" ] }
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"resource_type": "instance",
|
||||
"query": {
|
||||
"str_replace": {
|
||||
"template": "{\"and\": [{\"=\": {\"server_group\": \"stack_id\"}}, {\"=\": {\"ended_at\": null}}]}",
|
||||
"params": {
|
||||
"stack_id": { "get_param": "OS::stack_id" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ class TestTelemetryIntegration(manager.ScenarioTest):
|
|||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(TestTelemetryIntegration, cls).skip_checks()
|
||||
for name in ["aodh", "gnocchi", "nova", "heat_plugin",
|
||||
for name in ["aodh", "gnocchi", "nova", "heat",
|
||||
"panko", "ceilometer", "glance"]:
|
||||
cls._check_service(name)
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@ def run_test(test_class_instance, test_dir, filename):
|
|||
stream=stream, verbosity=0, failfast=True,
|
||||
).run(test_suite)
|
||||
|
||||
return
|
||||
|
||||
if not result.wasSuccessful():
|
||||
failures = (result.errors + result.failures +
|
||||
result.unexpectedSuccesses)
|
||||
|
|
Loading…
Reference in New Issue