nixosTests.gitlab: Use module system based runner
This commit is contained in:
parent
0bda75b520
commit
439625d5d5
2 changed files with 8 additions and 8 deletions
|
@ -267,7 +267,7 @@ in {
|
||||||
gitdaemon = handleTest ./gitdaemon.nix {};
|
gitdaemon = handleTest ./gitdaemon.nix {};
|
||||||
gitea = handleTest ./gitea.nix { giteaPackage = pkgs.gitea; };
|
gitea = handleTest ./gitea.nix { giteaPackage = pkgs.gitea; };
|
||||||
github-runner = handleTest ./github-runner.nix {};
|
github-runner = handleTest ./github-runner.nix {};
|
||||||
gitlab = handleTest ./gitlab.nix {};
|
gitlab = runTest ./gitlab.nix;
|
||||||
gitolite = handleTest ./gitolite.nix {};
|
gitolite = handleTest ./gitolite.nix {};
|
||||||
gitolite-fcgiwrap = handleTest ./gitolite-fcgiwrap.nix {};
|
gitolite-fcgiwrap = handleTest ./gitolite-fcgiwrap.nix {};
|
||||||
glusterfs = handleTest ./glusterfs.nix {};
|
glusterfs = handleTest ./glusterfs.nix {};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# - Creating Merge Requests and merging them
|
# - Creating Merge Requests and merging them
|
||||||
# - Opening and closing issues.
|
# - Opening and closing issues.
|
||||||
# - Downloading repository archives as tar.gz and tar.bz2
|
# - Downloading repository archives as tar.gz and tar.bz2
|
||||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ in {
|
||||||
gitlab.wait_for_unit("gitlab.service")
|
gitlab.wait_for_unit("gitlab.service")
|
||||||
gitlab.wait_for_unit("gitlab-pages.service")
|
gitlab.wait_for_unit("gitlab-pages.service")
|
||||||
gitlab.wait_for_unit("gitlab-sidekiq.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")
|
gitlab.wait_until_succeeds("curl -sSf http://gitlab/users/sign_in")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -419,15 +419,15 @@ in {
|
||||||
+ ''
|
+ ''
|
||||||
gitlab.systemctl("start gitlab-backup.service")
|
gitlab.systemctl("start gitlab-backup.service")
|
||||||
gitlab.wait_for_unit("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.systemctl("stop postgresql.service gitlab.target")
|
||||||
gitlab.succeed(
|
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("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.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(
|
gitlab.succeed(
|
||||||
"sudo -u gitlab -H gitlab-rake gitlab:backup:restore RAILS_ENV=production BACKUP=dump force=yes"
|
"sudo -u gitlab -H gitlab-rake gitlab:backup:restore RAILS_ENV=production BACKUP=dump force=yes"
|
||||||
)
|
)
|
||||||
|
@ -435,4 +435,4 @@ in {
|
||||||
''
|
''
|
||||||
+ waitForServices
|
+ waitForServices
|
||||||
+ test false;
|
+ test false;
|
||||||
})
|
}
|
||||||
|
|
Loading…
Reference in a new issue