Initial SyncGames tree: agent, Android, deploy, docs.
Session-gated MinIO save sync with AppImage GUI, CLI edit/session flow, and Gitea release helper. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from syncgames.config import AgentConfig, save_agent_config, try_load_agent_config
|
||||
|
||||
|
||||
def test_save_and_reload_agent(tmp_path: Path, monkeypatch):
|
||||
monkeypatch.setenv("SYNCGAMES_CONFIG", str(tmp_path))
|
||||
cfg = AgentConfig(
|
||||
device_id="laptop",
|
||||
endpoint_url="https://syncgames-s3.example.com",
|
||||
bucket="syncgames",
|
||||
access_key="ak",
|
||||
secret_key="sk",
|
||||
config_root=tmp_path,
|
||||
)
|
||||
path = save_agent_config(cfg)
|
||||
assert path.exists()
|
||||
loaded = try_load_agent_config(tmp_path)
|
||||
assert loaded is not None
|
||||
assert loaded.device_id == "laptop"
|
||||
assert loaded.endpoint_url.endswith("example.com")
|
||||
assert loaded.secret_key == "sk"
|
||||
Reference in New Issue
Block a user