-
Notifications
You must be signed in to change notification settings - Fork 0
/
test2.sh
executable file
·71 lines (62 loc) · 2.39 KB
/
test2.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
echo "Account 501 and Account 502 transfering to Account 503 at same time"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="501"' \
--form 'to_account_no="503"' \
--form 'amount="2"'&
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="502"' \
--form 'to_account_no="503"' \
--form 'amount="7"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Account 501 and Account 502 transfering to Account 503 at same time"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="501"' \
--form 'to_account_no="503"' \
--form 'amount="53"'&
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="502"' \
--form 'to_account_no="503"' \
--form 'amount="5"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Self Transfer"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="502"' \
--form 'to_account_no="502"' \
--form 'amount="4"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Insufficient Balance"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="502"' \
--form 'to_account_no="501"' \
--form 'amount="80000"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Invalid from A/C"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="6"' \
--form 'to_account_no="501"' \
--form 'amount="80000"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Invalid from A/C"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="6"' \
--form 'to_account_no="501"' \
--form 'amount="80"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Invalid from A/C"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="501"' \
--form 'to_account_no="9"' \
--form 'amount="8"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "Invalid to A/C"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="501"' \
--form 'to_account_no="4"' \
--form 'amount="80"'&
read -n 1 -r -s -p $'Press enter to continue...\n'
echo "-ve Account"
curl --location --request POST 'http://127.0.0.1:5000/transfer' \
--form 'from_account_no="501"' \
--form 'to_account_no="502"' \
--form 'amount="-80000"'&
read -n 1 -r -s -p $'Press enter to continue...\n'