Skip to content

Commit a60bc35

Browse files
committed
Add report_results to logging tests
1 parent c3122c7 commit a60bc35

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

callback_plugins/custom_logger.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def playbook_on_stats(self, stats):
4444
self.log_summary_results(host)
4545

4646
def log_task_result(self, host, result, task_name):
47+
print("logging task result: %s - %s - %s" % (host, result, task_name))
4748
# test_run_result.out only interested in the test tasks, not setup or debug.
4849
if "RHELOSP" in task_name or "RHOSO" in task_name:
4950
if "RHELOSP" in task_name:

ci/logging_tests_computes.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
environment:
66
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
77
PATH: "{{ cifmw_path }}"
8-
8+
vars_files:
9+
- vars/common.yml
10+
tasks:
11+
- name: Create log dir
12+
ansible.builtin.file:
13+
path: "{{ logs_dir }}/logging_compute"
14+
state: directory
15+
mode: "0755"
916

1017
- name: "Verify ctlplane logging containers and files"
1118
hosts: computes
@@ -46,3 +53,11 @@
4653
- name: "Verify journalctl logging identifiers"
4754
ansible.builtin.import_role:
4855
name: telemetry_logging
56+
57+
- name: Include report result
58+
hosts: computes
59+
tasks:
60+
- ansible.builtin.include_tasks:
61+
file: report_result.yml
62+
vars:
63+
test_dir: "{{ logs_dir }}/logging_local"

ci/logging_tests_local.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
---
2-
#- name: Prepare Logging Tests
3-
# hosts: controller
4-
# gather_facts: true
5-
# ignore_errors: false
2+
- name: Prepare Logging Tests
3+
hosts: controller
4+
gather_facts: true
5+
ignore_errors: false
66
# vars:
77
# id_rsa_path: "{{ playbook_dir }}/id_rsa.ctlplane"
88
# environment:
99
# KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
1010
# PATH: "{{ cifmw_path }}"
11-
#
12-
# tasks:
11+
vars_files:
12+
- vars/common.yml
13+
tasks:
14+
- name: Create log dir
15+
ansible.builtin.file:
16+
path: "{{ logs_dir }}/logging_local"
17+
state: directory
18+
mode: "0755"
19+
1320
# # This needs to be updated; what do we use elsewhere?
1421
# # Elsewhere, we assume that we're already logged in
1522
# - name: "Log into OCP"
@@ -270,3 +277,11 @@
270277
- name: "Run Services tests"
271278
ansible.builtin.import_role:
272279
name: common
280+
281+
- name: Include report result
282+
hosts: controller
283+
tasks:
284+
- ansible.builtin.include_tasks:
285+
file: report_result.yml
286+
vars:
287+
test_dir: "{{ logs_dir }}/logging_local"

0 commit comments

Comments
 (0)