tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Add a regression test for #14623
Eelco Dolstra
9 years ago
a42698d2
9153d8ed
+13
-2
2 changed files
expand all
collapse all
unified
split
nixos
tests
common
user-account.nix
xfce.nix
+7
-2
nixos/tests/common/user-account.nix
···
1
{ lib, ... }:
2
3
-
{ users.extraUsers = lib.singleton
4
{ isNormalUser = true;
5
-
name = "alice";
6
description = "Alice Foobar";
0
0
0
0
0
0
7
password = "foobar";
8
};
9
}
···
1
{ lib, ... }:
2
3
+
{ users.extraUsers.alice =
4
{ isNormalUser = true;
0
5
description = "Alice Foobar";
6
+
password = "foobar";
7
+
};
8
+
9
+
users.extraUsers.bob =
10
+
{ isNormalUser = true;
11
+
description = "Bob Foobar";
12
password = "foobar";
13
};
14
}
+6
nixos/tests/xfce.nix
···
15
services.xserver.displayManager.auto.user = "alice";
16
17
services.xserver.desktopManager.xfce.enable = true;
0
0
18
};
19
20
testScript =
···
32
$machine->waitForWindow(qr/Terminal/);
33
$machine->sleep(10);
34
$machine->screenshot("screen");
0
0
0
0
35
'';
36
})
···
15
services.xserver.displayManager.auto.user = "alice";
16
17
services.xserver.desktopManager.xfce.enable = true;
18
+
19
+
environment.systemPackages = [ pkgs.xorg.xmessage ];
20
};
21
22
testScript =
···
34
$machine->waitForWindow(qr/Terminal/);
35
$machine->sleep(10);
36
$machine->screenshot("screen");
37
+
38
+
# Ensure that the X server does proper access control.
39
+
$machine->mustFail("su - bob -c 'DISPLAY=:0.0 xmessage Foo'");
40
+
$machine->mustFail("su - bob -c 'DISPLAY=:0 xmessage Foo'");
41
'';
42
})