Ver Fonte

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.
Andrew Selden há 11 anos atrás
pai
commit
f739abe89e
1 ficheiros alterados com 9 adições e 9 exclusões
  1. 9 9
      rest-api-spec/test/cat.recovery/10_basic.yaml

+ 9 - 9
rest-api-spec/test/cat.recovery/10_basic.yaml

@@ -22,13 +22,13 @@
       cat.recovery: {}
   - match:
       $body: |
-              /^(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+ \n?)
-               {1,}$/
+              /(?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,}/