mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixosTests.gitlab: Use module system based runner
This commit is contained in:
parent
0bda75b520
commit
439625d5d5
@ -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 {};
|
||||
|
@ -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;
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user