---
"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: |
              /^(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,}$/


---
"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,}/


Fix stack overflow in _cat/recovery test.
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.
