Unverified Commit 18de1c26 authored by networkException's avatar networkException
Browse files

nixos/tests/nextcloud: use lib instead of pkgs.lib wherever trivial

parent 2ce1e841
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -8,10 +8,10 @@

with import ../../lib/testing-python.nix { inherit system pkgs; };
runTest (
  { config, ... }:
  { config, lib, ... }:
  {
    inherit name;
    meta = with pkgs.lib.maintainers; {
    meta = with lib.maintainers; {
      maintainers = [
        globin
        eqyiel
+4 −4
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@

with import ../../lib/testing-python.nix { inherit system pkgs; };
runTest (
  { config, ... }:
  { config, lib, ... }:
  let
    inherit (config) adminuser;
  in
  {
    inherit name;
    meta = with pkgs.lib.maintainers; {
    meta = with lib.maintainers; {
      maintainers = [
        eqyiel
        ma27
@@ -77,7 +77,7 @@ runTest (
          services.postgresql = {
            enable = true;
          };
          systemd.services.postgresql.postStart = pkgs.lib.mkAfter ''
          systemd.services.postgresql.postStart = lib.mkAfter ''
            password=$(cat ${config.services.nextcloud.config.dbpassFile})
            ${config.services.postgresql.package}/bin/psql <<EOF
              CREATE ROLE ${adminuser} WITH LOGIN PASSWORD '$password' CREATEDB;
@@ -105,7 +105,7 @@ runTest (
          nextcloud.fail('test 0 -lt "$(redis-cli --pass secret --json KEYS "*" | jq "len")"')

      with subtest("notify-push"):
          client.execute("${pkgs.lib.getExe pkgs.nextcloud-notify_push.passthru.test_client} http://nextcloud ${config.adminuser} ${config.adminpass} >&2 &")
          client.execute("${lib.getExe pkgs.nextcloud-notify_push.passthru.test_client} http://nextcloud ${config.adminuser} ${config.adminpass} >&2 &")
          nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${config.adminuser}\"")
    '';
  }
+2 −2
Original line number Diff line number Diff line
@@ -8,10 +8,10 @@

with import ../../lib/testing-python.nix { inherit system pkgs; };
runTest (
  { config, ... }:
  { config, lib, ... }:
  {
    inherit name;
    meta = with pkgs.lib.maintainers; {
    meta = with lib.maintainers; {
      maintainers = [ eqyiel ];
    };

+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ runTest (
  in
  {
    inherit name;
    meta = with pkgs.lib.maintainers; {
    meta = with lib.maintainers; {
      maintainers = [
        onny
        ma27
+3 −3
Original line number Diff line number Diff line
@@ -8,10 +8,10 @@

with import ../../lib/testing-python.nix { inherit system pkgs; };
runTest (
  { config, ... }:
  { config, lib, ... }:
  {
    inherit name;
    meta = with pkgs.lib.maintainers; {
    meta = with lib.maintainers; {
      maintainers = [
        eqyiel
        ma27
@@ -68,7 +68,7 @@ runTest (

    test-helpers.extraTests = ''
      with subtest("notify-push"):
          client.execute("${pkgs.lib.getExe pkgs.nextcloud-notify_push.passthru.test_client} http://nextcloud ${config.adminuser} ${config.adminpass} >&2 &")
          client.execute("${lib.getExe pkgs.nextcloud-notify_push.passthru.test_client} http://nextcloud ${config.adminuser} ${config.adminpass} >&2 &")
          nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${config.adminuser}\"")

      with subtest("Redis is used for caching"):