Name no node in postgres's, ssh-client's and mesh-mail-web's fixtures (issue 1838)
This commit is contained in:
@@ -48,7 +48,7 @@ func keygenStandIn(ctx context.Context, env []string, name string, args ...strin
|
||||
// 1480/AC1
|
||||
func TestTheBundlesKeeperIsForgekeysOfKindMachineWithItsEntryAtNodeAccount(t *testing.T) {
|
||||
home, st := t.TempDir(), &recordState{}
|
||||
k := keeperFor(home, "g14", "nox", keygenStandIn, st)
|
||||
k := keeperFor(home, "node-b", "nox", keygenStandIn, st)
|
||||
k.Now = func() time.Time { return time.Date(2026, 10, 20, 12, 0, 0, 0, time.UTC) }
|
||||
if err := k.Once(context.Background()); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -56,15 +56,15 @@ func TestTheBundlesKeeperIsForgekeysOfKindMachineWithItsEntryAtNodeAccount(t *te
|
||||
if _, err := os.Stat(filepath.Join(home, ".ssh", "mesh_ed25519")); err != nil {
|
||||
t.Errorf("the key file mesh_ed25519 was not made in an empty home: %v", err)
|
||||
}
|
||||
raw, ok := st.puts["g14.nox"]
|
||||
raw, ok := st.puts["node-b.nox"]
|
||||
if !ok || len(st.puts) != 1 {
|
||||
t.Fatalf("entries = %v, want one at g14.nox", st.puts)
|
||||
t.Fatalf("entries = %v, want one at node-b.nox", st.puts)
|
||||
}
|
||||
var e forgekey.KeyEntry
|
||||
if err := json.Unmarshal(raw, &e); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if e.Kind != "machine" || e.Node != "g14" || e.Account != "nox" || !strings.HasSuffix(e.Public, " nox@g14 (mesh)") {
|
||||
if e.Kind != "machine" || e.Node != "node-b" || e.Account != "nox" || !strings.HasSuffix(e.Public, " nox@node-b (mesh)") {
|
||||
t.Errorf("entry = %s", raw)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user