Skip to content

Commit bb99bec

Browse files
openstack_test: truncate allow/block txt once before multi-file convert
Per-iteration truncate in convert_yaml_tests_file_to_txt dropped earlier blocklist regex lines when lb_tests passes ingress + isolated blocklists. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 404384d commit bb99bec

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎collection/stages/roles/openstack_test/tasks/run_openstack_test.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
changed_when: true
9797
when: not (openstack_test_use_ote | bool)
9898

99+
- name: Remove stale allowlist txt before YAML conversion
100+
ansible.builtin.file:
101+
path: "{{ allowlist_path }}"
102+
state: absent
103+
when: openstack_tests_allowlist_file != ''
104+
99105
- name: Convert the allowlist YAML files to TXT
100106
ansible.builtin.include_role:
101107
name: tools_openshift_tests
@@ -106,6 +112,12 @@
106112
with_items: "{{ openstack_tests_allowlist_file.split(',') }}"
107113
when: openstack_tests_allowlist_file != ''
108114

115+
- name: Remove stale blocklist txt before YAML conversion
116+
ansible.builtin.file:
117+
path: "{{ blocklist_path }}"
118+
state: absent
119+
when: openstack_tests_blocklist_file != ''
120+
109121
- name: Convert the blocklist YAML files to TXT
110122
ansible.builtin.include_role:
111123
name: tools_openshift_tests

‎collection/tools/roles/tools_openshift_tests/tasks/convert_yaml_tests_file_to_txt.yml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
yaml_testslist: "{{ yaml_testslist[discovered_openshift_release][discovered_ocp_network_type] }}"
99
when: yaml_format_based_on_ocp_version|default(False)
1010

11-
- name: Remove stale "{{ output_tests_list }}" before rewrite
12-
ansible.builtin.file:
13-
path: "{{ output_tests_list }}"
14-
state: absent
15-
1611
- name: Create the "{{ output_tests_list }}" file
1712
ansible.builtin.file:
1813
path: "{{ output_tests_list }}"

0 commit comments

Comments
 (0)