Skip to content

Commit 04f182c

Browse files
Merge pull request #961 from eduolivares/TOBIKO-154
Make tobiko options configurable
2 parents 0f713f6 + 7388ddd commit 04f182c

2 files changed

Lines changed: 35 additions & 25 deletions

File tree

tests/roles/development_environment/defaults/main.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,28 @@ openstack_command: >-
2828
ssh -i {{ edpm_privatekey_path }} -o StrictHostKeyChecking=no {{ source_osp_ssh_user }}@{{ standalone_ip | default(edpm_node_ip) }} OS_CLOUD={{ os_cloud_name }} openstack
2929
enroll_ironic_bmaas_nodes: true
3030
pre_launch_ironic_restart_chrony: true
31+
# default tobiko parameter values
32+
tobiko_version: master
33+
tobiko_test_workflow: create-resources
34+
tobiko_pytest_addopts: ''
35+
tobiko_conf_file: |
36+
[DEFAULT]
37+
log_dir = /home/zuul/src/x/tobiko/report
38+
log_file = tobiko.log
39+
debug = true
40+
[testcase]
41+
test_runner_timeout = 14400.0
42+
timeout = 1800.0
43+
[advanced_vm]
44+
image_url = "http://kaplonski.pl/files/Customized-Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
45+
username = fedora
46+
[tripleo]
47+
undercloud_ssh_hostname = undercloud
48+
undercloud_ssh_username = zuul
49+
run_background_ping_in_pod = true
50+
[keystone]
51+
interface = public
52+
[neutron]
53+
custom_mtu_size = 1292
54+
[podified]
55+
iperf3_image = 'quay.io/skaplons/iperf3:latest'

tests/roles/development_environment/tasks/main.yaml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@
105105
block:
106106
# Temporal - tobiko installation task
107107
- name: tobiko installation
108-
ansible.builtin.shell: |
109-
ssh ${OS_CLOUD_IP} "set -o pipefail && mkdir -p ~/src/x && cd ~/src/x && git clone https://github.com/redhat-openstack/tobiko.git"
108+
ansible.builtin.shell: >
109+
ssh ${OS_CLOUD_IP} "set -o pipefail && mkdir -p ~/src/x && cd ~/src/x &&
110+
git clone https://github.com/redhat-openstack/tobiko.git &&
111+
cd tobiko && git checkout {{ tobiko_version }}"
110112
111113
- name: oc undercloud installation
112114
ansible.builtin.shell: >
@@ -134,28 +136,6 @@
134136

135137
- name: Add tobiko.conf to the undercloud
136138
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
137-
vars:
138-
tobiko_conf_file: |
139-
[DEFAULT]
140-
log_dir = /home/zuul/src/x/tobiko/report
141-
log_file = tobiko.log
142-
debug = true
143-
[testcase]
144-
test_runner_timeout = 14400.0
145-
timeout = 1800.0
146-
[advanced_vm]
147-
image_url = "kaplonski.pl/files/Customized-Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
148-
username: fedora
149-
[tripleo]
150-
undercloud_ssh_hostname = undercloud
151-
undercloud_ssh_username = zuul
152-
run_background_ping_in_pod = true
153-
[keystone]
154-
interface = public
155-
[neutron]
156-
custom_mtu_size = 1292
157-
[podified]
158-
iperf3_image: 'quay.io/skaplons/iperf3:latest'
159139
ansible.builtin.copy:
160140
mode: a+r
161141
content: "{{ tobiko_conf_file }}"
@@ -165,7 +145,12 @@
165145
delegate_to: "{{ standalone_ip | default(edpm_node_ip) }}"
166146
ansible.builtin.shell:
167147
chdir: ~/src/x/tobiko/
168-
cmd: ansible-playbook tobiko-playbook.yaml -e test_workflow=create-resources -e pytest_addopts_global="--skipregex='TestFloatingIPLogging|ExtraDhcpOptsPortLoggingTest|NoFipPortTest|StatelessSecurityGroupInstanceTest|StatelessSecurityGroupTest|migrate_server|qos|create_share|extend_share'"
148+
cmd: >
149+
ansible-playbook tobiko-playbook.yaml
150+
-e test_workflow={{ tobiko_test_workflow }}
151+
{% if tobiko_pytest_addopts -%}
152+
-e pytest_addopts_global="{{ tobiko_pytest_addopts }}"
153+
{% endif -%}
169154
170155
- name: copy keys from undercloud for tobiko
171156
ansible.builtin.shell: |

0 commit comments

Comments
 (0)