Commit Graph

10 Commits

Author SHA1 Message Date
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