forked from peterdietz/dspace-rest-requests
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest_all_requests.sh
executable file
·41 lines (36 loc) · 1.06 KB
/
test_all_requests.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
DSPACEURL="https://localhost:8443/rest"
EMAIL="[email protected]"
PASSWORD="admin"
VERSION="6"
TOKEN=$(./login.sh $DSPACEURL ${EMAIL} ${PASSWORD} $VERSION)
for R in $(ls requests/POST_*); do
for T in json xml; do
echo "EXECUTING REQUEST: $R ($T):"
echo "--------------------------------------------"
./send_request.sh $DSPACEURL $TOKEN $R $T $VERSION
echo ""
echo "--------------------------------------------"
echo ""
done
done
for R in $(ls requests/PUT_*); do
for T in json xml; do
echo "EXECUTING REQUEST: $R ($T):"
echo "--------------------------------------------"
./send_request.sh $DSPACEURL $TOKEN $R $T $VERSION
echo ""
echo "--------------------------------------------"
echo ""
done
done
for R in $(ls requests/UPLOAD_*); do
for T in json xml; do
echo "EXECUTING REQUEST: $R ($T):"
echo "--------------------------------------------"
./send_file.sh $DSPACEURL $TOKEN $R $T $VERSION
echo ""
echo "--------------------------------------------"
echo ""
done
done
./logout.sh ${TOKEN}