diff --git a/tests/hermes_cli/test_commands.py b/tests/hermes_cli/test_commands.py index 2f92ecbb1a..49e114aeff 100644 --- a/tests/hermes_cli/test_commands.py +++ b/tests/hermes_cli/test_commands.py @@ -702,6 +702,10 @@ class TestTelegramMenuCommands: "def register(ctx):\n" " ctx.register_command('lcm', lambda args: 'ok', description='LCM status and diagnostics')\n" ) + # Opt-in: plugins are opt-in by default, so enable in config.yaml + (tmp_path / "config.yaml").write_text( + "plugins:\n enabled:\n - cmd-plugin\n" + ) monkeypatch.setenv("HERMES_HOME", str(tmp_path)) with patch.object(plugins_mod, "_plugin_manager", None): diff --git a/tests/hermes_cli/test_plugins.py b/tests/hermes_cli/test_plugins.py index df7ba6555f..9433ecdca8 100644 --- a/tests/hermes_cli/test_plugins.py +++ b/tests/hermes_cli/test_plugins.py @@ -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