Name no node in sudo's fixtures (issue 1838)

This commit is contained in:
jochen
2026-10-22 21:34:50 +02:00
parent 14a5c1c80a
commit e7112ad575
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func TestTheDropInGrantsExactlyTheOperatorAccountAndParses(t *testing.T) {
if err != nil {
t.Skip("visudo is not installed here; the rendered drop-in is not checked")
}
for _, account := range []string{"operator", "ace", "jochen-s"} {
for _, account := range []string{"operator", "node-a", "jochen-s"} {
file := filepath.Join(t.TempDir(), "10-mesh-operator")
rendered := strings.ReplaceAll(content, "${machine:account}", account)
if err := os.WriteFile(file, []byte(rendered), 0o440); err != nil {
+2 -2
View File
@@ -5,7 +5,7 @@ import (
"testing"
)
const listNovox = `Matching Defaults entries for operator on anchor:
const listAnchor = `Matching Defaults entries for operator on anchor:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/bin
User operator may run the following commands on anchor:
@@ -14,7 +14,7 @@ User operator may run the following commands on anchor:
`
func TestSudoListIsParsedIntoDefaultsAndRules(t *testing.T) {
r := ParseList(listNovox, "x")
r := ParseList(listAnchor, "x")
if r.Account != "operator" || r.Host != "anchor" {
t.Fatalf("who: %+v", r)
}