Skip to content

Commit b3487e3

Browse files
committed
login1: fix TestListSessions for new systemd
On newer distros, some session paths have c instead of _. Fix the test accordingly. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent b7c715d commit b3487e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

login1/dbus_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestListSessions(t *testing.T) {
5353
t.Fatalf("expected uid '%d' but got '%s'", s.UID, lookup.Uid)
5454
}
5555

56-
validPath := regexp.MustCompile(`/org/freedesktop/login1/session/_[0-9]+`)
56+
validPath := regexp.MustCompile(`/org/freedesktop/login1/session/[_c][0-9]+`)
5757
if !validPath.MatchString(fmt.Sprint(s.Path)) {
5858
t.Fatalf("invalid session path: %s", s.Path)
5959
}

0 commit comments

Comments
 (0)