summary refs log tree commit diff
diff options
context:
space:
mode:
authorFliegendeWurst <2012gdwu+github@posteo.de>2022-05-27 14:59:19 +0200
committerFliegendeWurst <2012gdwu+github@posteo.de>2022-05-27 15:34:46 +0200
commit9d2c8ba7e91aeaa398fa952f6ac6045f137a4674 (patch)
treea4eee99c7a44b05ac254a48429d99b411ecd3663
parent19e4234f4cb2ac70d9e8edfb99603ea65ba362ab (diff)
downloadnixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.tar
nixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.tar.gz
nixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.tar.bz2
nixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.tar.lz
nixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.tar.xz
nixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.tar.zst
nixpkgs-9d2c8ba7e91aeaa398fa952f6ac6045f137a4674.zip
nixos/tests/gitolite: fix test timeout
This prevents ssh from reading from stdin.

Link the NixOS test to the package.
-rw-r--r--nixos/tests/gitolite.nix2
-rw-r--r--pkgs/applications/version-management/gitolite/default.nix6
2 files changed, 6 insertions, 2 deletions
diff --git a/nixos/tests/gitolite.nix b/nixos/tests/gitolite.nix
index 128677cebde..9b3af59e4fb 100644
--- a/nixos/tests/gitolite.nix
+++ b/nixos/tests/gitolite.nix
@@ -107,7 +107,7 @@ in
     with subtest("gitolite server starts"):
         server.wait_for_unit("gitolite-init.service")
         server.wait_for_unit("sshd.service")
-        client.succeed("ssh gitolite@server info")
+        client.succeed("ssh -n gitolite@server info")
 
     with subtest("admin can clone and configure gitolite-admin.git"):
         client.succeed(
diff --git a/pkgs/applications/version-management/gitolite/default.nix b/pkgs/applications/version-management/gitolite/default.nix
index e9712a859d7..f5cf29fc4d0 100644
--- a/pkgs/applications/version-management/gitolite/default.nix
+++ b/pkgs/applications/version-management/gitolite/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, git, lib, makeWrapper, nettools, perl, perlPackages }:
+{ stdenv, fetchFromGitHub, git, lib, makeWrapper, nettools, perl, perlPackages, nixosTests }:
 
 stdenv.mkDerivation rec {
   pname = "gitolite";
@@ -38,6 +38,10 @@ stdenv.mkDerivation rec {
     echo ${version} > $out/bin/VERSION
   '';
 
+  passthru.tests = {
+    gitolite = nixosTests.gitolite;
+  };
+
   meta = with lib; {
     description = "Finely-grained git repository hosting";
     homepage    = "https://gitolite.com/gitolite/index.html";