nixos/gollum: add test

This commit is contained in:
Jörg Thalheim 2022-09-10 18:01:37 +02:00
parent 6a66cf1b90
commit ad0108d803
3 changed files with 17 additions and 1 deletions

View file

@ -189,6 +189,7 @@ in {
gobgpd = handleTest ./gobgpd.nix {};
gocd-agent = handleTest ./gocd-agent.nix {};
gocd-server = handleTest ./gocd-server.nix {};
gollum = handleTest ./gollum.nix {};
google-oslogin = handleTest ./google-oslogin {};
gotify-server = handleTest ./gotify-server.nix {};
grafana = handleTest ./grafana.nix {};

14
nixos/tests/gollum.nix Normal file
View file

@ -0,0 +1,14 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "gollum";
nodes = {
webserver = { pkgs, lib, ... }: {
services.gollum.enable = true;
};
};
testScript = { nodes, ... }: ''
webserver.wait_for_unit("gollum")
webserver.wait_for_open_port(${toString nodes.webserver.config.services.gollum.port})
'';
})

View file

@ -1,4 +1,4 @@
{ lib, bundlerApp, bundlerUpdateScript, ruby, makeWrapper, git, docutils }:
{ lib, bundlerApp, bundlerUpdateScript, ruby, makeWrapper, git, docutils, nixosTests }:
bundlerApp rec {
pname = "gollum";
@ -10,6 +10,7 @@ bundlerApp rec {
nativeBuildInputs = [ makeWrapper ];
passthru.updateScript = bundlerUpdateScript "gollum";
passthru.tests.gollum = nixosTests.gollum;
meta = with lib; {
description = "A simple, Git-powered wiki with a sweet API and local frontend";