test: update test suite for git-gate manifest redesign (PRD 0047)
- fixtures.py: fixture_with_git_dict uses git-gate.repos + url/identity/host_key - test_manifest_git: rewrite to use git-gate.repos; replace duplicate-name test (names = dict keys, always unique) with two-repos-different-hosts test - test_manifest_git_user: _manifest → git-gate.user; update error message assertions - test_manifest_agent_git_user: git → git-gate throughout; repos rejection test - test_manifest_extends: git.remotes/git.user → git-gate.repos/git-gate.user - test_provision_git: IP test updated — no host alias, single insteadOf - test_compose: git.remotes → git-gate.repos + new field names - test_docker_provision_git_user: git.user → git-gate.user - test_git_gate: inline manifest dict updated to git-gate.repos - test_smolmachines_provision: git_json → git_gate_json; remove _remote_host
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Unit: Bottle git.user manifest parsing + validation (issue #86)."""
|
||||
"""Unit: Bottle git-gate.user manifest parsing + validation (issue #86, PRD 0047)."""
|
||||
|
||||
import unittest
|
||||
|
||||
@@ -16,7 +16,7 @@ def _error_message(callable_, *args, **kwargs) -> str:
|
||||
|
||||
def _manifest(git_user):
|
||||
return {
|
||||
"bottles": {"dev": {"git": {"user": git_user}}},
|
||||
"bottles": {"dev": {"git-gate": {"user": git_user}}},
|
||||
"agents": {"demo": {"skills": [], "prompt": "", "bottle": "dev"}},
|
||||
}
|
||||
|
||||
@@ -75,13 +75,13 @@ class TestGitUserParsing(unittest.TestCase):
|
||||
msg = _error_message(
|
||||
Manifest.from_json_obj, _manifest({"name": 42}),
|
||||
)
|
||||
self.assertIn("git.user.name must be a string", msg)
|
||||
self.assertIn("git-gate.user.name must be a string", msg)
|
||||
|
||||
def test_non_string_email_dies(self):
|
||||
msg = _error_message(
|
||||
Manifest.from_json_obj, _manifest({"email": ["x@y.z"]}),
|
||||
)
|
||||
self.assertIn("git.user.email must be a string", msg)
|
||||
self.assertIn("git-gate.user.email must be a string", msg)
|
||||
|
||||
def test_legacy_top_level_git_user_dies(self):
|
||||
msg = _error_message(
|
||||
@@ -92,7 +92,7 @@ class TestGitUserParsing(unittest.TestCase):
|
||||
},
|
||||
)
|
||||
self.assertIn("git_user", msg)
|
||||
self.assertIn("git.user", msg)
|
||||
self.assertIn("git-gate.user", msg)
|
||||
|
||||
|
||||
class TestGitUserDirect(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user