forked from ukchukx/rocksdb-rust
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplan.yaml
63 lines (54 loc) · 1.26 KB
/
plan.yaml
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
---
base: 'http://127.0.0.1:5050'
iterations: 2000
concurrency: 8
rampup: 4
plan:
- name: Generate some random sha1 to use as key
exec:
command: "echo ${RANDOM}${RANDOM}$(date +%s) | sha1sum | tr -d -"
assign: sha
- name: Try fetch unavailable data
assign: notfound
request:
url: /api/{{ sha }}
- name: Assert request response code 404
assert:
key: notfound.status
value: 404
- name: POST dummy JSON data
assign: post
request:
url: /api/{{ sha }}
method: POST
body: '{{ item.txn }}'
headers:
Content-Type: 'application/json'
with_items_from_csv:
file_name: testdata.csv
quote_char: "\'"
- name: Assert request response code 200
assert:
key: post.status
value: 200
- name: Try fetch existing data
assign: get
headers:
Content-Type: 'application/json'
request:
url: /api/{{ sha }}
- name: Assert request response code
assert:
key: get.status
value: 200
- name: DELETE created entry
assign: delete
request:
url: /api/{{ sha }}
method: DELETE
headers:
Content-Type: 'application/json'
- name: Assert request response code
assert:
key: delete.status
value: 200