-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·39 lines (32 loc) · 889 Bytes
/
test.sh
File metadata and controls
executable file
·39 lines (32 loc) · 889 Bytes
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
#!/bin/bash
BASE=localhost:1999
apps=`curl -s \
-H "Content-Type: application/json" \
localhost:1999/apps`
echo 'Apps:'
iojs -e "console.log($apps.map(function(v){ return v.name } ).join(', '))"
echo
disabled=`curl -s \
-H "Content-Type: application/json" \
localhost:1999/disabled`
echo 'Disabled Apps:'
iojs -e "console.log($disabled.map(function(v){ return v.name } ).join(', '))"
echo
curl -i \
-H "Content-Type: application/json" \
-d '{
"email": "'$(date +%s)'@klouds.io",
"password": "TEST123"
}' \
http://localhost:1999/register \
http://localhost:1999/login
# echo -n -e "\nPOST /login: \t--\t"
# curl --silent -i localhost:1999/login \
# -d email=test@klouds.io \
# -d password=test \
# --header "Content-Type:application/json"
# # | head -1
#
# echo -n -e "\nGET /subscribe: \t--\t"
# curl --silent -i localhost:1999/subscribe\
# | head -1