2024-11-11 21:38:13 +01:00
|
|
|
from http import HTTPStatus
|
|
|
|
|
2024-10-08 14:29:45 +02:00
|
|
|
import requests
|
|
|
|
|
2024-12-15 14:40:03 +01:00
|
|
|
from akkudoktoreos.config.config import get_config
|
2024-11-11 21:38:13 +01:00
|
|
|
|
2024-12-15 14:40:03 +01:00
|
|
|
config_eos = get_config()
|
2024-10-08 14:29:45 +02:00
|
|
|
|
2024-11-11 21:38:13 +01:00
|
|
|
|
2024-12-15 14:40:03 +01:00
|
|
|
def test_server(server):
|
2024-11-10 23:27:52 +01:00
|
|
|
"""Test the server."""
|
2024-12-15 14:40:03 +01:00
|
|
|
# validate correct path in server
|
|
|
|
assert config_eos.data_folder_path is not None
|
|
|
|
assert config_eos.data_folder_path.is_dir()
|
2024-11-11 21:38:13 +01:00
|
|
|
|
2024-12-29 18:42:49 +01:00
|
|
|
result = requests.get(f"{server}/v1/config?")
|
2024-12-15 14:40:03 +01:00
|
|
|
assert result.status_code == HTTPStatus.OK
|