mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
nixos/tests/nextcloud: use lib instead of pkgs.lib wherever trivial
This commit is contained in:
parent
2ce1e84103
commit
18de1c264e
5 changed files with 12 additions and 12 deletions
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
||||||
runTest (
|
runTest (
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [
|
maintainers = [
|
||||||
globin
|
globin
|
||||||
eqyiel
|
eqyiel
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
|
|
||||||
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
||||||
runTest (
|
runTest (
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config) adminuser;
|
inherit (config) adminuser;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [
|
maintainers = [
|
||||||
eqyiel
|
eqyiel
|
||||||
ma27
|
ma27
|
||||||
|
@ -77,7 +77,7 @@ runTest (
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
systemd.services.postgresql.postStart = pkgs.lib.mkAfter ''
|
systemd.services.postgresql.postStart = lib.mkAfter ''
|
||||||
password=$(cat ${config.services.nextcloud.config.dbpassFile})
|
password=$(cat ${config.services.nextcloud.config.dbpassFile})
|
||||||
${config.services.postgresql.package}/bin/psql <<EOF
|
${config.services.postgresql.package}/bin/psql <<EOF
|
||||||
CREATE ROLE ${adminuser} WITH LOGIN PASSWORD '$password' CREATEDB;
|
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")"')
|
nextcloud.fail('test 0 -lt "$(redis-cli --pass secret --json KEYS "*" | jq "len")"')
|
||||||
|
|
||||||
with subtest("notify-push"):
|
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}\"")
|
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; };
|
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
||||||
runTest (
|
runTest (
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [ eqyiel ];
|
maintainers = [ eqyiel ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ runTest (
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [
|
maintainers = [
|
||||||
onny
|
onny
|
||||||
ma27
|
ma27
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
with import ../../lib/testing-python.nix { inherit system pkgs; };
|
||||||
runTest (
|
runTest (
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
inherit name;
|
inherit name;
|
||||||
meta = with pkgs.lib.maintainers; {
|
meta = with lib.maintainers; {
|
||||||
maintainers = [
|
maintainers = [
|
||||||
eqyiel
|
eqyiel
|
||||||
ma27
|
ma27
|
||||||
|
@ -68,7 +68,7 @@ runTest (
|
||||||
|
|
||||||
test-helpers.extraTests = ''
|
test-helpers.extraTests = ''
|
||||||
with subtest("notify-push"):
|
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}\"")
|
nextcloud.wait_until_succeeds("journalctl -u nextcloud-notify_push | grep -q \"Sending ping to ${config.adminuser}\"")
|
||||||
|
|
||||||
with subtest("Redis is used for caching"):
|
with subtest("Redis is used for caching"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue