Give the forge an ssh name of its own, so it no longer merges with the operator's entry for its machine (issue 955, ADR 0409)
mesh/merge-gate head 661b83249c2a merged into trunk bb291b5ad8af — pass: builds gitea, ssh-client → ace, g14, novox, shanks; no bus step; every machine com…
mesh/repo-check head 661b83249c2a merged into trunk bb291b5ad8af — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered
mesh/merge-gate head 661b83249c2a merged into trunk bb291b5ad8af — pass: builds gitea, ssh-client → ace, g14, novox, shanks; no bus step; every machine com…
mesh/repo-check head 661b83249c2a merged into trunk bb291b5ad8af — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered
This commit is contained in:
@@ -93,7 +93,9 @@ func TestManifestKeepsKeysAndRequiresForgeAccount(t *testing.T) {
|
||||
// Issue 955, area S3: the three files the forge account fills in — known_hosts, the forge's Host, git's rewrite.
|
||||
var sampleBound = map[string]string{
|
||||
"known_host": "[novox.internal]:222 ssh-ed25519 AAAAC3Nza",
|
||||
"host_key": "ssh-ed25519 AAAAC3Nza",
|
||||
"ssh_host": "novox.internal",
|
||||
"ssh_alias": "mesh-forge",
|
||||
"ssh_port": "222",
|
||||
"ssh_base": "ssh://git@novox.internal:222/",
|
||||
"https_base": "https://git.novox.be/",
|
||||
@@ -141,7 +143,7 @@ func TestForgeFilesRenderFromTheBoundValues(t *testing.T) {
|
||||
if kh["into"] != "block" {
|
||||
t.Errorf("known_hosts is %v, want a block", kh["into"])
|
||||
}
|
||||
if got := strings.TrimSpace(renderBound(t, templateText(t, kh))); got != "[novox.internal]:222 ssh-ed25519 AAAAC3Nza" {
|
||||
if got := strings.TrimSpace(renderBound(t, templateText(t, kh))); got != "mesh-forge ssh-ed25519 AAAAC3Nza" {
|
||||
t.Errorf("known_hosts block = %q", got)
|
||||
}
|
||||
|
||||
@@ -149,7 +151,7 @@ func TestForgeFilesRenderFromTheBoundValues(t *testing.T) {
|
||||
if forge["into"] != nil {
|
||||
t.Errorf("10-forge is a block, want the whole file")
|
||||
}
|
||||
want := "Host novox.internal\n Port 222\n User git\n IdentityFile ~/.ssh/mesh_ed25519\n IdentitiesOnly yes\n"
|
||||
want := "Host mesh-forge\n HostName novox.internal\n Port 222\n HostKeyAlias mesh-forge\n User git\n IdentityFile ~/.ssh/mesh_ed25519\n IdentitiesOnly yes\n"
|
||||
if got := renderBound(t, templateText(t, forge)); got != want {
|
||||
t.Errorf("10-forge = %q, want %q", got, want)
|
||||
}
|
||||
@@ -159,7 +161,7 @@ func TestForgeFilesRenderFromTheBoundValues(t *testing.T) {
|
||||
if g["into"] != "block" {
|
||||
t.Errorf("git config is %v, want a block", g["into"])
|
||||
}
|
||||
wantGit := "[url \"ssh://git@novox.internal:222/\"]\n\tinsteadOf = https://git.novox.be/\n"
|
||||
wantGit := "[url \"ssh://mesh-forge/\"]\n\tinsteadOf = https://git.novox.be/\n"
|
||||
if got := renderBound(t, templateText(t, g)); got != wantGit {
|
||||
t.Errorf("git config block = %q, want %q", got, wantGit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user