|
|
212d59 |
From 90952a1bb7ddbba45ed8cbd62e6a8e0edb6f6148 Mon Sep 17 00:00:00 2001
|
|
|
212d59 |
From: Noriko Hosoi <nhosoi@redhat.com>
|
|
|
212d59 |
Date: Tue, 25 Aug 2020 09:05:03 -0700
|
|
|
212d59 |
Subject: [PATCH 1/7] Test playbooks enhancement
|
|
|
212d59 |
|
|
|
212d59 |
In the code to check the log message is successfully logged or not
|
|
|
212d59 |
in the /var/log/messages file, adding "until: __result is success"
|
|
|
212d59 |
and waiting up to 5 seconds.
|
|
|
212d59 |
---
|
|
|
212d59 |
tests/tests_basics_files.yml | 4 ++++
|
|
|
212d59 |
tests/tests_basics_files2.yml | 4 ++++
|
|
|
212d59 |
tests/tests_basics_files_forwards.yml | 4 ++++
|
|
|
212d59 |
tests/tests_basics_files_log_dir.yml | 4 ++++
|
|
|
212d59 |
tests/tests_basics_forwards_implicit_files.yml | 4 ++++
|
|
|
212d59 |
tests/tests_combination.yml | 4 ++++
|
|
|
212d59 |
tests/tests_combination2.yml | 4 ++++
|
|
|
212d59 |
tests/tests_imuxsock_files.yml | 4 ++++
|
|
|
212d59 |
8 files changed, 32 insertions(+)
|
|
|
212d59 |
|
|
|
212d59 |
diff --git a/tests/tests_basics_files.yml b/tests/tests_basics_files.yml
|
|
|
212d59 |
index 080890f..87950d8 100644
|
|
|
212d59 |
--- a/tests/tests_basics_files.yml
|
|
|
212d59 |
+++ b/tests/tests_basics_files.yml
|
|
|
212d59 |
@@ -74,4 +74,8 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 {{ __default_system_log }}
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
diff --git a/tests/tests_basics_files2.yml b/tests/tests_basics_files2.yml
|
|
|
212d59 |
index ae61be2..094b125 100644
|
|
|
212d59 |
--- a/tests/tests_basics_files2.yml
|
|
|
212d59 |
+++ b/tests/tests_basics_files2.yml
|
|
|
212d59 |
@@ -99,4 +99,8 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 "{{ __default_system_log }}"
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
diff --git a/tests/tests_basics_files_forwards.yml b/tests/tests_basics_files_forwards.yml
|
|
|
212d59 |
index f43b8eb..d08a207 100644
|
|
|
212d59 |
--- a/tests/tests_basics_files_forwards.yml
|
|
|
212d59 |
+++ b/tests/tests_basics_files_forwards.yml
|
|
|
212d59 |
@@ -105,6 +105,10 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 '{{ __default_system_log }}'
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check if the forwarding config exists
|
|
|
212d59 |
diff --git a/tests/tests_basics_files_log_dir.yml b/tests/tests_basics_files_log_dir.yml
|
|
|
212d59 |
index ca900b8..f5ca266 100644
|
|
|
212d59 |
--- a/tests/tests_basics_files_log_dir.yml
|
|
|
212d59 |
+++ b/tests/tests_basics_files_log_dir.yml
|
|
|
212d59 |
@@ -78,6 +78,10 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the files output config that the path is {{ logging_system_log_dir }}/messages
|
|
|
212d59 |
command: /bin/grep '\*.info;mail.none;authpriv.none;cron.none.*{{ logging_system_log_dir }}/messages' {{ __test_files_conf }}
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ logging_system_log_dir }}/messages
|
|
|
212d59 |
diff --git a/tests/tests_basics_forwards_implicit_files.yml b/tests/tests_basics_forwards_implicit_files.yml
|
|
|
212d59 |
index 6744d53..1d23911 100644
|
|
|
212d59 |
--- a/tests/tests_basics_forwards_implicit_files.yml
|
|
|
212d59 |
+++ b/tests/tests_basics_forwards_implicit_files.yml
|
|
|
212d59 |
@@ -92,6 +92,10 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check if the test message is in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 '{{ __default_system_log }}'
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
|
|
|
212d59 |
- name: Get the forwarding config stat
|
|
|
212d59 |
diff --git a/tests/tests_combination.yml b/tests/tests_combination.yml
|
|
|
212d59 |
index 99d57dc..8aae855 100644
|
|
|
212d59 |
--- a/tests/tests_combination.yml
|
|
|
212d59 |
+++ b/tests/tests_combination.yml
|
|
|
212d59 |
@@ -129,6 +129,10 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 '{{ __default_system_log }}'
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
|
|
|
212d59 |
- name: Generated a file to check severity_and_facility
|
|
|
212d59 |
diff --git a/tests/tests_combination2.yml b/tests/tests_combination2.yml
|
|
|
212d59 |
index 5d49a57..5fe43cb 100644
|
|
|
212d59 |
--- a/tests/tests_combination2.yml
|
|
|
212d59 |
+++ b/tests/tests_combination2.yml
|
|
|
212d59 |
@@ -138,6 +138,10 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 '{{ __default_system_log }}'
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the forwarding config stat
|
|
|
212d59 |
diff --git a/tests/tests_imuxsock_files.yml b/tests/tests_imuxsock_files.yml
|
|
|
212d59 |
index 2d6840d..35db253 100644
|
|
|
212d59 |
--- a/tests/tests_imuxsock_files.yml
|
|
|
212d59 |
+++ b/tests/tests_imuxsock_files.yml
|
|
|
212d59 |
@@ -76,4 +76,8 @@
|
|
|
212d59 |
|
|
|
212d59 |
- name: Check the test log message in {{ __default_system_log }}
|
|
|
212d59 |
command: /bin/grep testMessage0000 "{{ __default_system_log }}"
|
|
|
212d59 |
+ register: __result
|
|
|
212d59 |
+ until: __result is success
|
|
|
212d59 |
+ retries: 5
|
|
|
212d59 |
+ delay: 1
|
|
|
212d59 |
changed_when: false
|
|
|
212d59 |
--
|
|
|
212d59 |
2.26.2
|
|
|
212d59 |
|