summaryrefslogtreecommitdiff
path: root/subplot/obnam.yaml
blob: 7acf5812979f42b6eff7c27492a3bf87b5fd248f (plain)
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
- given: "a chunk server"
  function: start_chunk_server
  cleanup: stop_chunk_server

- given: >
    a file (?P<filename>\\S+) containing "(?P<data>.*)"
  regex: true
  function: create_file_with_given_data

- given: "a file {filename} containing some random data"
  function: create_file_with_random_data

- when: "I POST (?P<filename>\\S+) to (?P<path>\\S+), with (?P<header>\\S+): (?P<json>.*)"
  regex: true
  function: post_file

- when: "I GET /chunks/<{var}>"
  function: get_chunk

- then: "HTTP status code is {status}"
  function: status_code_is

- then: "{header} is {value}"
  function: header_is

- then: "the JSON body has a field {field}, henceforth {var}"
  function: remember_json_field

- then: "the body matches file {filename}"
  function: body_matches_file