depot/third_party/nixpkgs/nixos/tests/packagekit.nix
Default email bfd56a1002 Project import generated by Copybara.
GitOrigin-RevId: 0a5f5bab0e08e968ef25cff393312aa51a3512cf
2021-04-19 05:05:28 +02:00

25 lines
662 B
Nix

import ./make-test-python.nix ({ pkgs, ... }: {
name = "packagekit";
meta = with pkgs.lib.maintainers; {
maintainers = [ peterhoeg ];
};
machine = { ... }: {
environment.systemPackages = with pkgs; [ dbus ];
services.packagekit = {
enable = true;
};
};
testScript = ''
start_all()
# 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.wait_for_unit("packagekit.service")
'';
})