Skip to content

Commit

Permalink
Tests cleanup (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
a1d4r authored Apr 2, 2024
1 parent 75364f6 commit 8311325
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 174 deletions.
12 changes: 0 additions & 12 deletions async_api/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +0,0 @@
import pytest

from elasticsearch import AsyncElasticsearch

from core.settings import settings


@pytest.fixture()
async def elastic():
es = AsyncElasticsearch(settings.elasticsearch_host)
yield es
await es.close()
11 changes: 10 additions & 1 deletion async_api/tests/functional/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ docker compose up -d
```

Команда запустит:

- API-сервис по адресу http://localhost:8001 (в сети докера http://api:8000)
- Elasticsearch по адресу http://localhost:9201 (в сети докера http://test-elasticsearch:9200)
- Redis по адресу `redis://localhost:6380` (в сети докера `redis://test-redis:6379`)
Expand All @@ -21,8 +22,16 @@ docker compose up -d
docker compose down
```

### Запуск тестов
### Запуск тестов локально

```
python -m pytest -k functional
```

### Запуск тестов в докере

Можно запустить все тесты в докере:

```
docker compose -f docker-compose.ci.yml up --build --exit-code-from test-runner
```
Empty file.
56 changes: 0 additions & 56 deletions async_api/tests/test_services/test_film_service.py

This file was deleted.

34 changes: 0 additions & 34 deletions async_api/tests/test_services/test_genre_service.py

This file was deleted.

71 changes: 0 additions & 71 deletions async_api/tests/test_services/test_person_service.py

This file was deleted.

0 comments on commit 8311325

Please sign in to comment.