diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-04-24 16:45:29 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2019-04-24 22:31:36 +0800 |
commit | ab15949f81c80027decdb4554b1f4f8ba4fe8d03 (patch) | |
tree | 0045428d83a885113fbb43f359ea9d4dc55c2441 /nixos | |
parent | 1bc408ec3af8ae7244fccd156dc7d4bb61a3638e (diff) | |
download | nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.tar nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.tar.gz nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.tar.bz2 nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.tar.lz nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.tar.xz nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.tar.zst nixpkgs-ab15949f81c80027decdb4554b1f4f8ba4fe8d03.zip |
nixos/packagekit: add test
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/packagekit.nix | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8b27ff808e6..5efa4dc72d0 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/packagekit.nix b/nixos/tests/packagekit.nix new file mode 100644 index 00000000000..e2d68af661f --- /dev/null +++ b/nixos/tests/packagekit.nix @@ -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"); + ''; +}) |