Commit Graph

20 Commits

Author SHA1 Message Date
Sandro
799d6cf2a2 nixos/tests: set proper derivation names for various tests (#452014) 2026-08-30 02:04:49 +00:00
emilylange
61124922a9 nixos/tests/forgejo: test nixos/forgejo-runner 2026-08-15 18:51:00 +02:00
h7x4
4c04504332 nixos/tests: set proper derivation names for various tests 2026-07-24 06:19:35 +09:00
Jacek Galowicz
f99f026911 nixosTests: switch from deprecated copy_from_vm to copy_from_machine 2026-05-02 15:40:03 +02:00
dish
078dd5303a nixosTests.forgejo: Adopt by forgejo team 2025-12-12 15:39:18 -05:00
Adam C. Stephens
513349d0ed forgejo: rename bin/gitea -> bin/forgejo 2025-09-25 09:00:33 -04:00
Chris Moultrie
7fb53a9eeb tests/forgejo: tebriel added to maintainers 2025-09-02 19:08:44 -04:00
emilylange
1c8cb24d42 nixosTests.forgejo{,-lts}: simplify workflow subtest
This is substantially less hacky and less fragile than the previous
approach that used htmlq to parse the raw html returned by the frontend
and then compared the extracted status against a hardcoded list of known
translated statuses.

Back when this subtest was added, there simply was no API endpoint to
gather this information yet. I had this in my out of tree variant of
Forgejo for a while now.

Requires Forgejo v8.0.0+
2025-04-12 23:16:53 +02:00
emilylange
b5a6b91b33 nixosTests.forgejo{,-lts}: migrate to runTest
This is part of the bigger handleTest deprecation.

See 7e3c66897a.
2025-03-24 18:38:09 +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
emilylange
9a4e945ceb nixos/tests/forgejo: fix after git v2.47 bump
git v2.47.0 made changes to trace2's nesting.

trace2.eventNesting (GIT_TRACE2_EVENT_NESTING) defaults to 2, but the
nested region we are after gained a level and is now at level 3 instead
of 2.

eventNesting describes the maximum nesting level to be logged.
So to make it log the negotated-version in connect.c again, we increase
the default by one, from 2 to 3.
2024-11-04 17:34:54 +01:00
emilylange
bde28ca593 nixos/tests/forgejo: add forgejo-lts variant 2024-07-31 03:59:13 +02:00
emilylange
fd58d2299b nixos/tests/forgejo: test cfg.secrets using /metrics endpoint
Heavily inspired by b59e5a34e7 (gitea).
2024-06-05 00:46:00 +02:00
Adam Stephens
6c359d6488 forgejo: 1.21.11-1 -> 7.0.0 2024-04-23 19:04:25 -04:00
emilylange
117a1a6a2c nixos/tests/forgejo: test Forgejo Runner registration and workflow
Instead of only testing the runner registration, which doesn't tell us
all that much, we now test a (very simple) but actual workflow directly
runner on the host (type `:host`).

For this to work, we cache the official `actions/checkout` action from
GitHub as FOD and essentially mirror one version of it to Forgejo as
part of the test.

Since Forgejo does not yet provide an API endpoint for the workflow status
(whether a workflow is running, failed or successful), we have to resort
to parsing html for now.

It has some rather over the top poll logic, but I feel like will work
for quite some time without issues going unnoticed or whatever (TM).

This is essentially a response to a bug I found in
`services.gitea-actions-runner`, because we had no way to test that
module besides the runner registration (which, again, doesn't really
tell us all that much).
2024-04-10 22:09:56 +02:00
emilylange
45e438f5eb nixos/tests/forgejo: remove one of the two clients, offload ssh & git config, refactor
We inherited almost all of this test from `nixos/tests/gitea` when we
decided to split.

This change saves some resources (just 2 instead of 3 VMs) and is (IMHO)
easier to follow and improve upon.
2024-04-10 22:09:08 +02:00
emilylange
680bc07727 nixosTests.forgejo: test /api/forgejo/v1/version
We forgot to set two version related ldflags in our packaging and this
should prevent this from going unnoticed again.

Further details are in dab7aa20ed.
2024-04-02 17:04:29 +02:00
emilylange
98ebe7b877 nixosTests.forgejo: test git wire protocol version
Co-Authored-By: networkException <git@nwex.de>
2023-10-24 03:32:03 +02:00
emilylange
6431fec2c4 nixosTests.forgejo: test backup/dump service
This should allow us to catch issues regarding that in the future.

nixos/gitea had an issue with the dump service recently, which didn't
affect us, fortunately.
But to be fair, it only affected non-default-y setups.
Not something we are able to catch in the current, rather simple, config
of our test.
Still, I see a lot of value adding this new subtest to our test suite.

Anyhow, this patch also exposes the resulting tarball as test (build)
output, which is a nice addition IMHO, as it allows some sort of
external sanity-check, if needed, without running the test interactive.
2023-10-24 02:32:56 +02:00
emilylange
02601e17a5 nixosTests.forgejo: fork from nixosTests.gitea 2023-08-06 18:41:37 +02:00