test(config): use schema-known key in config-set confirm-flow test

Since #34067 validation, config set refuses unknown top-level keys, so
test_config_set_requires_confirmation_then_writes must target a valid
path. Switch console.test -> telegram.test (PlatformConfig open-dict).
This commit is contained in:
Bartok9 2026-07-16 01:05:32 -04:00 committed by Teknium
parent 5bb00f9e3a
commit 3b2e445890

View file

@ -404,18 +404,21 @@ def test_help_lists_supported_commands_and_not_full_cli():
def test_config_set_requires_confirmation_then_writes(_isolate_hermes_home):
engine = HermesConsoleEngine()
pending = engine.execute("config set console.test true")
# Use a schema-known key path. Since #34067, `config set` refuses unknown
# top-level keys, so this flow test must target a valid path (telegram is a
# PlatformConfig-shaped dict that accepts arbitrary child keys).
pending = engine.execute("config set telegram.test true")
assert pending.status == "confirm_required"
from hermes_cli.config import read_raw_config
assert read_raw_config() == {}
result = engine.execute("config set console.test true", confirmed=True)
result = engine.execute("config set telegram.test true", confirmed=True)
assert result.status == "ok"
assert "console.test" in result.output
assert read_raw_config()["console"]["test"] is True
assert "telegram.test" in result.output
assert read_raw_config()["telegram"]["test"] is True
def test_sessions_list_and_stats_use_isolated_session_store(_isolate_hermes_home):