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:
@@ -69,13 +69,14 @@ class TestGitGateGitconfigRender(unittest.TestCase):
|
||||
'[url "http://127.0.0.16:57001/bot-bottle.git"]', out,
|
||||
)
|
||||
|
||||
def test_ip_upstream_also_rewrites_logical_remote_key(self):
|
||||
def test_ip_upstream_emits_single_insteadof(self):
|
||||
# In the new format the dict key is the repo name, not a host
|
||||
# alias, so there is only one insteadOf rule — for the IP URL.
|
||||
m = Manifest.from_json_obj({
|
||||
"bottles": {"dev": {"git": {"remotes": {
|
||||
"gitea.dideric.is": {
|
||||
"Name": "bot-bottle",
|
||||
"Upstream": "ssh://git@100.78.141.42:30009/didericis/bot-bottle.git",
|
||||
"IdentityFile": "/dev/null",
|
||||
"bottles": {"dev": {"git-gate": {"repos": {
|
||||
"bot-bottle": {
|
||||
"url": "ssh://git@100.78.141.42:30009/didericis/bot-bottle.git",
|
||||
"identity": "/dev/null",
|
||||
},
|
||||
}}}},
|
||||
"agents": {"demo": {"skills": [], "prompt": "", "bottle": "dev"}},
|
||||
@@ -86,11 +87,7 @@ class TestGitGateGitconfigRender(unittest.TestCase):
|
||||
"ssh://git@100.78.141.42:30009/didericis/bot-bottle.git",
|
||||
out,
|
||||
)
|
||||
self.assertIn(
|
||||
"\tinsteadOf = "
|
||||
"ssh://git@gitea.dideric.is:30009/didericis/bot-bottle.git",
|
||||
out,
|
||||
)
|
||||
self.assertNotIn("gitea.dideric.is", out)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user