Skip to content

Commit e986def

Browse files
stuggiclaude
authored andcommitted
[test_operator] Read horizontest admin password from osp-secret
install_yamls PR openstack-k8s-operators/install_yamls#1158 replaced hardcoded passwords with dynamically generated per-service secrets. The horizontest runner defaulted adminPassword to "12345678" which no longer matches the deployed admin password. Fetch AdminPassword from the osp-secret Secret at runtime and override the default before building the HorizonTest CR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 670f562 commit e986def

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

roles/test_operator/tasks/runners/horizontest_runner.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
---
2+
- name: Fetch admin password from osp-secret
3+
no_log: true
4+
ansible.builtin.command:
5+
cmd: >-
6+
oc get secret osp-secret
7+
-n {{ cifmw_test_operator_namespace }}
8+
-o jsonpath='{.data.AdminPassword}'
9+
register: _horizontest_admin_password_b64
10+
failed_when: false
11+
changed_when: false
12+
13+
- name: Override admin password from osp-secret
14+
no_log: true
15+
when:
16+
- _horizontest_admin_password_b64.rc == 0
17+
- _horizontest_admin_password_b64.stdout | length > 0
18+
ansible.builtin.set_fact:
19+
stage_vars_dict: >-
20+
{{
21+
stage_vars_dict | combine({
22+
'cifmw_test_operator_horizontest_admin_password':
23+
_horizontest_admin_password_b64.stdout | b64decode
24+
})
25+
}}
26+
227
- name: Run horizontest job
328
vars:
429
run_test_fw: horizontest

0 commit comments

Comments
 (0)