Commit graph

19 commits

Author SHA1 Message Date
Maximilian Bosch 255e1c3cb9
nixos/tests/nextcloud: fix eval 2025-10-24 17:10:15 +02:00
Wolfgang Walther 41c5662cbe
nixos/postgresql: move postStart into separate unit
This avoids restarting the postgresql server, when only ensureDatabases
or ensureUsers have been changed. It will also allow to properly wait
for recovery to finish later.

To wait for "postgresql is ready" in other services, we now provide a
postgresql.target.

Resolves #400018

Co-authored-by: Marcel <me@m4rc3l.de>
2025-06-24 15:26:47 +02:00
networkException 23468ad19f
nixos/nextcloud: use LoadCredential to read services.nextcloud.secretFile
This patch adds support for using systemd's LoadCredential
feature to read in a json file at a path defined in the
services.nextcloud.secretFile option.

This is a follow up to 2ce1e84103.
2025-05-10 20:36:01 +02:00
Maximilian Bosch d3110c9532
nextcloud: update maintainer information
* Create a dedicated team. Before, information was inconsistent between
  e.g. tests and package, module had none at all.
* Add maintainership from us to all trivially packaged apps. This is
  only to make sure that we take care of them building and installing
  and that's about it.
2025-03-25 12:41:18 +00:00
networkException 549d8a6d44
nixos/tests/nextcloud: fix redis cache non empty tests
This patch changes the implementation of the subtests to
check for redis' cache being non empty to only run redis-cli
and jq in a shell and assert the returned length in python.

This fixes jq "len" simply not compiling and makes sure
regressions get noticed.
2025-01-21 13:13:36 +01:00
networkException 18de1c264e
nixos/tests/nextcloud: use lib instead of pkgs.lib wherever trivial 2025-01-21 13:13:35 +01:00
networkException 9ffa0a5945
nixos/tests/nextcloud: test for notify_push in with-declarative-redis-and-secrets
This patch adds a subtest and corresponding configuration to
with-declarative-redis-and-secrets to test for nextcloud notify_push
to be working, just as in with-postgresql-and-redis.

As notify_push needs to connect to the database, including it
in this test checks that it can read the dbpassFile properly.
2025-01-21 13:13:30 +01:00
Maximilian Bosch b95a9171dd
nixos/nextcloud: don't use pg14 for tests
This currently fails to build, so we just update it now to make sure all
tests are green with the current changes.
2024-12-31 00:05:52 +01:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Maximilian Bosch 02be206846
nixos/nextcloud: add nc version to drv name of mysql & declarative redis test 2024-09-30 22:21:29 +02:00
Maximilian Bosch cd6157bea4
nixos/nextcloud: re-add declarative-redis-and-secrets to matrix
Just noticed that I apparently disabled this test while restructuring
the Nextcloud tests[1] effectively disabling the test.

This patch re-adds it and adjusts the code accordingly.

I also noticed that the old check whether the cache is actually used
(`test "[]" = "$(redis-cli --json KEYS "*")"`) was broken because the
`nextcloud.fail()` hid the fact that the `redis-cli` invocation was
failing due to a missing password. Fixed the subtest accordingly.

[1] 0b31ada92b
2024-09-30 22:15:03 +02:00
Jonas Heinrich e1c0d281b2 nixos/nextcloud: Rename extraOptions to settings 2024-01-26 14:22:49 +01:00
Sandro Jäckel 79e3ab84dd
nixos/tests/nextcloud: fix with-declarative-redis-and-secrets test 2023-11-25 22:58:06 +01:00
Jonas Heinrich b0ba7d2406 nixos/tests/nextcloud: Fix broken webdav url
Starting with Rclone v1.63, which is used in the Nextcloud tests for
synchronization, the client relies on the correct WebDAV endpoint url,
see https://github.com/rclone/rclone/issues/7103
2023-08-01 09:11:27 +02:00
Maximilian Bosch cac7282c17
nixos/tests/nextcloud: fix more issues related to redis tests
* Ensure that the redis cache is actually used in the "trivial" case
  (`with-postgresql-and-redis`)
* Test against all Nextcloud versions we've packaged
* Actually set a secret to make sure that the provided secret is
  properly read by Nextcloud.
* Add myself as maintainer to the secret-test to make sure that I don't
  miss any more changes like this that could break the functionality of
  that feature.
2023-06-17 14:04:44 +02:00
Maximilian Bosch 3df3a89892
nixos/nextcloud: fix declarative cache configuration
It's supposed to be `memcache.distributed`, not an associative PHP array
named `memcache` with a key `distributed`.

This was probably never caught because the initial `grep -q` check in
the test was invalid: `redis-cli` prints nothing if no keys can be found
when not writing to a tty apparently.
2023-06-16 14:11:38 +02:00
Gabriel Fontes fddf531c6f
nixos/nextcloud: refactor database.createLocally
Fixes https://github.com/NixOS/nixpkgs/issues/228971
2023-05-01 12:20:40 -03:00
Maximilian Bosch f72099e0cd
nixos/nextcloud: fix a deprecation warning in the tests using redis 2022-09-10 23:53:40 +02:00
stuebinm 5f4d5fcfa4 services/nextcloud: apply suggestions 2022-07-06 00:16:04 +02:00
Renamed from nixos/tests/nextcloud/with-declarative-redis.nix (Browse further)