1 import ../make-test-python.nix (
4 domain = "sourcehut.localdomain";
9 meta.maintainers = with pkgs.lib.maintainers; [
26 networking.domain = domain;
27 networking.extraHosts = ''
28 ${config.networking.primaryIPAddress} builds.${domain}
29 ${config.networking.primaryIPAddress} meta.${domain}
32 services.sourcehut = {
35 # FIXME: see why it does not seem to activate fully.
40 settings."builds.sr.ht" = {
41 oauth-client-secret = pkgs.writeText "buildsrht-oauth-client-secret" "2260e9c4d9b8dcedcef642860e0504bc";
42 oauth-client-id = "299db9f9c2013170";
49 machine.wait_for_unit("multi-user.target")
51 with subtest("Check whether meta comes up"):
52 machine.wait_for_unit("metasrht-api.service")
53 machine.wait_for_unit("metasrht.service")
54 machine.wait_for_unit("metasrht-webhooks.service")
55 machine.wait_for_open_port(5000)
56 machine.succeed("curl -sL http://localhost:5000 | grep meta.${domain}")
57 machine.succeed("curl -sL http://meta.${domain} | grep meta.${domain}")
59 with subtest("Check whether builds comes up"):
60 machine.wait_for_unit("buildsrht.service")
61 machine.wait_for_open_port(5002)
62 machine.succeed("curl -sL http://localhost:5002 | grep builds.${domain}")
63 #machine.wait_for_unit("buildsrht-worker.service")