summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/docker
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/testapi/docker')
-rw-r--r--utils/test/testapi/docker/Dockerfile4
-rwxr-xr-xutils/test/testapi/docker/prepare-env.sh7
2 files changed, 7 insertions, 4 deletions
diff --git a/utils/test/testapi/docker/Dockerfile b/utils/test/testapi/docker/Dockerfile
index e031e194c..a46fce20a 100644
--- a/utils/test/testapi/docker/Dockerfile
+++ b/utils/test/testapi/docker/Dockerfile
@@ -9,7 +9,7 @@
#
# Execution:
# $ docker run -dti -p 8001:8000 \
-# -e "swagger_url=http://10.63.243.17:8001" \
+# -e "base_url=http://10.63.243.17:8001" \
# -e "mongodb_url=mongodb://10.63.243.17:27017/" \
# opnfv/testapi:tag
#
@@ -47,5 +47,5 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng /home/releng
WORKDIR /home/releng/utils/test/testapi/
RUN pip install -r requirements.txt
-RUN bash install.sh
+RUN python setup.py install
CMD ["bash", "docker/start-server.sh"]
diff --git a/utils/test/testapi/docker/prepare-env.sh b/utils/test/testapi/docker/prepare-env.sh
index 9f07efbd1..b14bc2448 100755
--- a/utils/test/testapi/docker/prepare-env.sh
+++ b/utils/test/testapi/docker/prepare-env.sh
@@ -6,6 +6,9 @@ if [ "$mongodb_url" != "" ]; then
sudo crudini --set --existing $FILE mongo url $mongodb_url
fi
-if [ "$swagger_url" != "" ]; then
- sudo crudini --set --existing $FILE swagger base_url $swagger_url
+if [ "$base_url" != "" ]; then
+ sudo crudini --set --existing $FILE api url $base_url/api/v1
+ sudo crudini --set --existing $FILE ui url $base_url
+ sudo echo "{\"testapiApiUrl\": \"$base_url/api/v1\"}" > \
+ /usr/local/lib/python2.7/dist-packages/opnfv_testapi/static/testapi-ui/config.json
fi