Mercurial > libervia-backend
annotate docker/backend_e2e/Dockerfile @ 3428:a6ea53248c14
tests: added testing files (photos)
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Nov 2020 16:32:40 +0100 |
parents | f023f06fa344 |
children | b166a59b1724 |
rev | line source |
---|---|
3381 | 1 FROM salutatoi/sat |
2 | |
3 LABEL maintainer="Goffi <tmp_dockerfiles@goffi.org>" | |
4 | |
5 USER root | |
6 | |
3427
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
7 ARG DEBIAN_FRONTEND=noninteractive |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
8 |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
9 RUN mkdir -m 777 /reports && \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
10 apt-get install -y --no-install-recommends \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
11 # firefox is needed to test Libervia via selenium |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
12 firefox-esr \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
13 # VNC/X11 server for visual mode + window manager |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
14 # using openbox as it allows to resize easily when doing manual debugging/tests |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
15 # and it adapts correctly when doing driver.set_window_size |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
16 tigervnc-standalone-server openbox \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
17 # useful for remote debugging |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
18 telnet net-tools \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
19 # needed to make Firefox trust system certificates |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
20 # cf. https://askubuntu.com/a/1036637 |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
21 p11-kit && \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
22 ln -fs /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /usr/lib/firefox-esr/libnssckbi.so |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
23 |
3381 | 24 # we install pre-generated certificates so we can do tests with valid TLS |
25 COPY --chown=root:root certificates/minica.pem /usr/local/share/ca-certificates/minica.crt | |
26 COPY --chown=root:tls-cert certificates/server1.test/cert.pem /usr/share/sat/certificates/server1.test.pem | |
27 COPY --chown=root:tls-cert certificates/server1.test/key.pem /usr/share/sat/certificates/server1.test-key.pem | |
28 RUN update-ca-certificates | |
29 | |
30 COPY --chown=root:root sat.conf /etc/sat.conf | |
31 | |
3427
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
32 RUN \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
33 # we install webdriver (needed to control Firefox from Selenium) |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
34 # note: this is not absolutely necessary as long as we use helium because it includes |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
35 # is own webdriver |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
36 python -c 'from urllib.request import urlretrieve;\ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
37 urlretrieve(\ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
38 "https://github.com/mozilla/geckodriver/releases/download/v0.28.0"\ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
39 "/geckodriver-v0.28.0-linux64.tar.gz", "/usr/local/bin/geckodriver.tar.gz")' && \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
40 cd /usr/local/bin && tar zxf geckodriver.tar.gz && rm -f geckodriver.tar.gz |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
41 |
3381 | 42 WORKDIR /home/sat |
43 USER sat | |
44 | |
3427
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
45 RUN \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
46 # pytest and its plugins |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
47 pip install pytest pytest-timeout \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
48 # needed to test jp |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
49 sh \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
50 # needed to test libervia |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
51 helium \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
52 # needed to check sent emails |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
53 aiosmtpd \ |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
54 # useful for debugging |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
55 pudb |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
56 |
3385
bcdfe7905409
docker (backend_e2e): install pytest and sh
Goffi <goffi@goffi.org>
parents:
3381
diff
changeset
|
57 RUN ./entrypoint.sh \ |
bcdfe7905409
docker (backend_e2e): install pytest and sh
Goffi <goffi@goffi.org>
parents:
3381
diff
changeset
|
58 # we create the file sharing component which will autoconnect when backend is started |
bcdfe7905409
docker (backend_e2e): install pytest and sh
Goffi <goffi@goffi.org>
parents:
3381
diff
changeset
|
59 jp profile create file_sharing -j files.server1.test -p "" --xmpp-password test_e2e -C file_sharing -A && \ |
bcdfe7905409
docker (backend_e2e): install pytest and sh
Goffi <goffi@goffi.org>
parents:
3381
diff
changeset
|
60 sat stop |
3427
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
61 |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
62 ENV SAT_TEST_REPORT_DIR=/reports |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
63 ENV DISPLAY=:0 |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
64 USER root |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
65 RUN apt-get install -y openbox |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
66 USER sat |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
67 CMD /usr/bin/Xtigervnc -geometry 1024x768 -desktop "SàT e2e test" -rfbport 5900 -SecurityTypes None :0 & sleep 1 && openbox |
f023f06fa344
docker (backend_e2e): added packages necessary to test Libervia + some debugging tools
Goffi <goffi@goffi.org>
parents:
3385
diff
changeset
|
68 EXPOSE 5900 |