[TEST] Fixed pathological regex in cat.recovery

Fixes #6070
This commit is contained in:
Clinton Gormley 2014-05-08 14:15:47 +02:00
parent d7c05e5924
commit eb6d3e3eb3
1 changed files with 18 additions and 10 deletions

View File

@ -20,15 +20,23 @@
wait_for_status: yellow
- do:
cat.recovery: {}
- match:
$body: |
/(?m)^(index1 \s+ \d+ \s+ \d+ \s+
(gateway|replica|snapshot|relocating) \s+
(init|index|start|translog|finalize|done) \s+
([-\w/.])+ \s+
([-\w/.])+ \s+
([-\w/.])+ \s+
([-\w/.])+ \s+
\d+ \s+ \d+\.\d+\% \s+
\d+ \s+ \d+\.\d+\% \s*)${1,}/
/^
( index1 \s+
\d \s+ # shard
\d+ \s+ # time
(gateway|replica|snapshot|relocating) \s+ # type
(init|index|start|translog|finalize|done) \s+ # stage
[-\w./]+ \s+ # source_host
[-\w./]+ \s+ # target_host
[-\w./]+ \s+ # repository
[-\w./]+ \s+ # snapshot
\d+ \s+ # files
\d\.\d+% \s+ # files_percent
\d+ \s+ # bytes
\d\.\d+% \s+ # bytes_percent
\n
)+
$/