vuls: init at 0.27.0
[NixPkgs.git] / nixos / tests / go-neb.nix
blob4bd03dcf3c6b4f81ff1efb6e6073e8b41e5cbb5c
1 import ./make-test-python.nix ({ pkgs, ... }:
3   name = "go-neb";
4   meta = with pkgs.lib.maintainers; {
5     maintainers = [ hexa maralorn ];
6   };
8   nodes = {
9     server = {
10       services.go-neb = {
11         enable = true;
12         baseUrl = "http://localhost";
13         secretFile = pkgs.writeText "secrets" "ACCESS_TOKEN=changeme";
14         config = {
15           clients = [ {
16             UserId = "@test:localhost";
17             AccessToken = "$ACCESS_TOKEN";
18             HomeServerUrl = "http://localhost";
19             Sync = false;
20             AutoJoinRooms = false;
21             DisplayName = "neverbeseen";
22           } ];
23           services = [ {
24             ID = "wikipedia_service";
25             Type = "wikipedia";
26             UserID = "@test:localhost";
27             Config = { };
28           } ];
29         };
30       };
31     };
32   };
34   testScript = ''
35     start_all()
36     server.wait_for_unit("go-neb.service")
37     server.wait_until_succeeds("curl -fL http://localhost:4050/services/hooks/d2lraXBlZGlhX3NlcnZpY2U")
38     server.succeed(
39         "journalctl -eu go-neb -o cat | grep -q service_id=wikipedia_service",
40         "grep -q changeme /var/run/go-neb/config.yaml",
41     )
42   '';