-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile.tests
31 lines (28 loc) · 1.17 KB
/
Dockerfile.tests
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
FROM python:3.6
MAINTAINER Dmitry Platon <[email protected]>
ENV TEST=''
ENV TRANSPORT_URLS='http://playground-dev.devicehive.com/api/rest,ws://playground-dev.devicehive.com/api/websocket'
ENV ADMIN_REFRESH_TOKEN=''
ENV CLIENT_REFRESH_TOKEN=''
ENV ADMIN_ACCESS_TOKEN=''
ENV CLIENT_ACCESS_TOKEN=''
ENV ADMIN_LOGIN=''
ENV ADMIN_PASSWORD=''
ENV CLIENT_LOGIN=''
ENV CLIENT_PASSWORD=''
ENV LOG_LEVEL='INFO'
ADD devicehive /opt/devicehive-python/devicehive
ADD tests /opt/devicehive-python/tests
ADD setup.py README.md /opt/devicehive-python/
RUN cd /opt/devicehive-python && pip install . pytest
ENTRYPOINT pytest -xsv /opt/devicehive-python/tests/$TEST\
--transport-urls=$TRANSPORT_URLS\
--admin-refresh-token=$ADMIN_REFRESH_TOKEN\
--admin-access-token=$ADMIN_ACCESS_TOKEN\
--client-refresh-token=$CLIENT_REFRESH_TOKEN\
--client-access-token=$CLIENT_ACCESS_TOKEN\
--admin-login=$ADMIN_LOGIN\
--admin-password=$ADMIN_PASSWORD\
--client-login=$CLIENT_LOGIN\
--client-password=$CLIENT_PASSWORD\
--log-level=$LOG_LEVEL