validate-tempest: fixes in the configuration-only workflow

The workflow of
- configure_tempest is only defined twice and used in an important
  condition but it is not really used anywhere; the variable which is
  around is tempest_config. Use tempest_config properly, remove
  then configure_tempest;
- execute validate-tempest also when tempest_config is true,
  not only when run_tempest is true;
- execute the post-tempest task only if run_tempest is true;
  no need to execute it if tempest was simply configured.

Change-Id: I84dce8ff4ebb1df2163b1de6279b35e564efea5b
This commit is contained in:
Luigi Toscano 2017-07-10 22:16:04 +02:00 committed by Attila Darazs
parent 1024c3e5e1
commit be59e5230b
5 changed files with 3 additions and 5 deletions

View File

@ -14,4 +14,4 @@
- overcloud-validate
gather_facts: no
roles:
- { role: validate-tempest, when: run_tempest|bool }
- { role: validate-tempest, when: tempest_config|bool or run_tempest|bool }

View File

@ -19,6 +19,7 @@ Role Variables
* `tempest_log_file` - name of log file for tempest run
* `test_regex` - tests regular expression for testr run, i.e. smoke or tempest.api.object_storage|keystone_tempest_plugin.
* `run_tempest`: false/true - to run tempest or not
* `tempest_config`: false/true - whether to prepare the script which configures and runs tempest or not
* `skip_file_src`: path to skip tests file, set it empty if running without skip list: `skip_file_src=''`
* `tempest_workers`: int - how many parallel workers to run (default is number of cores)
* `tempest_isolated`: false/true - if to run every test id in separate test runner (default is false)

View File

@ -1,6 +1,5 @@
---
configure_tempest: true
floating_ip_cidr: "{{ undercloud_network_cidr }}"
public_net_pool_start: "{{ floating_ip_cidr|nthhost(100) }}"
public_net_pool_end: "{{ floating_ip_cidr|nthhost(120) }}"

View File

@ -21,6 +21,6 @@
ignore_errors: yes
- include: post-tempest.yml
when: post_tempest|bool
when: post_tempest|bool and run_tempest|bool
tags:
- post-tempest

View File

@ -2,7 +2,6 @@
set -eux
{% if configure_tempest|bool %}
### --start_docs
## Validate the overcloud deployment with tempest
@ -13,4 +12,3 @@ set -eux
{% include 'run-tempest.sh.j2' %}
### --stop_docs
{% endif %}