[TS_SELENIUM] Add VNC server to the "eclipse/che-e2e" docker image (#14730)
Signed-off-by: Ihor Okhrimenko <iokhrime@redhat.com>7.20.x
parent
3eaa9f2055
commit
b1f0c167ab
|
|
@ -1,12 +1,14 @@
|
|||
FROM selenium/standalone-chrome:latest
|
||||
|
||||
ENV DISPLAY=':20'
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update && apt-get install && \
|
||||
apt-get install -y nodejs && \
|
||||
apt-get install -y npm && \
|
||||
npm install -g typescript && \
|
||||
apt-get install vnc4server -y
|
||||
apt-get install x11vnc -y
|
||||
|
||||
COPY e2e/package.json e2e/package-lock.json /tmp/e2e/
|
||||
|
||||
|
|
@ -18,4 +20,6 @@ COPY entrypoint.sh /tmp/
|
|||
|
||||
WORKDIR /tmp/e2e
|
||||
|
||||
EXPOSE 5920
|
||||
|
||||
ENTRYPOINT [ "/tmp/entrypoint.sh" ]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,18 @@ if [ -z "$TEST_SUITE" ]; then
|
|||
TEST_SUITE=test-happy-path
|
||||
fi
|
||||
|
||||
# Launch display mode and VNC server
|
||||
export DISPLAY=':20'
|
||||
Xvfb :20 -screen 0 1920x1080x16 > /dev/null 2>&1 &
|
||||
x11vnc -display :20 -N -forever > /dev/null 2>&1 &
|
||||
echo ''
|
||||
echo '#######################'
|
||||
echo ''
|
||||
echo 'For remote debug connect to the VNC server 0.0.0.0:5920'
|
||||
echo ''
|
||||
echo '#######################'
|
||||
echo ''
|
||||
|
||||
# Launch selenium server
|
||||
/usr/bin/supervisord --configuration /etc/supervisord.conf & \
|
||||
export TS_SELENIUM_REMOTE_DRIVER_URL=http://localhost:4444/wd/hub
|
||||
|
|
|
|||
|
|
@ -36,9 +36,13 @@
|
|||
- export the ```"TS_SELENIUM_BASE_URL"``` variable with "Che" url
|
||||
- run command ```"npm run test-docker-mount-e2e"```
|
||||
|
||||
## Debug docker launch
|
||||
|
||||
The ```'eclipse/che-e2e'``` docker image has VNC server instaled inside. For connecting use ```'0.0.0.0:5920'``` adress.
|
||||
|
||||
## The "Happy Path" scenario launching
|
||||
|
||||
**The easiest way to do that is to perform steps which described in the "Docker launch" paragraph.
|
||||
**The easiest way to do that is to perform steps which are described in the "Docker launch" paragraph.
|
||||
For running tests without docker, please perform next steps:**
|
||||
|
||||
- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl' <https://github.com/eclipse/che/blob/master/deploy/kubernetes/README.md>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"cleanup-docker": "if [ $(docker ps -a | grep -c selenium-e2e) -gt 0 ]; then docker rm -f $(docker ps --filter \"name=selenium-e2e\" -aq); fi;",
|
||||
"test-docker": "npm run cleanup-docker && docker run -it --shm-size=2g --name selenium-e2e -e TS_SELENIUM_BASE_URL=$TS_SELENIUM_BASE_URL eclipse/che-e2e:nightly",
|
||||
"test-docker-mount-e2e": "npm run cleanup-docker && docker run -it --shm-size=2g --name selenium-e2e -e TS_SELENIUM_BASE_URL=$TS_SELENIUM_BASE_URL -v $(pwd):/tmp/e2e:Z eclipse/che-e2e:nightly",
|
||||
"test-docker": "npm run cleanup-docker && docker run -it --shm-size=2g -p 5920:5920 --name selenium-e2e -e TS_SELENIUM_BASE_URL=$TS_SELENIUM_BASE_URL eclipse/che-e2e:nightly",
|
||||
"test-docker-mount-e2e": "npm run cleanup-docker && docker run -it --shm-size=2g -p 5920:5920 --name selenium-e2e -e TS_SELENIUM_BASE_URL=$TS_SELENIUM_BASE_URL -v $(pwd):/tmp/e2e:Z eclipse/che-e2e:nightly",
|
||||
"test": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha.opts",
|
||||
"test-happy-path": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-happy-path.opts",
|
||||
"test-che-install": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-che-operatorhub.opts",
|
||||
|
|
|
|||
Loading…
Reference in New Issue