diff options
author | Florian Klink <flokli@flokli.de> | 2018-11-23 19:36:14 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2018-11-23 19:44:45 +0100 |
commit | 6870eafe724a4f864ae54a5ae75cb6e00a4f76ad (patch) | |
tree | 2a52262dbe3e501a13f51ebbe43c6d7cbdc7b964 /nixos/tests | |
parent | 63f25471cbccc9e2f574a2cb76a761cd846d2996 (diff) | |
download | nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.tar nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.tar.gz nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.tar.bz2 nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.tar.lz nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.tar.xz nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.tar.zst nixpkgs-6870eafe724a4f864ae54a5ae75cb6e00a4f76ad.zip |
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.
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/gitlab.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/gitlab.nix b/nixos/tests/gitlab.nix index 661caa8aa83..269da8aa215 100644 --- a/nixos/tests/gitlab.nix +++ b/nixos/tests/gitlab.nix @@ -16,6 +16,7 @@ import ./make-test.nix ({ pkgs, lib, ...} : with lib; { services.nginx = { enable = true; + recommendedProxySettings = true; virtualHosts = { "localhost" = { locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket"; @@ -75,7 +76,8 @@ import ./make-test.nix ({ pkgs, lib, ...} : with lib; { $gitlab->waitForUnit("gitlab.service"); $gitlab->waitForUnit("gitlab-sidekiq.service"); $gitlab->waitForFile("/var/gitlab/state/tmp/sockets/gitlab.socket"); - $gitlab->waitUntilSucceeds("curl -sSf http://localhost/users/sign_in"); + $gitlab->waitUntilSucceeds("curl -sSf http://gitlab/users/sign_in"); + $gitlab->succeed("curl -isSf http://gitlab | grep -i location | grep -q http://gitlab/users/sign_in"); $gitlab->succeed("${pkgs.sudo}/bin/sudo -u gitlab -H gitlab-rake gitlab:check 1>&2") ''; }) |