Skip to content

Commit f0747ea

Browse files
committed
test: add Postman collection for Matching Service
1 parent 28d296e commit f0747ea

File tree

1 file changed

+309
-0
lines changed

1 file changed

+309
-0
lines changed
Lines changed: 309 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,309 @@
1+
{
2+
"info": {
3+
"_postman_id": "0c4aec0a-cac7-405f-9389-caef705f2f5f",
4+
"name": "PeerPrep",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
6+
"_exporter_id": "28290366"
7+
},
8+
"item": [
9+
{
10+
"name": "Check Health Status",
11+
"request": {
12+
"method": "GET",
13+
"header": [],
14+
"url": {
15+
"raw": "{{url}}/health",
16+
"host": [
17+
"{{url}}"
18+
],
19+
"path": [
20+
"health"
21+
]
22+
}
23+
},
24+
"response": []
25+
},
26+
{
27+
"name": "Request Match",
28+
"request": {
29+
"method": "POST",
30+
"header": [],
31+
"body": {
32+
"mode": "raw",
33+
"raw": "{\n \"user_id\": \"user_1\",\n \"difficulty\": \"easy\",\n \"topic\": \"arrays\",\n \"language\": \"python\"\n}",
34+
"options": {
35+
"raw": {
36+
"language": "json"
37+
}
38+
}
39+
},
40+
"url": {
41+
"raw": "{{url}}/match/request",
42+
"host": [
43+
"{{url}}"
44+
],
45+
"path": [
46+
"match",
47+
"request"
48+
]
49+
}
50+
},
51+
"response": [
52+
{
53+
"name": "No peer yet",
54+
"originalRequest": {
55+
"method": "POST",
56+
"header": [],
57+
"body": {
58+
"mode": "raw",
59+
"raw": "{\n \"user_id\": \"user_1\",\n \"difficulty\": \"easy\",\n \"topic\": \"arrays\",\n \"language\": \"python\"\n}",
60+
"options": {
61+
"raw": {
62+
"language": "json"
63+
}
64+
}
65+
},
66+
"url": {
67+
"raw": "{{url}}/match/request",
68+
"host": [
69+
"{{url}}"
70+
],
71+
"path": [
72+
"match",
73+
"request"
74+
]
75+
}
76+
},
77+
"status": "OK",
78+
"code": 200,
79+
"_postman_previewlanguage": null,
80+
"header": [
81+
{
82+
"key": "date",
83+
"value": "Thu, 25 Sep 2025 06:12:23 GMT"
84+
},
85+
{
86+
"key": "server",
87+
"value": "uvicorn"
88+
},
89+
{
90+
"key": "content-length",
91+
"value": "58"
92+
},
93+
{
94+
"key": "content-type",
95+
"value": "application/json"
96+
}
97+
],
98+
"cookie": [],
99+
"body": "{\n \"success\": true,\n \"peer_id\": null,\n \"message\": \"Added to queue\"\n}"
100+
},
101+
{
102+
"name": "Peer found",
103+
"originalRequest": {
104+
"method": "POST",
105+
"header": [],
106+
"body": {
107+
"mode": "raw",
108+
"raw": "{\n \"user_id\": \"user_2\",\n \"difficulty\": \"easy\",\n \"topic\": \"arrays\",\n \"language\": \"python\"\n}",
109+
"options": {
110+
"raw": {
111+
"language": "json"
112+
}
113+
}
114+
},
115+
"url": {
116+
"raw": "{{url}}/match/request",
117+
"host": [
118+
"{{url}}"
119+
],
120+
"path": [
121+
"match",
122+
"request"
123+
]
124+
}
125+
},
126+
"status": "OK",
127+
"code": 200,
128+
"_postman_previewlanguage": null,
129+
"header": [
130+
{
131+
"key": "date",
132+
"value": "Thu, 25 Sep 2025 06:40:03 GMT"
133+
},
134+
{
135+
"key": "server",
136+
"value": "uvicorn"
137+
},
138+
{
139+
"key": "content-length",
140+
"value": "58"
141+
},
142+
{
143+
"key": "content-type",
144+
"value": "application/json"
145+
}
146+
],
147+
"cookie": [],
148+
"body": "{\n \"success\": true,\n \"peer_id\": \"user_1\",\n \"message\": \"Peer found\"\n}"
149+
}
150+
]
151+
},
152+
{
153+
"name": "Cancel Match",
154+
"request": {
155+
"method": "POST",
156+
"header": [],
157+
"body": {
158+
"mode": "raw",
159+
"raw": "{\n \"user_id\": \"user_1\",\n \"difficulty\": \"easy\",\n \"topic\": \"arrays\",\n \"language\": \"python\"\n}",
160+
"options": {
161+
"raw": {
162+
"language": "json"
163+
}
164+
}
165+
},
166+
"url": {
167+
"raw": "{{url}}/match/cancel",
168+
"host": [
169+
"{{url}}"
170+
],
171+
"path": [
172+
"match",
173+
"cancel"
174+
]
175+
}
176+
},
177+
"response": [
178+
{
179+
"name": "User Removed",
180+
"originalRequest": {
181+
"method": "POST",
182+
"header": [],
183+
"body": {
184+
"mode": "raw",
185+
"raw": "{\n \"user_id\": \"user_1\",\n \"difficulty\": \"easy\",\n \"topic\": \"arrays\",\n \"language\": \"python\"\n}",
186+
"options": {
187+
"raw": {
188+
"language": "json"
189+
}
190+
}
191+
},
192+
"url": {
193+
"raw": "{{url}}/match/cancel",
194+
"host": [
195+
"{{url}}"
196+
],
197+
"path": [
198+
"match",
199+
"cancel"
200+
]
201+
}
202+
},
203+
"status": "OK",
204+
"code": 200,
205+
"_postman_previewlanguage": null,
206+
"header": [
207+
{
208+
"key": "date",
209+
"value": "Thu, 25 Sep 2025 06:12:25 GMT"
210+
},
211+
{
212+
"key": "server",
213+
"value": "uvicorn"
214+
},
215+
{
216+
"key": "content-length",
217+
"value": "62"
218+
},
219+
{
220+
"key": "content-type",
221+
"value": "application/json"
222+
}
223+
],
224+
"cookie": [],
225+
"body": "{\n \"success\": true,\n \"peer_id\": null,\n \"message\": \"Removed from queue\"\n}"
226+
},
227+
{
228+
"name": "User not in queue",
229+
"originalRequest": {
230+
"method": "POST",
231+
"header": [],
232+
"body": {
233+
"mode": "raw",
234+
"raw": "{\n \"user_id\": \"user_1\",\n \"difficulty\": \"easy\",\n \"topic\": \"arrays\",\n \"language\": \"python\"\n}",
235+
"options": {
236+
"raw": {
237+
"language": "json"
238+
}
239+
}
240+
},
241+
"url": {
242+
"raw": "{{url}}/match/cancel",
243+
"host": [
244+
"{{url}}"
245+
],
246+
"path": [
247+
"match",
248+
"cancel"
249+
]
250+
}
251+
},
252+
"status": "OK",
253+
"code": 200,
254+
"_postman_previewlanguage": null,
255+
"header": [
256+
{
257+
"key": "date",
258+
"value": "Thu, 25 Sep 2025 06:13:27 GMT"
259+
},
260+
{
261+
"key": "server",
262+
"value": "uvicorn"
263+
},
264+
{
265+
"key": "content-length",
266+
"value": "62"
267+
},
268+
{
269+
"key": "content-type",
270+
"value": "application/json"
271+
}
272+
],
273+
"cookie": [],
274+
"body": "{\n \"success\": false,\n \"peer_id\": null,\n \"message\": \"User not in queue\"\n}"
275+
}
276+
]
277+
}
278+
],
279+
"event": [
280+
{
281+
"listen": "prerequest",
282+
"script": {
283+
"type": "text/javascript",
284+
"packages": {},
285+
"requests": {},
286+
"exec": [
287+
""
288+
]
289+
}
290+
},
291+
{
292+
"listen": "test",
293+
"script": {
294+
"type": "text/javascript",
295+
"packages": {},
296+
"requests": {},
297+
"exec": [
298+
""
299+
]
300+
}
301+
}
302+
],
303+
"variable": [
304+
{
305+
"key": "url",
306+
"value": ""
307+
}
308+
]
309+
}

0 commit comments

Comments
 (0)