mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 10:15:27 -04:00
fix(cookbook): default Ollama serve to loopback (#872)
This commit is contained in:
@@ -125,6 +125,18 @@ def test_readme_native_quickstart_uses_loopback():
|
||||
assert "Use `--host 0.0.0.0` only when you intentionally want" in readme
|
||||
|
||||
|
||||
def test_ollama_cookbook_runner_does_not_force_public_bind():
|
||||
route = Path("routes/cookbook_routes.py").read_text(encoding="utf-8")
|
||||
cookbook_js = Path("static/js/cookbook.js").read_text(encoding="utf-8")
|
||||
assert 'OLLAMA_HOST="0.0.0.0:${ODYSSEUS_OLLAMA_PORT}" ollama serve' not in route
|
||||
assert 'OLLAMA_HOST="${ODYSSEUS_OLLAMA_HOST}:${ODYSSEUS_OLLAMA_PORT}" ollama serve' in route
|
||||
assert '_ollama_default_host = "0.0.0.0" if remote else "127.0.0.1"' in route
|
||||
assert "WARNING: remote Ollama will bind" in route
|
||||
assert "OLLAMA_HOST=0.0.0.0:${ollamaPort}" not in cookbook_js
|
||||
assert "const bindHost = _envState.remoteHost ? '0.0.0.0' : '127.0.0.1';" in cookbook_js
|
||||
assert "OLLAMA_HOST=${bindHost}:${ollamaPort}" in cookbook_js
|
||||
|
||||
|
||||
def _import_integrations(tmp_path, monkeypatch):
|
||||
"""Import src.integrations with data + encryption key redirected to tmp."""
|
||||
_import_secret_storage(tmp_path, monkeypatch)
|
||||
|
||||
Reference in New Issue
Block a user