mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
nixos/packagekit: add test
This commit is contained in:
parent
1bc408ec3a
commit
ab15949f81
|
@ -180,6 +180,7 @@ in
|
|||
osrm-backend = handleTest ./osrm-backend.nix {};
|
||||
ostree = handleTest ./ostree.nix {};
|
||||
overlayfs = handleTest ./overlayfs.nix {};
|
||||
packagekit = handleTest ./packagekit.nix {};
|
||||
pam-oath-login = handleTest ./pam-oath-login.nix {};
|
||||
pam-u2f = handleTest ./pam-u2f.nix {};
|
||||
pantheon = handleTest ./pantheon.nix {};
|
||||
|
|
24
nixos/tests/packagekit.nix
Normal file
24
nixos/tests/packagekit.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
name = "packagekit";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ peterhoeg ];
|
||||
};
|
||||
|
||||
machine = { ... }: {
|
||||
environment.systemPackages = with pkgs; [ dbus ];
|
||||
services.packagekit = {
|
||||
enable = true;
|
||||
backend = "test_nop";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
# send a dbus message to activate the service
|
||||
$machine->succeed("dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.DBus.Introspectable.Introspect");
|
||||
|
||||
# so now it should be running
|
||||
$machine->succeed("systemctl is-active packagekit.service");
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue