move test docker-compose file to tests

This commit is contained in:
Dmitry Afanasyev 2022-08-28 23:15:54 +03:00
parent ca004145e7
commit c87c12f1bb
4 changed files with 11 additions and 12 deletions

View File

@ -15,4 +15,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Run tests
run: docker-compose -f docker-compose.test.yml run bot python -m pytest tests/bot/test_bot_selenoid.py -vv
run: |
cd tests
docker-compose run test-bot python -m pytest tests/bot/test_bot_selenoid.py -vv

View File

@ -26,7 +26,8 @@ killall python
## Tests
```bash
SELENOIDTEST=1 docker-compose -f docker-compose.test.yml run bot python -m pytest tests/bot/test_bot_selenoid.py::test_selenoid_text -vv
cd tests
SELENOIDTEST=1 docker-compose run test-bot python -m pytest tests/bot/test_bot_selenoid.py::test_selenoid_text -vv
```
## Help article

View File

@ -22,8 +22,6 @@ services:
context: .
dockerfile: ./deploy/Dockerfile.selenoid
restart: unless-stopped
environment:
- SESSION_TIMED_OUT=30s
networks:
transport_bot_network:
ipv4_address: 200.20.0.10

View File

@ -9,32 +9,30 @@ networks:
- subnet: 200.20.0.0/24
services:
selenoid:
test-selenoid:
container_name: "transport_bot_selenoid"
hostname: "selenoid_host"
build:
context: .
context: ..
dockerfile: ./deploy/Dockerfile.selenoid
restart: unless-stopped
environment:
- SESSION_TIMED_OUT=30s
networks:
transport_bot_network:
ipv4_address: 200.20.0.10
volumes:
- ./deploy/browsers.json:/etc/selenoid/browsers.json:ro
- ../deploy/browsers.json:/etc/selenoid/browsers.json:ro
- /var/run/docker.sock:/var/run/docker.sock
command: ["-conf", "/etc/selenoid/browsers.json", "-limit", "10",
"-container-network", "transport_bot_network", "-timeout", "30s"]
expose:
- "4444"
bot:
test-bot:
container_name: "transport_bot"
hostname: "transport_bot"
image: "transport_bot:latest"
build:
context: .
context: ..
dockerfile: ./deploy/Dockerfile.bot
args:
USER: root
@ -42,7 +40,7 @@ services:
environment:
SELENOIDTEST: ${SELENOIDTEST}
depends_on:
- selenoid
- test-selenoid
volumes:
- /etc/localtime:/etc/localtime:ro
networks: