Commit Graph

42 Commits

Author SHA1 Message Date
Yureka
cfbde8ec8d nixos/tests/gitlab: reduce memory usage
Co-Authored-By: Yaya <github@uwu.is>
2024-04-02 07:30:12 +02:00
Oliver Schmidt
13ba002dd0 nixos/services.gitlab: loosen the coupling between gitlab and postgres/ redis to avoid restarts and races
Gitlab stays running at redis and postgresql restarts as if these
components were on a different host anyways. Handling reconnetctions is
part of the application logic.

Co-authored-by: Kim Lindberger <kim.lindberger@gmail.com>
for formatting fixes and test failure debugging.
2024-02-07 18:19:18 +01:00
K900
aa3cd9c955 nixos/tests/gitlab: download even more RAM
Also remove the 32-bit conditional as it already fails on 4GB.
2023-12-18 11:35:09 +03:00
Yureka
82d9c2e91f nixosTests.gitlab: fix project ids 2023-05-31 22:14:25 +02:00
Anderson Torres
aec8dddef7 nixos/tests/gitlab.nix: get rid of with lib 2023-05-12 22:29:30 -03:00
Robert Hensing
8b2d1e4554
nixos/tests/gitlab.nix: Document running it
`nix-build $file` is not possible anymore, so this helps both newcomers and old hands.
It's documented in the manual, but that's far away.
2023-05-11 14:31:21 +02:00
Yaya
439625d5d5 nixosTests.gitlab: Use module system based runner 2023-05-11 07:31:13 +00:00
Yureka
7efee351ec
Merge branch 'gitlab-pages' of github.com:talyz/nixpkgs into HEAD 2023-03-10 14:36:25 +01:00
talyz
dbd563b9b8
nixos/gitlab: Improve support for GitLab Pages
- provide options and set defaults for important settings
- generate the shared secret
- reenable gitlab-pages in test
2023-01-17 17:33:47 +01:00
Yaya
3cd1bd5888 nixos/tests/gitlab: Fix a regression introduced in 15.7.0
```
{"message":{"password":["must not contain commonly used combinations of
words and letters"]}}
```
2023-01-10 22:53:33 -05:00
Robert Hensing
67ebd123ff nixos/tests/gitlab: Optimize with EROFS 2022-07-17 14:56:35 +02:00
Yaya
c77dd2c4f1
nixos/tests/gitlab: Add additional test cases (#167223)
This commit implements the following additional test cases for gitlab:
- Creating regular users
- git clone over http and ssh
- git push over ssh
- Forking projects
- Creating and merging Merge Requests
- Opening and closing issues.
2022-05-02 15:21:18 +02:00
Yaya
8465654f6a nixos/tests/gitlab: Add yayayayaka to maintainers 2022-03-31 21:56:18 +02:00
Yaya
35251c637b nixos/tests/gitlab: Check HTTP response codes
cURL always exits with `0` even when the HTTP response codes are above
400, leading to false-positive test results.
2022-03-31 21:56:18 +02:00
Yaya
86ec4e306e nixos/tests/gitlab: Fix project id
Gitlab automatically creates a repository, taking away the project
id=1.
2022-03-31 21:56:18 +02:00
Yaya
28068cebc9 nixos/tests/gitlab: Fix Authorization Bearer field
Due to an incorrect shell escape the Authorization Bearer Token was not
present in the cURL request headers.
2022-03-31 21:56:18 +02:00
talyz
ed2497b405 gitlab.tests: Improve test performance
Massively reduce the time it takes running the test by building a
proper root disk image and increasing the virtualized core count to
4. This should make it much easier for the tests to pass even on
weaker systems.

With my laptop (AMD Ryzen 7 PRO 2700U) as the reference system, I see
the following test run times:

- No change:
  Times out after 28 mins

- Building a root image:
  7 mins, 48 secs

- Building a root image and bumping the core count:
  7 mins, 17 secs

The times include the time it takes to build the image
(~1 min, 20 secs).
2021-10-28 12:55:01 +02:00
talyz
99387372d5
gitlab: 14.1.2 -> 14.2.1 2021-08-26 19:01:22 +02:00
Yureka
6b021012c5 nixos/tests/gitlab: disable gitlab-pages tests 2021-08-02 18:04:54 +02:00
talyz
3d9c3e5cfd
nixosTests.*: Don't use the -q flag with grep when used with curl
The `-q` flag makes grep close the pipe early, which curl doesn't
handle gracefully, but exits with an error like "(23) Failed writing
body".
2021-06-05 18:44:54 +02:00
talyz
1215bd4ea9
Revert "nixos/tests/gitlab: add 32 byte secrets"
This reverts commit d6e0d38b84.

We need shorter secrets to continue working, since the earlier
recommendation was too short and there's no way to rotate the them.
2021-04-27 18:08:59 +02:00
talyz
35582c5af7
gitlab.tests: Test backup and restore
Test the automatic backup and restore functionality by backing up the
instance after running the initial tests, stopping GitLab and removing
all state, running the restore rake task, then running the tests
again, but without pushing data.
2021-03-30 19:13:37 +02:00
talyz
f38c601b54
nixosTests.gitlab: Test pages and mailroom service start
Make sure that the `gitlab-pages` and `gitlab-mailroom` services at
least start.
2021-02-26 19:54:11 +01:00
Dominik Xaver Hörl
25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00
Milan Pässler
d6e0d38b84 nixos/tests/gitlab: add 32 byte secrets 2020-11-21 01:39:08 +01:00
Florian Klink
1d65113d41 nixosTests.gitlab: port to python 2019-11-22 23:08:06 +01:00
Florian Klink
2f3b9cd52c
Merge pull request #66274 from talyz/gitlab
nixos/gitlab: Add support for secure secrets and more
2019-09-07 12:52:44 -07:00
talyz
cbdf94c0f3 nixos/gitlab: Add support for storing secrets in files
Add support for storing secrets in files outside the nix store, since
files in the nix store are world-readable and secrets therefore can't
be stored safely there.

The old string options are kept, since they can potentially be handy
for testing purposes, but their descriptions now state that they
shouldn't be used in production. The manual section is updated to use
the file options rather than the string options and the tests now test
both.
2019-09-06 16:54:22 +02:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Johan Thomsen
968d3c9c05 nixos/gitlab: improved test to check download of repository archives 2019-03-12 15:04:45 +00:00
Florian Klink
a9eae44ee5 gitlab: run test with 4096 bits if on 64bit, else the the maximum for 32bit 2018-12-16 19:47:35 +01:00
Florian Klink
5c82aa8854 pkgsi686Linux.nixosTests.gitlab: fix 32 bit tests
GitLab 11.5.1 dropped the dependency to posix_spawn, which is broken on
32bit. (See https://gitlab.com/gitlab-org/gitlab-ce/issues/53525)

The only part missing is decreasing virtualisation.memorySize to
something that a 32 bit qemu still executes.

The maximum seems to be 2047, and tests passed with that value for me.
2018-12-05 10:47:18 +01:00
Florian Klink
6870eafe72 gitlab tests: enable recommendedProxySettings, test redirection works as it should
The nixos test is a bit misleading, as the given nginx configuration
would always cause gitlab to redirect to localhost, which is clearly not
what you want in a production setup.

Instead we now enable services.nginx.recommendedProxySettings,
curl against http://gitlab, and assure we get redirected to that same
hostname, too.
2018-11-23 19:44:45 +01:00
Robin Gloster
74df0823f3
gitlab: fix smtp setting
fixes #50163
2018-11-14 18:58:45 +01:00
Robin Gloster
ec7cb84bf0
gitlab: refactor and fix test 2018-11-02 22:40:21 +01:00
volth
2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
Sarah Brofeldt
294bb6daea nixos/tests/gitlab.nix: Unbreak config, still times out 2017-11-06 14:52:33 +01:00
Domen Kožar
b49bf121b8 rename iElectric to domenkozar to match GitHub 2016-05-17 13:00:47 +01:00
Joachim Schiele
0731489953 all tests: added meta.maintainers section 2015-07-12 12:29:51 +02:00
Domen Kožar
d2462e2957 nixos/tests/gitlab.nix: set TimeoutStartSec to 10min
(cherry picked from commit 5bafb9cf0fea00470be4ff9b342849339297eeb4)
Signed-off-by: Domen Kožar <domen@dev.si>
2014-12-17 16:40:53 +01:00
Jaka Hudoklin
bbc44bf0da nixos/gitlab: imporove tests 2014-12-14 02:30:13 +01:00
Jaka Hudoklin
13e58784bf nixos/gitlab: fixes
- fix timezone data not found
- fix module, add simple test
- allow to set port
2014-12-12 18:01:31 +01:00