Andrew Selden f739abe89e Fix stack overflow in _cat/recovery test.
This fixes a stack overflow in the test for the _cat/recovery API.
The regular expression that tests the response body was modified to
handle large responses properly.
2014-05-07 13:58:00 -07:00

35 lines
786 B
YAML
Executable File

---
"Test cat recovery output":
- do:
cat.recovery: {}
- match:
$body: |
/^$/
- do:
index:
index: index1
type: type1
id: 1
body: { foo: bar }
refresh: true
- do:
cluster.health:
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,}/