Skip to content

Commit

Permalink
feat: tests/registrations.yaml: Add an additional failure pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomh committed Mar 2, 2023
1 parent 0c7045a commit c3cfb8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playbooks/tests/registrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@
ansible.builtin.shell: |
cp -p "{{ clients_yaml_cmd_log }}" "{{ clients_yaml_cmd_retries_log }}"
while (( "$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' {{ clients_yaml_cmd_retries_log }})" != 0 )); do
num_fails=$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' {{ clients_yaml_cmd_retries_log }})
while (( "$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' -e '"ERROR: ' {{ clients_yaml_cmd_retries_log }})" != 0 )); do
num_fails=$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' -e '"ERROR: ' {{ clients_yaml_cmd_retries_log }})
iter_clients_yaml_cmd_retries_log="{{ clients_yaml_cmd_retries_log }}.${num_fails}"
cp -p "{{ clients_yaml_cmd_retries_log }}" $iter_clients_yaml_cmd_retries_log
Expand All @@ -213,8 +213,8 @@
CLIENT_IP_LIST+="$client_ip,"
done
for client_ip in $(grep -e ^'ok:' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' $iter_clients_yaml_cmd_retries_log |
uniq | grep -B1 -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' |
for client_ip in $(grep -e ^'ok:' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' -e '"ERROR: ' $iter_clients_yaml_cmd_retries_log |
uniq | grep -B1 -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' -e '"ERROR: ' |
awk -F'[' '/ok:/ {print $2}' | cut -d']' -f1); do
CLIENT_IP_LIST+="$client_ip,"
done
Expand Down

0 comments on commit c3cfb8b

Please sign in to comment.