summary refs log tree commit diff
path: root/nixos/tests/packagekit.nix
blob: 7e93ad35e80a84d34772e538fbfc960249b9a010 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import ./make-test-python.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 = ''
    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")
  '';
})