From 6fece8a88ab2c9418da465d357371544d55b1ebb Mon Sep 17 00:00:00 2001 From: networkException Date: Sun, 22 Dec 2024 21:36:32 +0100 Subject: [PATCH] nixos/tests/nextcloud: use lib instead of pkgs.lib wherever trivial --- nixos/tests/nextcloud/basic.nix | 4 ++-- .../nextcloud/with-declarative-redis-and-secrets.nix | 8 ++++---- nixos/tests/nextcloud/with-mysql-and-memcached.nix | 4 ++-- nixos/tests/nextcloud/with-objectstore.nix | 2 +- nixos/tests/nextcloud/with-postgresql-and-redis.nix | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix index f8306503d85fd4..873618526abb5e 100644 --- a/nixos/tests/nextcloud/basic.nix +++ b/nixos/tests/nextcloud/basic.nix @@ -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 diff --git a/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix b/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix index 44fe68b17e7f77..ec7fe854ced2e9 100644 --- a/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix +++ b/nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix @@ -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 @@ -78,7 +78,7 @@ runTest ( enable = true; package = pkgs.postgresql_14; }; - 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 <&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}\"") ''; } diff --git a/nixos/tests/nextcloud/with-mysql-and-memcached.nix b/nixos/tests/nextcloud/with-mysql-and-memcached.nix index 110047fe661024..55b1e5e5695fbd 100644 --- a/nixos/tests/nextcloud/with-mysql-and-memcached.nix +++ b/nixos/tests/nextcloud/with-mysql-and-memcached.nix @@ -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 ]; }; diff --git a/nixos/tests/nextcloud/with-objectstore.nix b/nixos/tests/nextcloud/with-objectstore.nix index 48e1edea67ba33..ebb6cfac91616c 100644 --- a/nixos/tests/nextcloud/with-objectstore.nix +++ b/nixos/tests/nextcloud/with-objectstore.nix @@ -20,7 +20,7 @@ runTest ( in { inherit name; - meta = with pkgs.lib.maintainers; { + meta = with lib.maintainers; { maintainers = [ onny ma27 diff --git a/nixos/tests/nextcloud/with-postgresql-and-redis.nix b/nixos/tests/nextcloud/with-postgresql-and-redis.nix index 17cdd38330a16e..99708f9a8db40c 100644 --- a/nixos/tests/nextcloud/with-postgresql-and-redis.nix +++ b/nixos/tests/nextcloud/with-postgresql-and-redis.nix @@ -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"):