Refuse a glob as a unit, and make wanted-by say only what it saw
systemctl expands *, ? and [ in a unit argument, so reset-failed or stop of "*" would have acted on every unit. wanted-by called a link dangling on any stat error, followed a linked .wants anywhere, and missed most of the manager's load path; it now says each of these, and says nothing names a unit only of the directories it searched.
This commit is contained in:
@@ -139,7 +139,7 @@ func TestASystemActEscalatesAndAnswersTheStateAfter(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := append([]string{calls[0].cmd}, calls[0].args...); !reflect.DeepEqual(got, []string{"sudo", "-n", "systemctl", "restart", "sshd.service"}) {
|
||||
if got := append([]string{calls[0].cmd}, calls[0].args...); !reflect.DeepEqual(got, []string{"sudo", "-n", "systemctl", "restart", "--", "sshd.service"}) {
|
||||
t.Fatalf("%v", got)
|
||||
}
|
||||
if r["ok"] != true || r["active"] != "active" || r["mesh_declared"] != false || r["note"] != nil {
|
||||
|
||||
Reference in New Issue
Block a user