Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit 996aacd

Browse files
committed
Fix docker-compose issue closes #141
1 parent f8e582f commit 996aacd

14 files changed

+61
-164
lines changed

.env

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export WAIT_ALL_DONE ?= 80s
3232
# Number of nodes
3333
export chrome ?= 1
3434
export firefox ?= 1
35-
export rc_chrome ?= 1
36-
export rc_firefox ?= 1
35+
export rc_chrome ?= 0
36+
export rc_firefox ?= 0
3737

3838
# To target a specific node number
3939
# for example to VNC into it via
@@ -59,8 +59,3 @@ export VIDEO ?= true
5959
# export APP ?= zalando_uk
6060
export APP ?= mock
6161
export APP_NAME ?= ${APP}
62-
63-
# We need a fixed port number to know where to connect the selenium tests
64-
export PORT ?= 4444
65-
export HUB_PORT ?= ${PORT}
66-
export SELENIUM_HUB_PORT ?= ${HUB_PORT}

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ matrix:
4848
services:
4949
- docker
5050
env:
51-
- DOCKER_VERSION="1.13.0-rc7"
51+
- DOCKER_VERSION="1.13.1-rc1"
5252
DOCKER_COMPOSE_VERSION="1.9.0"
5353
# Linux with docker:stable compose:beta/older
5454
- os: linux
@@ -68,7 +68,7 @@ matrix:
6868
services:
6969
- docker
7070
env:
71-
- DOCKER_VERSION="1.13.0-rc7"
71+
- DOCKER_VERSION="1.13.1-rc1"
7272
DOCKER_COMPOSE_VERSION="1.10.0-rc2"
7373
# Mac OSX: only test native docker version
7474
# - os: osx

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Note image ids also change after scm-source.json has being updated which trigger
1111
+ Date: TBD_DATE
1212
+ Upgrade Firefox (for selenium 3) from 51.0 to 51.0.1
1313
+ Upgrade Geckodriver minor from 0.13.0 to 0.14.0
14+
+ Fix docker-compose issue closes #141
15+
+ Remove Selenium RC from tests are the feature is not being used
1416
+ Image tag details:
1517
+ Selenium 2: TBD_SELENIUM_2_VERSION (TBD_SELENIUM_2_REVISION)
1618
+ Selenium 3: 3.0.1 (1969d75)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For pull requests or local commits:
1212

1313
For repository owners only:
1414

15-
git commit -m "Upgrade Geckodriver minor from 0.13.0 to 0.14.0"
15+
git commit -m "Fix docker-compose issue closes #141"
1616
git tag -d latest && git tag `cat VERSION` && git push origin tmp-`cat VERSION` && git push --tags
1717

1818
-- Wait for Travis to pass OK

Makefile

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# make setup compose chrome=3 firefox=5 see browser=firefox node=5
1010
#
1111
# Contributing
12-
# export TESTING_MAKE=true proj=leo PORT=5555 nodes=2
12+
# export TESTING_MAKE=true proj=leo nodes=2
1313
# make chrome=2 firefox=2 && make seeall dock
1414
ifeq ($(OS),Windows_NT)
1515
$(error Windows is not currently supported)
@@ -146,14 +146,6 @@ seech:
146146
seeff:
147147
@$(MAKE) -s see browser=firefox
148148

149-
# Shortcut to VNC into RC Firefox
150-
seercff:
151-
@$(MAKE) -s see browser=rc_firefox
152-
153-
# Shortcut to VNC into RC Chrome
154-
seercch:
155-
@$(MAKE) -s see browser=rc_chrome
156-
157149
env:
158150
env
159151

@@ -174,8 +166,6 @@ down:
174166
@if [ "${VIDEO}" = "true" ]; then \
175167
$(MAKE) -s stop_videos_chrome ; \
176168
$(MAKE) -s stop_videos_firefox ; \
177-
$(MAKE) -s stop_videos_rc_chrome ; \
178-
$(MAKE) -s stop_videos_rc_firefox ; \
179169
fi
180170
docker-compose -f ${COMPOSE_FILE} -p ${COMPOSE_PROJ_NAME} down \
181171
--remove-orphans
@@ -192,20 +182,14 @@ stop_videos_chrome:
192182
stop_videos_firefox:
193183
@$(MAKE) -s stop_videos browser=firefox tot_nodes=${firefox}
194184

195-
stop_videos_rc_chrome:
196-
@$(MAKE) -s stop_videos browser=rc_chrome tot_nodes=${rc_chrome}
197-
198-
stop_videos_rc_firefox:
199-
@$(MAKE) -s stop_videos browser=rc_firefox tot_nodes=${rc_firefox}
200-
201185
scale:
202186
docker-compose -f ${COMPOSE_FILE} -p ${COMPOSE_PROJ_NAME} scale \
203-
${APP_NAME}=1 hub=1 chrome=${chrome} firefox=${firefox} rc_chrome=${rc_chrome} rc_firefox=${rc_firefox}
187+
${APP_NAME}=1 hub=1 chrome=${chrome} firefox=${firefox}
204188
@$(MAKE) -s wait chrome=${chrome} firefox=${firefox}
205189

206190
compose: basic_reqs cleanup
207191
docker-compose -f ${COMPOSE_FILE} -p ${COMPOSE_PROJ_NAME} up -d
208-
@$(MAKE) -s scale chrome=${chrome} firefox=${firefox} rc_chrome=${rc_chrome} rc_firefox=${rc_firefox}
192+
@$(MAKE) -s scale chrome=${chrome} firefox=${firefox}
209193

210194
wait:
211195
./mk/wait.sh
@@ -232,35 +216,21 @@ gather_videos_chrome:
232216
gather_videos_firefox:
233217
@$(MAKE) -s gather_videos browser=firefox tot_nodes=${firefox}
234218

235-
gather_videos_rc_chrome:
236-
@$(MAKE) -s gather_videos browser=rc_chrome tot_nodes=${rc_chrome}
237-
238-
gather_videos_rc_firefox:
239-
@$(MAKE) -s gather_videos browser=rc_firefox tot_nodes=${rc_firefox}
240-
241219
# Gather video artifacts
242-
videos: gather_videos_chrome gather_videos_firefox gather_videos_rc_chrome gather_videos_rc_firefox
220+
videos: gather_videos_chrome gather_videos_firefox
243221

244222
# VNC open all. As of now only 4 are supported
245223
seeall: check_vncviewer
246224
@$(MAKE) -s see browser=chrome node=1
247225
@sleep 0.3
248226
@$(MAKE) -s see browser=firefox node=1
249-
@sleep 0.4
250-
@$(MAKE) -s see browser=rc_chrome node=1
251-
@sleep 0.3
252-
@$(MAKE) -s see browser=rc_firefox node=1
253227

254228
# Move them all. As of now only 4 are supported
255229
dock: check_wmctrl
256230
@sleep 0.2 #TODO Make active wait: http://stackoverflow.com/a/19441380/511069
257231
@$(MAKE) -s move browser=chrome node=1
258232
@sleep 0.2 #TODO Make active wait
259233
@$(MAKE) -s move browser=firefox node=1
260-
@sleep 0.2 #TODO Make active wait
261-
@$(MAKE) -s move browser=rc_chrome node=1
262-
@sleep 0.2 #TODO Make active wait
263-
@$(MAKE) -s move browser=rc_firefox node=1
264234

265235
# Run self tests
266236
test:
@@ -288,8 +258,6 @@ test:
288258
scale \
289259
seeff \
290260
seech \
291-
seercff \
292-
seercch \
293261
compose \
294262
wait \
295263
down \

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ This project is normally tested in the last version of Docker and docker-compose
4545
To figure out the currently used specific versions it surely works on,
4646
see file [.travis.yml](./.travis.yml) example values:
4747

48-
docker --version #=> 1.11.2
49-
docker-compose --version #=> 1.7.1
48+
docker --version #=> 1.13.0
49+
docker-compose --version #=> 1.10.0
5050

5151
If you need to use docker-machine to run docker
5252
(like for example on a Mac before the Docker native version 1.12),
@@ -122,11 +122,15 @@ See [docker-compose](./docs/docker-compose.md)
122122
See [jenkins](./docs/jenkins.md)
123123

124124
### Parallel
125-
This image is designed to run one test on each docker container but if you still want to run multiple tests in parallel you can still do so, there are some ways to do this:
125+
We now have a better suited product for this use case, is called [Zalenium][]
126+
127+
This image is designed to run one test on each docker container but if you still want to run multiple tests in parallel you can still do so with [Zalenium][]
128+
129+
If you want to limit yourself to this project, you still can. There are some ways to do it:
126130

127131
1. The recommended way is via [docker-compose](./docs/docker-compose.md) and you should replace `mock` with your web service under test within the [docker-compose.yml][] file.
128132

129-
export SELENIUM_HUB_PORT=4444 VNC_FROM_PORT=40650 VNC_TO_PORT=40700 VIDEO=false
133+
docker-compose -p grid up --force-recreate
130134
docker-compose -p grid scale mock=1 hub=1 chrome=3 firefox=3
131135

132136
1. The _(not recommended)_ way is by increasing `MAX_INSTANCES` and `MAX_SESSIONS` which now [defaults](https://github.com/elgalu/docker-selenium/blob/2.53.1a/Dockerfile#L967) to 1.
@@ -287,7 +291,7 @@ In Protrator
287291
However this is now the default of this image, see `CHROME_ARGS="--no-sandbox"` in the Dockerfile so don't be surprised to see the "Stability and security will suffer" banner when opening Chrome inside the container.
288292

289293
## Cloud Testing Platforms
290-
We now have a better suited product for this use case, is called [Zalenium](https://github.com/zalando/zalenium)
294+
We now have a better suited product for this use case, is called [Zalenium][]
291295

292296
## Additional Uses
293297

@@ -451,3 +455,4 @@ See [LICENSE.md](./LICENSE.md)
451455
[BrowserStack]: https://www.browserstack.com/automate
452456
[xvfb-electron]: http://electron.atom.io/docs/tutorial/testing-on-headless-ci
453457
[docker-compose.yml]: ./docker-compose.yml
458+
[Zalenium]: https://github.com/zalando/zalenium

docker-compose-host.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
version: '2'
1+
version: '3'
22

33
services:
44
hub:
55
image: elgalu/selenium
66
network_mode: host
77
environment:
8-
- SELENIUM_HUB_PORT
8+
- SELENIUM_HUB_PORT=${SELENIUM_HUB_PORT-4444}
99
- PICK_ALL_RANDOM_PORTS=true
1010
- GRID=true
1111
- CHROME=false
@@ -18,7 +18,7 @@ services:
1818
network_mode: host
1919
shm_size: 1g
2020
environment:
21-
- SELENIUM_HUB_PORT
21+
- SELENIUM_HUB_PORT=${SELENIUM_HUB_PORT-4444}
2222
- PICK_ALL_RANDOM_PORTS=true
2323
- GRID=false
2424
- CHROME=true
@@ -30,7 +30,7 @@ services:
3030
image: elgalu/selenium
3131
network_mode: host
3232
environment:
33-
- SELENIUM_HUB_PORT
33+
- SELENIUM_HUB_PORT=${SELENIUM_HUB_PORT-4444}
3434
- PICK_ALL_RANDOM_PORTS=true
3535
- GRID=false
3636
- CHROME=false
@@ -43,7 +43,7 @@ services:
4343
network_mode: host
4444
shm_size: 1g
4545
environment:
46-
- SELENIUM_HUB_PORT
46+
- SELENIUM_HUB_PORT=${SELENIUM_HUB_PORT-4444}
4747
- PICK_ALL_RANDOM_PORTS=true
4848
- GRID=false
4949
- CHROME=false
@@ -55,7 +55,7 @@ services:
5555
image: elgalu/selenium
5656
network_mode: host
5757
environment:
58-
- SELENIUM_HUB_PORT
58+
- SELENIUM_HUB_PORT=${SELENIUM_HUB_PORT-4444}
5959
- PICK_ALL_RANDOM_PORTS=true
6060
- GRID=false
6161
- CHROME=false

0 commit comments

Comments
 (0)