File: poll.yaml

package info (click to toggle)
python-gabbi 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 972 kB
  • sloc: python: 3,788; makefile: 62; sh: 35
file content (50 lines) | stat: -rw-r--r-- 1,238 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Test polling until a desired response.
#

tests:

    # This will attempt /poller up to 8 times waiting for a status
    # 200, waiting one second between attempts. If the test passes
    # during any attempt then we move on to the next test.
    # If no pass happens, the last failure is raised as the
    # assertion failure.
    - name: poller
      url: /poller
      poll:
          delay: .01
          count: 8

    # This one we expect to fail because /poller in SimpleWSGI only
    # counts up to five attempts.
    - name: poller fail
      url: /poller
      xfail: True
      poll:
          delay: .01
          count: 3

    # Confirm that $LOCATION and $RESPONSE behave in poll.
    - name: create a thing
      url: /poller?count=2&x=1&y=2&z=3.4
      method: POST
      request_headers:
          content-type: application/json
      poll:
          count: 3
          delay: .01
      response_json_paths:
          $.x[0]: "1"
          $.y[0]: "2"
          $.z[0]: "3.4"


    - name: loop location
      url: $LOCATION
      verbose: True
      poll:
          count: $RESPONSE['$.z[0]']
          delay: .01
      response_json_paths:
          $.x[0]: $RESPONSE['$.x[0]']
          $.y[0]: $RESPONSE['$.y[0]']