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

Commit 5383501

Browse files
committed
Include basic python selenium tests inside the image + Travis
1 parent 9b294c0 commit 5383501

File tree

12 files changed

+482
-134
lines changed

12 files changed

+482
-134
lines changed

.travis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
sudo: required
2+
3+
services:
4+
- docker
5+
6+
env:
7+
- TEST_SLEEPS="0.7"
8+
9+
# Note: When I try to map ports `-p ${SELENIUM_HUB_PORT}:${SELENIUM_HUB_PORT}`
10+
# I get Error response from daemon: Cannot start container 9da9d7a1176:
11+
# failed: iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0
12+
# -p tcp -d 172.17.0.1 --dport 24444 -j ACCEPT:
13+
# iptables: No chain/target/match by that name. (exit status 1)
14+
before_install:
15+
- docker build -t selenium .
16+
17+
install:
18+
- docker run --name=grid -d -e VIDEO=true -v /dev/shm:/dev/shm selenium
19+
- docker exec -ti grid wait_all_done 40s
20+
- docker exec grid versions
21+
- docker exec grid errors || true
22+
- docker logs grid
23+
24+
# Note: If we try to use `--net` Travis fails with System error: permission denied
25+
# Note: If we try to use `--link` Selenium fails with ConnectionRefusedError after
26+
# connect to selenium at http://172.17.0.4:24444/wd/hub
27+
# Unless, we use `--privileged` trick by Hiro Asari from Travis Corp.
28+
script:
29+
- docker exec -ti grid test
30+
- docker cp grid:/test/console.png images/grid_console.png
31+
32+
# cleanup though doesn't seem to be necessary in Travis infra
33+
after_script:
34+
- docker exec grid stop || true
35+
- docker stop grid || true
36+
- docker rm grid || true

0 commit comments

Comments
 (0)