diff options
Diffstat (limited to 'tester.sh')
-rwxr-xr-x | tester.sh | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -2,6 +2,26 @@ | |||
2 | 2 | ||
3 | ## When in doubt just write a shell script | 3 | ## When in doubt just write a shell script |
4 | 4 | ||
5 | ## new registration request | ||
6 | ## should fail because foobar is not a student | ||
7 | curl --request POST \ | ||
8 | --header 'Content-Type: application/json' \ | ||
9 | --data '{ | ||
10 | "student_id": "foobar", | ||
11 | "public_key": "not_implemented_yet" | ||
12 | }' \ | ||
13 | http://localhost:8080/register | ||
14 | |||
15 | ## new registration request | ||
16 | ## should fail because foobar is not a student | ||
17 | curl --request POST \ | ||
18 | --header 'Content-Type: application/json' \ | ||
19 | --data '{ | ||
20 | "student_id": "e254275", | ||
21 | "public_key": "not_implemented_yet" | ||
22 | }' \ | ||
23 | http://localhost:8080/register | ||
24 | |||
5 | ## new transaction | 25 | ## new transaction |
6 | curl --request POST \ | 26 | curl --request POST \ |
7 | --header 'Content-Type: application/json' \ | 27 | --header 'Content-Type: application/json' \ |
@@ -72,4 +92,3 @@ curl localhost:8080/transaction | |||
72 | 92 | ||
73 | printf "\n\nShould have only one block\n\n" | 93 | printf "\n\nShould have only one block\n\n" |
74 | curl localhost:8080/block | 94 | curl localhost:8080/block |
75 | |||