@@ -5,16 +5,14 @@ testcases:
5
5
steps :
6
6
- type : http
7
7
method : POST
8
- url : http://localhost:8081/reset
9
- - type : http
10
- method : POST
11
- url : http://localhost:8081/mocks
8
+ url : http://localhost:8081/mocks?reset=true
12
9
headers :
13
10
Content-Type : " application/x-yaml"
14
11
bodyFile : ../data/basic_mock.yml
15
12
assertions :
16
13
- result.statuscode ShouldEqual 200
17
14
- result.bodyjson.message ShouldEqual "Mocks registered successfully"
15
+
18
16
- type : http
19
17
method : GET
20
18
url : http://localhost:8081/mocks
@@ -26,6 +24,7 @@ testcases:
26
24
vars :
27
25
mock_id :
28
26
from : result.bodyjson.bodyjson0.state.id
27
+
29
28
- type : http
30
29
method : GET
31
30
url : http://localhost:8081/mocks?id={{.AddBasicMock.mock_id}}
@@ -38,22 +37,20 @@ testcases:
38
37
steps :
39
38
- type : http
40
39
method : POST
41
- url : http://localhost:8081/reset
42
- - type : http
43
- method : POST
44
- url : http://localhost:8081/mocks
40
+ url : http://localhost:8081/mocks?reset=true
45
41
headers :
46
42
Content-Type : " application/x-yaml"
47
43
bodyFile : ../data/basic_mock_list.yml
48
44
assertions :
49
45
- result.statuscode ShouldEqual 200
50
46
- result.bodyjson.message ShouldEqual "Mocks registered successfully"
47
+
51
48
- type : http
52
49
method : GET
53
50
url : http://localhost:8081/mocks
54
51
assertions :
55
52
- result.statuscode ShouldEqual 200
56
- - result.bodyjson.__len__ ShouldEqual 6
53
+ - result.bodyjson.__len__ ShouldEqual 7
57
54
58
55
# Mocks are stored as a stack
59
56
- result.bodyjson.bodyjson5.request.method.value ShouldEqual .*
@@ -67,24 +64,24 @@ testcases:
67
64
steps :
68
65
- type : http
69
66
method : POST
70
- url : http://localhost:8081/reset
71
- - type : http
72
- method : POST
73
- url : http://localhost:8081/mocks
67
+ url : http://localhost:8081/mocks?reset=true
74
68
bodyFile : ../data/basic_mock_list.yml
75
69
assertions :
76
70
- result.statuscode ShouldEqual 200
71
+
77
72
- type : http
78
73
method : GET
79
74
url : http://localhost:8081/mocks
80
75
assertions :
81
- - result.bodyjson.__len__ ShouldEqual 6
76
+ - result.bodyjson.__len__ ShouldEqual 7
77
+
82
78
- type : http
83
79
method : POST
84
80
url : http://localhost:8081/mocks?reset=true
85
81
bodyFile : ../data/basic_mock.yml
86
82
assertions :
87
83
- result.statuscode ShouldEqual 200
84
+
88
85
- type : http
89
86
method : GET
90
87
url : http://localhost:8081/mocks
@@ -95,16 +92,14 @@ testcases:
95
92
steps :
96
93
- type : http
97
94
method : POST
98
- url : http://localhost:8081/reset
99
- - type : http
100
- method : POST
101
- url : http://localhost:8081/mocks
95
+ url : http://localhost:8081/mocks?reset=true
102
96
headers :
103
97
Content-Type : " application/x-yaml"
104
98
bodyFile : ../data/matcher_mock_list.yml
105
99
assertions :
106
100
- result.statuscode ShouldEqual 200
107
101
- result.bodyjson.message ShouldEqual "Mocks registered successfully"
102
+
108
103
- type : http
109
104
method : GET
110
105
url : http://localhost:8081/mocks
@@ -128,16 +123,14 @@ testcases:
128
123
steps :
129
124
- type : http
130
125
method : POST
131
- url : http://localhost:8081/reset
132
- - type : http
133
- method : POST
134
- url : http://localhost:8081/mocks
126
+ url : http://localhost:8081/mocks?reset=true
135
127
headers :
136
128
Content-Type : " application/x-yaml"
137
129
bodyFile : ../data/dynamic_mock_list.yml
138
130
assertions :
139
131
- result.statuscode ShouldEqual 200
140
132
- result.bodyjson.message ShouldEqual "Mocks registered successfully"
133
+
141
134
- type : http
142
135
method : GET
143
136
url : http://localhost:8081/mocks
@@ -155,16 +148,14 @@ testcases:
155
148
steps :
156
149
- type : http
157
150
method : POST
158
- url : http://localhost:8081/reset
159
- - type : http
160
- method : POST
161
- url : http://localhost:8081/mocks
151
+ url : http://localhost:8081/mocks?reset=true
162
152
headers :
163
153
Content-Type : " application/x-yaml"
164
154
bodyFile : ../data/proxy_mock_list.yml
165
155
assertions :
166
156
- result.statuscode ShouldEqual 200
167
157
- result.bodyjson.message ShouldEqual "Mocks registered successfully"
158
+
168
159
- type : http
169
160
method : GET
170
161
url : http://localhost:8081/mocks
0 commit comments