-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfake.yaml
94 lines (81 loc) · 1.45 KB
/
fake.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
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
# error, info, debug
server:
host: "0.0.0.0"
port: "12000"
mode: "debug"
handlers:
- path: "/ping"
methods:
- "GET"
must_params:
- "q"
must_kv_params:
fields: "uniqueId"
response:
status_code: 200
delay: 0
source: "text"
headers:
"content-type": "text/plain"
args:
content: "pong"
- path: "/ping"
methods:
- "GET"
must_params:
- "q"
- "delay"
must_kv_params:
fields: "uniqueId"
response:
status_code: 200
delay: 5
source: "text"
headers:
"content-type": "text/plain"
args:
content: "pong"
- path: "/ping"
methods:
- "GET"
must_params:
- "bad"
must_kv_params:
response:
status_code: 500
source: "text"
args:
content: "pong"
- path: "/failure"
methods:
- "GET"
must_params:
must_kv_params:
failure:
percentage: 75
http_status: 500
response:
status_code: 200
source: "text"
args:
content: "pong"
- path: "/reflect"
methods:
- "POST"
must_params:
must_kv_params:
response:
status_code: 200
source: "reflect"
- path: "/nofail"
methods:
- "GET"
must_params:
must_kv_params:
response:
ignore_params:
- "bad_status"
status_code: 200
source: "text"
args:
content: "pong"