Skip to content

Commit 125d6f6

Browse files
committed
feat: tests/registrations.yaml: Add an additional failure pattern
1 parent c5496fb commit 125d6f6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

playbooks/tests/registrations.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@
201201
ansible.builtin.shell: |
202202
cp -p {{ clients_yaml_cmd_log }} {{ clients_yaml_cmd_retries_log }}
203203
204-
while (( "$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' {{ clients_yaml_cmd_retries_log }})" != 0 )); do
205-
num_fails=$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' {{ clients_yaml_cmd_retries_log }})
204+
while (( "$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ {{ clients_yaml_cmd_retries_log }})" != 0 )); do
205+
num_fails=$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ {{ clients_yaml_cmd_retries_log }})
206206
iter_clients_yaml_cmd_retries_log={{ clients_yaml_cmd_retries_log }}.${num_fails}
207207
208208
cp -p {{ clients_yaml_cmd_retries_log }} $iter_clients_yaml_cmd_retries_log
@@ -213,8 +213,9 @@
213213
CLIENT_IP_LIST+="$client_ip,"
214214
done
215215
216-
for client_ip in $(grep -e ^'ok:' -e ^' "Traceback ' -e ^' "curl: ' $iter_clients_yaml_cmd_retries_log |
217-
uniq | grep -B1 -e ' "Traceback ' -e ' "curl: ' | awk -F'[' '/ok:/ {print $2}' | cut -d']' -f1); do
216+
for client_ip in $(grep -e ^'ok:' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ $iter_clients_yaml_cmd_retries_log |
217+
uniq | grep -B1 -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ |
218+
awk -F'[' '/ok:/ {print $2}' | cut -d']' -f1); do
218219
CLIENT_IP_LIST+="$client_ip,"
219220
done
220221

0 commit comments

Comments
 (0)