- Replace curl with wget in healthcheck commands for better reliability. - Remove server_monitor service and related configurations from docker-compose. - Update Dockerfile to use a multi-stage build for optimized image size. - Delete obsolete Dockerfile.optimized and related monitoring scripts. - Clean up Makefile by removing commands related to the server_monitor service. - Update README to reflect changes in monitoring services and commands.
31 lines
1.4 KiB
Python
31 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Тест конфигурации pytest
|
|
"""
|
|
|
|
import pytest
|
|
import os
|
|
import sys
|
|
|
|
def test_pytest_config_loaded():
|
|
"""Проверяем, что конфигурация pytest загружена"""
|
|
# Проверяем, что мы находимся в корневой директории проекта
|
|
assert os.path.exists('pytest.ini'), "pytest.ini должен существовать в корне проекта"
|
|
|
|
# Проверяем, что директория tests существует
|
|
assert os.path.exists('tests'), "Директория tests должна существовать"
|
|
assert os.path.exists('tests/infra'), "Директория tests/infra должна существовать"
|
|
assert os.path.exists('tests/bot'), "Директория tests/bot должна существовать"
|
|
|
|
|
|
def test_test_structure():
|
|
"""Проверяем структуру тестов"""
|
|
# Проверяем наличие __init__.py файлов
|
|
assert os.path.exists('tests/__init__.py'), "tests/__init__.py должен существовать"
|
|
assert os.path.exists('tests/infra/__init__.py'), "tests/infra/__init__.py должен существовать"
|
|
assert os.path.exists('tests/bot/__init__.py'), "tests/bot/__init__.py должен существовать"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
pytest.main([__file__, "-v"])
|