test: resolve server temporary path aliases before containment checks (#1361)

* test: canonicalize temporary server directory

* test: compare resolved server configuration paths

* test: check canonical system-test configuration path

* test: expose path containment through pytest fixture

* test: request containment fixture in server checks

* test: use injected fixture in system path check
This commit is contained in:
Normann
2026-10-11 08:39:16 +02:00
committed by GitHub
parent 090ade790e
commit d072fec3f2
3 changed files with 35 additions and 13 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ FILE_TESTDATA_EOSSERVER_CONFIG_1 = DIR_TESTDATA.joinpath("eosserver_config_1.jso
class TestSystem:
def test_prediction_brightsky(self, server_setup_for_class, is_system_test):
def test_prediction_brightsky(self, server_setup_for_class, is_system_test, is_in_test_dir):
"""Test weather prediction by BrightSky."""
server = server_setup_for_class["server"]
eos_dir = server_setup_for_class["eos_dir"]
@@ -30,7 +30,7 @@ class TestSystem:
config_json = result.json()
config_folder_path = Path(config_json["general"]["config_folder_path"])
# Assure we are working in test environment
assert str(config_folder_path).startswith(eos_dir)
assert is_in_test_dir(config_folder_path, eos_dir)
result = requests.put(f"{server}/v1/config/weather/provider", json="BrightSky")
assert result.status_code == HTTPStatus.OK