power: a lock problem is no longer said once the lock is held
This commit is contained in:
@@ -68,6 +68,15 @@ func TestALostLockIsTakenAgain(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAProblemIsNoLongerSaidOnceTheLockIsHeld(t *testing.T) {
|
||||
w := watcher(t, machine(t, nil), &bus{})
|
||||
w.problem("no delay lock: Permission denied")
|
||||
w.inhibit(&fakeLogin{})
|
||||
if s := w.Snapshot(); !s.Inhibiting || s.Problem != "" {
|
||||
t.Fatalf("%+v", s)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStdinIsNeverTakenForALock(t *testing.T) {
|
||||
if IsInhibitor(0) || IsInhibitor(1) || IsInhibitor(2) {
|
||||
t.Fatal("a standard descriptor was taken for logind's lock")
|
||||
|
||||
Reference in New Issue
Block a user