Skip to content

Commit

Permalink
nixos/tests/nextcloud: use lib instead of pkgs.lib wherever trivial
Browse files Browse the repository at this point in the history
  • Loading branch information
networkException committed Dec 22, 2024
1 parent bbf236a commit 6fece8a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions nixos/tests/nextcloud/basic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions nixos/tests/nextcloud/with-declarative-redis-and-secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <<EOF
CREATE ROLE ${adminuser} WITH LOGIN PASSWORD '$password' CREATEDB;
Expand Down Expand Up @@ -106,7 +106,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}\"")
'';
}
Expand Down
4 changes: 2 additions & 2 deletions nixos/tests/nextcloud/with-mysql-and-memcached.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/nextcloud/with-objectstore.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runTest (
in
{
inherit name;
meta = with pkgs.lib.maintainers; {
meta = with lib.maintainers; {
maintainers = [
onny
ma27
Expand Down
6 changes: 3 additions & 3 deletions nixos/tests/nextcloud/with-postgresql-and-redis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"):
Expand Down

0 comments on commit 6fece8a

Please sign in to comment.