2020-06-02 00:16:59 +00:00
|
|
|
import ./make-test-python.nix (
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
name = "go-neb";
|
2021-01-10 19:08:30 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-06-02 00:16:59 +00:00
|
|
|
maintainers = [
|
|
|
|
hexa
|
|
|
|
maralorn
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
|
|
|
server = {
|
|
|
|
services.go-neb = {
|
|
|
|
enable = true;
|
|
|
|
baseUrl = "http://localhost";
|
2021-06-22 07:07:50 +00:00
|
|
|
secretFile = pkgs.writeText "secrets" "ACCESS_TOKEN=changeme";
|
2020-06-02 00:16:59 +00:00
|
|
|
config = {
|
|
|
|
clients = [
|
|
|
|
{
|
|
|
|
UserId = "@test:localhost";
|
2021-06-22 07:07:50 +00:00
|
|
|
AccessToken = "$ACCESS_TOKEN";
|
2020-06-02 00:16:59 +00:00
|
|
|
HomeServerUrl = "http://localhost";
|
|
|
|
Sync = false;
|
|
|
|
AutoJoinRooms = false;
|
|
|
|
DisplayName = "neverbeseen";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
services = [
|
|
|
|
{
|
|
|
|
ID = "wikipedia_service";
|
|
|
|
Type = "wikipedia";
|
|
|
|
UserID = "@test:localhost";
|
|
|
|
Config = { };
|
|
|
|
}
|
|
|
|
];
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
2020-06-02 00:16:59 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
server.wait_for_unit("go-neb.service")
|
2021-06-22 07:07:50 +00:00
|
|
|
server.wait_until_succeeds("curl -fL http://localhost:4050/services/hooks/d2lraXBlZGlhX3NlcnZpY2U")
|
|
|
|
server.succeed(
|
|
|
|
"journalctl -eu go-neb -o cat | grep -q service_id=wikipedia_service",
|
|
|
|
"grep -q changeme /var/run/go-neb/config.yaml",
|
2020-06-02 00:16:59 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|
|
|
|
)
|