mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-27 01:11:40 +00:00
fix: enable plugins in config.yaml for lazy-discovery tests
The opt-in-by-default change (70111eea) requires plugins to be listed
in plugins.enabled. The cherry-picked test fixtures didn't write this
config, so two tests failed on current main.
This commit is contained in:
parent
a5e368ebfb
commit
42c30985c7
2 changed files with 11 additions and 2 deletions
|
|
@ -831,7 +831,8 @@ class TestPluginCommands:
|
|||
|
||||
def test_get_plugin_context_engine_discovers_plugins_lazily(self, tmp_path, monkeypatch):
|
||||
"""Context engine lookup should work before any explicit discover_plugins() call."""
|
||||
plugins_dir = tmp_path / "hermes_test" / "plugins"
|
||||
hermes_home = tmp_path / "hermes_test"
|
||||
plugins_dir = hermes_home / "plugins"
|
||||
plugin_dir = plugins_dir / "engine-plugin"
|
||||
plugin_dir.mkdir(parents=True, exist_ok=True)
|
||||
(plugin_dir / "plugin.yaml").write_text(
|
||||
|
|
@ -856,7 +857,11 @@ class TestPluginCommands:
|
|||
"def register(ctx):\n"
|
||||
" ctx.register_context_engine(StubEngine())\n"
|
||||
)
|
||||
monkeypatch.setenv("HERMES_HOME", str(tmp_path / "hermes_test"))
|
||||
# Opt-in: plugins are opt-in by default, so enable in config.yaml
|
||||
(hermes_home / "config.yaml").write_text(
|
||||
yaml.safe_dump({"plugins": {"enabled": ["engine-plugin"]}})
|
||||
)
|
||||
monkeypatch.setenv("HERMES_HOME", str(hermes_home))
|
||||
|
||||
import hermes_cli.plugins as plugins_mod
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue