From 891d0cb87ad98052cbd26692b61f31da9902dee1 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Wed, 14 Apr 2021 00:09:45 +0300 Subject: Revise tests --- tester.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tester.sh') diff --git a/tester.sh b/tester.sh index 44bd8de..0323dcb 100755 --- a/tester.sh +++ b/tester.sh @@ -96,3 +96,26 @@ curl localhost:8080/transaction printf "\n\nShould have only one block\n\n" curl localhost:8080/block + +## new registration request +## this student can hold a gradecoin account +curl --request POST \ + --header 'Content-Type: application/json' \ + --data '{ + "student_id": "e254275", + "public_key": "not_implemented_yet" + }' \ + http://localhost:8080/register + +curl --request POST \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aGEiOiIyYjY0OGZmYWI1ZDlhZjFkNWQ1ZmMwNTJmYzllNTFiODgyZmM0ZmIwYzk5ODYwOGM5OTIzMmY5MjgyMDAwMDAwIiwiaWF0IjoxNjE4MzYwNjQxLCJleHAiOjE3MTgyNjA2NDF9.P5L_uZ9lOhRZCbsG9GDXn_rmZat3dP9Y2lbk8GY4Kg4pOxJIklBUxot-TtJzB0vEJFcjnxVnT2lFLCgfdQLHTJvURiW0KRHi94e1Kj8aDXxJ0qjlq4-c1JCZnAIbDpvkFtHNKz04yfyeSR2htJ6kOjlqVpeUhLVokHhi1x-ZUZZSpeGnlIXgi-AcmkEoyOypZGSZgQ1hjID2f18zgfbshgPK4Dr0hiN36wYMB0y0YiikRbvDuGgDzRLN2nitih46-CXTGZMqIRz3eAfM2wuUSH1yhdKi5_vavz8L3EPVCGMO-CKlPUDkYA-duQZf_q3tG2fkdaFlTAcCik_kVMprdw' \ + --data '{ + "transaction_list": [ + "e254275" + ], + "nonce": 2151653522, + "timestamp": "2021-04-13T23:38:00", + "hash": "000000a996ab57b3aff1ad1d009767278f819895b28ef860a8ec3b6560d6ed0e" +}' \ + http://localhost:8080/block -- cgit v1.2.3-70-g09d2