Hello guys,
I’m trying to run test cases with selenium grid on the CI/CD. With this code it works fined
stages:
- test
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
pytest:
stage : test
image: python:3.7.9-alpine3.12
script:
- apk add --no-cache docker
- apk add --no-cache docker-compose
- ls
- docker-compose up -d
- pip3 install -r requirements.txt
- python --version
- python -m pytest test_pytest/AppPro/GUI/step_defs/test_login_logout.py
For information b = webdriver.Remote(command_executor=‘http://docker:4444/wd/hub’,)
But I can"t figured atout why it doesn’t work with this:
stages:
- test
services:
- docker:dind
.tags-default: &tags-default
tags:
- private_runner
pytest:
<<: *tags-default
stage : test
image: python:3.7.9-alpine3.12
script:
- apk add --no-cache docker
- apk add --no-cache docker-compose
- ls
- docker-compose up -d
- pip3 install -r requirements.txt
- python --version
- python -m pytest test_pytest/AppPro/GUI/step_defs/test_login_logout.py
Exception: HTTPConnectionPool(host=‘docker’, port=4444): Max retries exceeded with url: /session (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f472bd10f10>: Failed to establish a new connection: [Errno 110] Operation timed out’))
And I can’t figure out why.
Thank you