mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
31 lines
948 B
Nix
31 lines
948 B
Nix
{
|
|
pkgs,
|
|
self,
|
|
}:
|
|
pkgs.testers.nixosTest {
|
|
name = "sourcebot-nixos-module-test";
|
|
nodes.machine = {config, ...}: {
|
|
virtualisation.graphics = false;
|
|
documentation.enable = false;
|
|
imports = [self.nixosModules.sourcebot];
|
|
# disables ForwardToConsole=yes:
|
|
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/testing/test-instrumentation.nix#L207
|
|
services.journald.extraConfig = pkgs.lib.mkForce "";
|
|
services.sourcebot = {
|
|
enable = true;
|
|
configPath = "${pkgs.writeText "config" ''
|
|
{
|
|
}
|
|
''}";
|
|
};
|
|
};
|
|
testScript = ''
|
|
start_all()
|
|
machine.wait_for_unit("sourcebot-web.service")
|
|
machine.wait_for_unit("sourcebot-backend.service")
|
|
machine.wait_for_unit("sourcebot-db-setup.service")
|
|
machine.wait_for_unit("postgresql.service")
|
|
machine.wait_for_unit("sourcebot-zoekt.service")
|
|
machine.succeed("${pkgs.curl}/bin/curl http://localhost:7734")
|
|
'';
|
|
}
|