Skip to content

Commit 9c98407

Browse files
authored
Merge pull request #3 from indexdata/rename-md-url
Rename MD_URL to MODULE_URL
2 parents d7f08f9 + 4dde7d4 commit 9c98407

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ The container can be used as a
77

88
| env | Description |
99
|----------------------|-------------------------------------------------------------|
10-
| `MD_URL` | URL of running module instance |
10+
| `MODULE_URL` | URL of running module instance |
1111
| `OKAPI_MD` | Module descriptor content |
1212
| `OKAPI_TENANTS` | Glob list of tenants separated by comma or space |
1313
| `OKAPI_ADMIN_TENANT` | Glob list of admin tenants - default is `supertenant` |
1414
| `OKAPI_URL` | Okapi URL |
1515
| `OKAPI_USER` | Username for admin tenant |
1616
| `OKAPI_PASS` | Password for admin tenant |
17-
| `OKAPI_TOKEN` | Token for admin tenant |
17+
| `OKAPI_TOKEN` | Token for admin tenant |

okapi-hooks.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ hook_pre_delete() {
4747

4848
hook_post_install() {
4949
echo $OKAPI_MD | post -f -d @- $U/_/proxy/modules
50-
echo "{\"srvcId\":\"$SVCID\",\"instId\":\"${INSTID}\",\"url\":\"${MD_URL}\"}" | post -f -d @- $U/_/discovery/modules
50+
echo "{\"srvcId\":\"$SVCID\",\"instId\":\"${INSTID}\",\"url\":\"${MODULE_URL}\"}" | post -f -d @- $U/_/discovery/modules
5151
for T in $OKAPI_TENANTS; do
5252
echo "[{ \"id\":\"${SVCID}\",\"action\":\"enable\"}]" | post -f -d @- $U/_/proxy/tenants/$T/install
5353
done
@@ -99,8 +99,8 @@ prepare() {
9999
echo "OKAPI_MD not set"
100100
fail=true
101101
fi
102-
if test -z "$MD_URL"; then
103-
echo "MD_URL not set"
102+
if test -z "$MODULE_URL"; then
103+
echo "MODULE_URL not set"
104104
fail=true
105105
fi
106106
if ! which curl > /dev/null; then

testing.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trap handler EXIT
1717
sleep 1
1818

1919
export OKAPI_URL=http://localhost:9130
20-
export MD_URL=http://localhost:8080
20+
export MODULE_URL=http://localhost:8080
2121
export OKAPI_TOKEN=none
2222
export OKAPI_MD=`cat $OKAPIHOME/okapi-test-module/target/ModuleDescriptor.json`
2323
TENANTS="t1 t2"
@@ -34,4 +34,3 @@ done
3434
for T in ${TENANTS}; do
3535
curl -f ${OKAPI_URL}/_/proxy/tenants/$T/modules/${SVCID}
3636
done
37-

0 commit comments

Comments
 (0)