Modernize provider support
This commit is contained in:
@@ -202,6 +202,13 @@ class TestConfig:
|
||||
assert restored.auto_fetch_from_registry is False
|
||||
assert restored.default_provider == "claude"
|
||||
|
||||
def test_save_config_uses_private_permissions(self, tmp_path):
|
||||
with patch("cmdforge.config.CONFIG_DIR", tmp_path / ".cmdforge"):
|
||||
path = save_config(Config(registry=RegistryConfig(token="test_token")))
|
||||
|
||||
assert oct(path.parent.stat().st_mode & 0o777) == "0o700"
|
||||
assert oct(path.stat().st_mode & 0o777) == "0o600"
|
||||
|
||||
|
||||
class TestRegistryClient:
|
||||
"""Tests for the registry client (mocked)."""
|
||||
|
||||
Reference in New Issue
Block a user