diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-04-30 11:26:16 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-05-12 22:29:30 -0300 |
commit | aec8dddef7af66a7a4dc93449a23bdf638d342b6 (patch) | |
tree | 9ff354c3d799e5e859edb72a1ebf6e85c47f62a8 /nixos/tests/gitlab.nix | |
parent | 6955c0c03b1736a5fa57730f56085cb1f5703038 (diff) | |
download | nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.tar nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.tar.gz nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.tar.bz2 nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.tar.lz nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.tar.xz nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.tar.zst nixpkgs-aec8dddef7af66a7a4dc93449a23bdf638d342b6.zip |
nixos/tests/gitlab.nix: get rid of `with lib`
Diffstat (limited to 'nixos/tests/gitlab.nix')
-rw-r--r-- | nixos/tests/gitlab.nix | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/nixos/tests/gitlab.nix b/nixos/tests/gitlab.nix index 672b497e7ec..d4e7603c20c 100644 --- a/nixos/tests/gitlab.nix +++ b/nixos/tests/gitlab.nix @@ -11,8 +11,6 @@ { pkgs, lib, ... }: -with lib; - let inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; initialRootPassword = "notproduction"; @@ -30,9 +28,7 @@ let bobProjectId = "3"; in { name = "gitlab"; - meta = with pkgs.lib.maintainers; { - maintainers = [ globin yayayayaka ]; - }; + meta.maintainers = with lib.maintainers; [ globin yayayayaka ]; nodes = { gitlab = { ... }: { @@ -43,10 +39,10 @@ in { virtualisation.useNixStoreImage = true; virtualisation.writableStore = false; - systemd.services.gitlab.serviceConfig.Restart = mkForce "no"; - systemd.services.gitlab-workhorse.serviceConfig.Restart = mkForce "no"; - systemd.services.gitaly.serviceConfig.Restart = mkForce "no"; - systemd.services.gitlab-sidekiq.serviceConfig.Restart = mkForce "no"; + systemd.services.gitlab.serviceConfig.Restart = lib.mkForce "no"; + systemd.services.gitlab-workhorse.serviceConfig.Restart = lib.mkForce "no"; + systemd.services.gitaly.serviceConfig.Restart = lib.mkForce "no"; + systemd.services.gitlab-sidekiq.serviceConfig.Restart = lib.mkForce "no"; services.nginx = { enable = true; @@ -195,7 +191,7 @@ in { gitlab.succeed( "echo \"Authorization: Bearer $(curl -X POST -H 'Content-Type: application/json' -d @${auth} http://gitlab/oauth/token | ${pkgs.jq}/bin/jq -r '.access_token')\" >/tmp/headers" ) - '' + optionalString doSetup '' + '' + lib.optionalString doSetup '' with subtest("Create user Alice"): gitlab.succeed( """[ "$(curl -o /dev/null -w '%{http_code}' -X POST -H 'Content-Type: application/json' -H @/tmp/headers -d @${createUserAlice} http://gitlab/api/v4/users)" = "201" ]""" |