blob: ce30af39f377ed0932f9037fd06b72d8e4822879 (
plain)
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
|
#!/bin/sh
# username="test_$RANDOM"
# email="$username@example.com"
# password=$(echo $RANDOM | base64)
# signup () {
# curl -X POST \
# -H "Content-Type: application/json" \
# -d "{
# \"username\": \"$username\",
# \"email\": \"$email\",
# \"password\": \"$password\"
# }" \
# localhost:5000/api/auth/signup
# }
# login_username () {
# curl -X POST \
# -H "Content-Type: application/json" \
# -d "{
# \"email\": \"$username\",
# \"password\": \"$password\"
# }" \
# localhost:5000/api/auth/login
# }
# login_email () {
# curl -X POST \
# -H "Content-Type: application/json" \
# -d "{
# \"email\": \"$email\",
# \"password\": \"$password\"
# }" \
# localhost:5000/api/auth/login
# }
# user_info () {
# curl -X GET \
# -H "Content-Type: application/json" \
# -d '{
# "username": "loekaars"
# }' \
# localhost:5000/user/info
# }
# login_token () {
# curl -X POST \
# -H "Content-Type: application/json" \
# -d "{
# \"user_id\": \"2dc82ac3-e3c1-4a0e-b024-c6224107ff59\",
# \"token\": \"beda7848ac601d80ac88bfc629d13ed6dc27dabd29a3e1db5b2a93839bd6dd3c79e25ea939d13789fdec74edafa18b4040d39729c282f28f82f366d44b5455cd8e3c28b59da2c397ff4e637a99c3ccbea4af00828ab7094b5285b8f900e31e833b5e55994e68e3de7e7fbeb02adc74231f63173e84f7e22aef97f9c7bfd920a1\"
# }" \
# localhost:5000/api/auth/token
# }
# new_game () {
# curl -X POST \
# -H "Content-Type: application/json" \
# -d '{
# "user_id": "4577c119-c768-4ad5-afec-b53a5c19baf4",
# "settings": {
# "ranked": true,
# "timelimit": {
# "minutes": 5,
# "seconds": 30,
# "enabled": true,
# "shared": "false"
# }
# }
# }' \
# localhost:5000/game/new
# }
random_game_1 () {
curl -X POST \
-H "Content-Type: application/json" \
-d '{ "user_id": "e6162c82-3e60-4479-ac96-a1af508e49c4" }' \
localhost:2080/api/game/random
}
random_game_2 () {
curl -X POST \
-H "Content-Type: application/json" \
-d '{ "user_id": "de960155-7d58-46b3-a4f6-7d33aa034ad9" }' \
localhost:2080/api/game/random
}
sleep 3
random_game_1
sleep 10
random_game_2
|