support listening on Unix sockets

This commit is contained in:
LordMZTE 2025-05-24 15:18:42 +02:00
parent 188eac5cfd
commit 868bb44adf
No known key found for this signature in database
GPG key ID: B64802DC33A64FF6
10 changed files with 202 additions and 34 deletions

View file

@ -111,3 +111,9 @@ make_snapshot_test!(
"A config with the database path inside the media path fails",
"database-in-media.toml",
);
make_snapshot_test!(
unix_socket,
"A config listening to a Unix socket is valid",
"unix-socket.toml",
);

View file

@ -0,0 +1,14 @@
server_name = "example.com"
listen = [{ type = "unix", path = "/tmp/grapevine.sock" }]
[server_discovery]
client.base_url = "https://matrix.example.com"
[database]
backend = "rocksdb"
path = "tests/integrations/fixtures/check_config/dirs/a"
[media.backend]
type = "filesystem"
path = "tests/integrations/fixtures/check_config/dirs/b"

View file

@ -0,0 +1,7 @@
---
source: tests/integrations/check_config.rs
description: A config listening to a Unix socket is valid
---
Some(
0,
)

View file

@ -0,0 +1,14 @@
---
source: tests/integrations/check_config.rs
description: A config listening to a Unix socket is valid
---
[
{
"fields": {
"message": "Configuration looks good"
},
"level": "INFO",
"target": "grapevine::cli::check_config",
"timestamp": "[timestamp]"
}
]

View file

@ -0,0 +1,5 @@
---
source: tests/integrations/check_config.rs
description: A config listening to a Unix socket is valid
---