-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtest.sh
executable file
·72 lines (57 loc) · 2.59 KB
/
test.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
71
72
#!/bin/bash
ORCID_SERVICE_PORT=8181
ORG_SERVICE_PORT=8281
EDU_SERVICE_PORT=8381
do_common() {
echo
echo
echo "organization | org-service"
echo "curl --location --request GET \"http://localhost:${ORG_SERVICE_PORT}/api/v1/org/organization/ufrn.br\""
curl --location --request GET "http://localhost:${ORG_SERVICE_PORT}/api/v1/org/organization/ufrn.br"
echo
echo
echo "researcher | org-service"
echo "curl --location --request POST \"http://localhost:${ORG_SERVICE_PORT}/api/v1/org/organization/researcher/ufrn.br\" --header 'Content-Type: application/json' --data-raw '{ \"orcid\": \"0000-0002-5467-6458\" }'"
curl --location --request POST "http://localhost:${ORG_SERVICE_PORT}/api/v1/org/organization/researcher/ufrn.br" \
--header 'Content-Type: application/json' \
--data-raw '{
"orcid": "0000-0002-5467-6458"
}'
echo
echo
echo "organization | org-service"
echo "curl --location --request GET \"http://localhost:${ORG_SERVICE_PORT}/api/v1/org/organization/ufrn.br\""
curl --location --request GET "http://localhost:${ORG_SERVICE_PORT}/api/v1/org/organization/ufrn.br"
echo
echo
echo "organization | edu-service"
echo "curl --location --request GET \"http://localhost:${EDU_SERVICE_PORT}/api/v1/edu/organization/ufrn.br\""
curl --location --request GET "http://localhost:${EDU_SERVICE_PORT}/api/v1/edu/organization/ufrn.br"
echo
echo
}
do_local() {
echo
echo "organization | orcid-service"
echo "curl --location --request GET \"http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/active\""
curl --location --request GET "http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/active"
echo
echo
echo "organization | orcid-service"
echo "curl --location --request GET \"http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/researcher/0000-0002-2102-8577\""
curl --location --request GET "http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/researcher/0000-0002-2102-8577"
do_common
}
do_docker() {
echo
echo "organization | orcid-service"
echo "curl --location --request GET \"http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/active\" -> change port to dynamically assigned from Docker"
# curl --location --request GET "http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/active"
echo
echo
echo "organization | orcid-service"
echo "curl --location --request GET \"http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/researcher/0000-0002-2102-8577\" -> change port to dynamically assigned from Docker"
# curl --location --request GET "http://localhost:${ORCID_SERVICE_PORT}/api/v1/orcid/researcher/0000-0002-2102-8577"
do_common
}
. ./do.sh Test $@