3
0
Fork 0
forked from mirrors/nixpkgs

nixosTests.gitlab: Use module system based runner

This commit is contained in:
Yaya 2023-05-11 07:07:37 +00:00
parent 0bda75b520
commit 439625d5d5
2 changed files with 8 additions and 8 deletions

View file

@ -267,7 +267,7 @@ in {
gitdaemon = handleTest ./gitdaemon.nix {};
gitea = handleTest ./gitea.nix { giteaPackage = pkgs.gitea; };
github-runner = handleTest ./github-runner.nix {};
gitlab = handleTest ./gitlab.nix {};
gitlab = runTest ./gitlab.nix;
gitolite = handleTest ./gitolite.nix {};
gitolite-fcgiwrap = handleTest ./gitolite-fcgiwrap.nix {};
glusterfs = handleTest ./glusterfs.nix {};

View file

@ -6,7 +6,7 @@
# - Creating Merge Requests and merging them
# - Opening and closing issues.
# - Downloading repository archives as tar.gz and tar.bz2
import ./make-test-python.nix ({ pkgs, lib, ... }:
{ pkgs, lib, ... }:
with lib;
@ -174,7 +174,7 @@ in {
gitlab.wait_for_unit("gitlab.service")
gitlab.wait_for_unit("gitlab-pages.service")
gitlab.wait_for_unit("gitlab-sidekiq.service")
gitlab.wait_for_file("${nodes.gitlab.config.services.gitlab.statePath}/tmp/sockets/gitlab.socket")
gitlab.wait_for_file("${nodes.gitlab.services.gitlab.statePath}/tmp/sockets/gitlab.socket")
gitlab.wait_until_succeeds("curl -sSf http://gitlab/users/sign_in")
'';
@ -419,15 +419,15 @@ in {
+ ''
gitlab.systemctl("start gitlab-backup.service")
gitlab.wait_for_unit("gitlab-backup.service")
gitlab.wait_for_file("${nodes.gitlab.config.services.gitlab.statePath}/backup/dump_gitlab_backup.tar")
gitlab.wait_for_file("${nodes.gitlab.services.gitlab.statePath}/backup/dump_gitlab_backup.tar")
gitlab.systemctl("stop postgresql.service gitlab.target")
gitlab.succeed(
"find ${nodes.gitlab.config.services.gitlab.statePath} -mindepth 1 -maxdepth 1 -not -name backup -execdir rm -r {} +"
"find ${nodes.gitlab.services.gitlab.statePath} -mindepth 1 -maxdepth 1 -not -name backup -execdir rm -r {} +"
)
gitlab.succeed("systemd-tmpfiles --create")
gitlab.succeed("rm -rf ${nodes.gitlab.config.services.postgresql.dataDir}")
gitlab.succeed("rm -rf ${nodes.gitlab.services.postgresql.dataDir}")
gitlab.systemctl("start gitlab-config.service gitaly.service gitlab-postgresql.service")
gitlab.wait_for_file("${nodes.gitlab.config.services.gitlab.statePath}/tmp/sockets/gitaly.socket")
gitlab.wait_for_file("${nodes.gitlab.services.gitlab.statePath}/tmp/sockets/gitaly.socket")
gitlab.succeed(
"sudo -u gitlab -H gitlab-rake gitlab:backup:restore RAILS_ENV=production BACKUP=dump force=yes"
)
@ -435,4 +435,4 @@ in {
''
+ waitForServices
+ test false;
})
}