summaryrefslogtreecommitdiff
path: root/subplot/server.yaml
blob: ac45cacd9a42d189865aeea74c304f6be19b1888 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
- given: "a running chunk server"
  impl:
    python:
      function: start_chunk_server
      cleanup: stop_chunk_server

- given: "a running chunk server with environment {env:text}"
  impl:
    python:
      function: start_chunk_server
      cleanup: stop_chunk_server

- when: "the chunk server is stopped"
  impl:
    python:
      function: stop_chunk_server

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

- when: "I GET /v1/chunks/<{var}>"
  impl:
    python:
      function: get_chunk_via_var

- when: "I try to GET /v1/chunks/{chunk_id}"
  impl:
    python:
      function: get_chunk_by_id

- when: "I GET /v1/chunks?label={sha}"
  regex: false
  impl:
    python:
      function: find_chunks_with_label

- when: "I DELETE /v1/chunks/<{var}>"
  impl:
    python:
      function: delete_chunk_via_var

- when: "I try to DELETE /v1/chunks/{chunk_id}"
  impl:
    python:
      function: delete_chunk_by_id

- when: "chunk <{chunk_id}> on chunk server is replaced by an empty file"
  impl:
    python:
      function: make_chunk_file_be_empty

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

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

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

- then: "the JSON body matches (?P<wanted>.*)"
  regex: true
  impl:
    python:
      function: json_body_matches

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

- then: "server has {n:int} chunks"
  impl:
    python:
      function: server_has_n_chunks

- then: chunk server's stderr contains "{wanted:text}"
  impl:
    python:
      function: server_stderr_contains

- then: chunk server's stderr doesn't contain "{wanted:text}"
  impl:
    python:
      function: server_stderr_doesnt_contain