node configs

This commit is contained in:
Dobromir Popov
2026-07-06 14:45:08 +03:00
parent b547034741
commit cdc9f11128
3 changed files with 19 additions and 1 deletions

View File

@@ -1414,3 +1414,16 @@ def test_layers_from_config_get_text_config_and_variants():
cfg = types.SimpleNamespace(get_text_config=lambda: inner)
assert layers_from_config(cfg) == 32
assert layers_from_config(types.SimpleNamespace()) is None
def test_download_dir_env_override(monkeypatch):
import importlib
from meshnet_node import config as config_mod
monkeypatch.setenv("MESHNET_DOWNLOAD_DIR", "/tmp/llm-store")
importlib.reload(config_mod)
assert config_mod.DEFAULTS["download_dir"] == "/tmp/llm-store"
monkeypatch.delenv("MESHNET_DOWNLOAD_DIR")
importlib.reload(config_mod)
assert config_mod.DEFAULTS["download_dir"].endswith("models")