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