-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_example.sh
executable file
·92 lines (84 loc) · 3.81 KB
/
test_example.sh
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
#!/bin/bash
PORT=$1
echo ">Basic ping test: "
wget -qO- "http://localhost:${PORT}/ping"
echo ""
echo ">Adding candidate Carl"
wget -qO- "http://localhost:${PORT}/api/user/" \
--header='Content-Type:application/json' \
--post-data='{"name": "Carl", "mail": "[email protected]", "type": "candidate"}'
echo ""
echo ">Adding candidate Ines"
wget -qO- "http://localhost:${PORT}/api/user/" \
--header='Content-Type:application/json' \
--post-data='{"name": "Ines", "mail": "[email protected]", "type": "interviewer"}'
echo ""
echo ">Adding candidate Ingrid"
wget -qO- "http://localhost:${PORT}/api/user/" \
--header='Content-Type:application/json' \
--post-data='{"name": "Ingrid", "mail": "[email protected]", "type": "interviewer"}'
echo ""
echo ">Adding Carl's slots"
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Carl", "week":33, "day": "monday", "hour_start":9, "hour_end":10}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Carl", "week":33, "day": "tuesday", "hour_start":9, "hour_end":10}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Carl", "week":33, "day": "wednesday", "hour_start":9, "hour_end":10}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Carl", "week":33, "day": "thursday", "hour_start":9, "hour_end":10}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Carl", "week":33, "day": "friday", "hour_start":9, "hour_end":10}'
echo ""
echo ">Adding Ines's slots"
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ines", "week":33, "day": "monday", "hour_start":9, "hour_end":16}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ines", "week":33, "day": "tuesday", "hour_start":9, "hour_end":16}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ines", "week":33, "day": "wednesday", "hour_start":9, "hour_end":16}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ines", "week":33, "day": "thursday", "hour_start":9, "hour_end":16}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ines", "week":33, "day": "friday", "hour_start":9, "hour_end":16}'
echo ""
echo ">Adding Ingrids's slots"
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ingrid", "week":33, "day": "monday", "hour_start":12, "hour_end":18}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ingrid", "week":33, "day": "tuesday", "hour_start":9, "hour_end":12}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ingrid", "week":33, "day": "wednesday", "hour_start":12, "hour_end":18}'
echo ""
wget -qO- "http://localhost:${PORT}/api/slots/" \
--header='Content-Type:application/json' \
--post-data='{"name":"Ingrid", "week":33, "day": "thursday", "hour_start":9, "hour_end":12}'
echo ""
echo ">See possible slots for meeting with Carl, Ines and Ingrid"
wget -qO- "http://localhost:${PORT}/api/schedule/" \
--header='Content-Type:application/json' \
--method=GET \
--body-data='{"candidate": "Carl", "interviewers": "Ines,Ingrid"}'