nixos/tests/nextcloud: use lib instead of pkgs.lib wherever trivial
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}\"")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -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 ];
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ runTest (
|
||||
in
|
||||
{
|
||||
inherit name;
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [
|
||||
onny
|
||||
ma27
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user