1 import ./make-test-python.nix ({ lib, pkgs, ... }:
4 scanPath = "/var/lib/legit";
8 meta.maintainers = [ lib.maintainers.ratsclub ];
11 server = { config, pkgs, ... }: {
16 repo = { inherit scanPath; };
20 environment.systemPackages = [ pkgs.git ];
24 testScript = { nodes, ... }:
26 strPort = builtins.toString port;
31 server.wait_for_unit("network.target")
32 server.wait_for_unit("legit.service")
34 server.wait_until_succeeds(
35 "curl -f http://localhost:${strPort}"
38 server.succeed("${pkgs.writeShellScript "setup-legit-test-repo" ''
40 git init --bare -b master ${scanPath}/some-repo
41 git init -b master reference
43 git remote add origin ${scanPath}/some-repo
46 git -c user.name=test -c user.email=test@localhost commit -m 'add date'
47 git push -u origin master
50 server.wait_until_succeeds(
51 "curl -f http://localhost:${strPort}/some-repo"