Skip to content

Commit 4c7ed1e

Browse files
committed
kola/tests/ignition/passwd: accept both * and ! for group passwords
Both * and ! are functionally equivalent
1 parent f09a7c8 commit 4c7ed1e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mantle/kola/tests/ignition/passwd.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,12 @@ func testGroup(c cluster.TestCluster, m platform.Machine, tests []groupTest) {
167167
} else if out != t.groupRecord {
168168
c.Errorf("%q wasn't correctly created: got %q, expected %q", t.group, out, t.groupRecord)
169169
}
170-
if out, err := getent(c, m, "gshadow", t.group); err != nil {
170+
out, err := getent(c, m, "gshadow", t.group)
171+
if err != nil {
171172
c.Fatal(err)
172-
} else if out != t.gshadowRecord {
173+
}
174+
// Accept both '*' and '!' as locked passwords
175+
if out != t.gshadowRecord && out != strings.Replace(t.gshadowRecord, ":*:", ":!:", 1) {
173176
c.Errorf("%q wasn't correctly created: got %q, expected %q", t.group, out, t.gshadowRecord)
174177
}
175178
}

0 commit comments

Comments
 (0)